Learn to use
QuantConnect
and Explore
Features

 

Document

WRITING ALGORITHMS

Learn tools you need
to build algorithmic
trading strategies

Build on a mature, flexible,
feature-complete API managing
billions of dollars capital, and used
by 5,000+ investors every month.

 

Table of Content

 

Key Concepts

Key Concepts

Getting Started

Introduction

Quantitative trading is a method of trading where computer programs execute a set of defined trading rules in an automated fashion. Quants take a scientific approach to trading, applying concepts from mathematics, time series analysis, statistics, computer science, and machine learning. Compared to discretionary traders, quants can respond faster to new information and are at less risk to their emotions during trades. Since quants can concurrently trade many strategies while discretionary traders only have the mental bandwidth to trade a small number of concurrent strategies, quant traders can have more diversified portfolios.

Learn Programming

We aim to make it as easy as possible to use QuantConnect, but you still need to be able to program. The following table provides some resources to get you started:

Type Name Producer
Video C# Fundamentals for Absolute Beginners Microsoft
Text C# Jump Start - Advanced Concepts Microsoft
Video Top 20 C# Questions Microsoft
Text C# Tutorial tutorialspoint
Text Introduction to Financial Python QuantConnect
Text/Video Introduction to Python Google
Interactive Code Academy - Python Code Academy
Text Python Pandas Tutorial tutorialspoint

Enroll in Bootcamp

Bootcamp is an online coding experience where QuantConnect team and community members teach you to write your first algorithms. Bootcamp gives you step-by-step instructions on practical and beginner-friendly topics, so it's a great way to learn LEAN. The lessons cover many topics that you use as you write your own algorithms, including universe selection , indicators , and consolidators . To get started, check out the course library .

Example Algorithm

The following video demonstrates how to implement an algorithm that buys and holds an S&P 500 index ETF:

Example python algorithm coding Example C# algorithm coding
// Import all the functionality you need to run algorithms
using QuantConnect.Data;

// Define a trading algorithm that is a subclass of QCAlgorithm
namespace QuantConnect.Algorithm.CSharp
{
    public class MyAlgorithm : QCAlgorithm
    {
        // Define an Initialize method.
        // This method is the entry point of your algorithm where you define a series of settings.
        // LEAN only calls this method one time, at the start of your algorithm.
        public override void Initialize()
        {
            // Set the start and end dates
            SetStartDate(2018, 1, 1);
            SetEndDate(2022, 6, 1);
            // Set the starting cash balance to $100,000 USD
            SetCash(100000);
            // Add data for the S&P500 index ETF
            AddEquity("SPY");
        }

        // Define an OnData method. 
        // This method receives all the data you subscribe to in discrete time slices.
        // It's where you make trading decisions.
        public override void OnData(Slice slice)
        {
            // Allocate 100% of the portfolio to SPY
            if (!Portfolio.Invested)
            {
                SetHoldings("SPY", 1);
            }
        }
    }
}
# Import all the functionality you need to run algorithms
from AlgorithmImports import *
        
# Define a trading algorithm that is a subclass of QCAlgorithm
class MyAlgorithm(QCAlgorithm):
    # Define an Initialize method.
    # This method is the entry point of your algorithm where you define a series of settings.
    # LEAN only calls this method one time, at the start of your algorithm.
    def initialize(self) -> None:
        # Set start and end dates
        self.set_start_date(2018, 1, 1)
        self.set_end_date(2022, 6, 1)
        # Set the starting cash balance to $100,000 USD
        self.set_cash(100000)
        # Add data for the S&P500 index ETF
        self.add_equity("SPY")
        
    # Define an OnData method. 
    # This method receives all the data you subscribe to in discrete time slices.
    # It's where you make trading decisions.
    def on_data(self, slice: Slice) -> None:
        # Allocate 100% of the portfolio to SPY
        if not self.portfolio.invested:
            self.set_holdings("SPY", 1)

 

Key Concepts

Algorithm Engine

Introduction

LEAN Engine is an open-source algorithmic trading engine built for easy strategy research, backtesting, and live trading. We integrate with common data providers and brokerages, so you can quickly deploy algorithmic trading strategies. The core of the LEAN Engine is written in C#, but it operates seamlessly on Linux, Mac and Windows operating systems. To use it, you can write algorithms in Python 3.11 or C#. QuantConnect maintains the LEAN project and uses it to drive the web-based algorithmic trading platform on the website.

Since LEAN is open-source, you aren't locked-in to the QuantConnect platform. You can run LEAN with your own infrastructure, data, and brokerage connections. If you use QuantConnect, our team of engineers manage the infrastructure, you can run the latest version of LEAN with all of its brokerage connections, and you can utilize the datasets in the Dataset Market .

Your Algorithm and LEAN

To create a trading algorithm with LEAN, define a subclass of the QCAlgorithm class. LEAN loads your algorithm into the engine during the building and compilation process. LEAN runs an algorithm manager that synchronizes the data your algorithm requests, injects the data into your algorithm so you can place trades, processes your orders, and then updates your algorithm state.

The LEAN engine manages your portfolio and data feeds, so you focus on your algorithm strategy and execution. We automatically provide basic portfolio management and reality modeling underneath the hood. The QCAlgorithm class provides some key helper properties for you to use, including the Security Manager, Portfolio Manager, Transactions Manager, Notification Manager, and Scheduling Manager. The class also has hundreds of helper methods to make the API easy to use.

The Securities property is a dictionary of Security objects. Each asset (Equity, Forex pair, etc) in your algorithm has a Security object. All the models for a security live on these objects. For example, Securities["IBM"].FeeModel and Securities["IBM"].Price self.Securities["IBM"].FeeModel and self.Securities["IBM"].Price return the fee model and price of IBM, respectively.

The Portfolio is a dictionary of SecurityHolding objects. These classes track the profits, losses, fees, and quantity of individual portfolio holdings. For example, Portfolio["IBM"].LastTradeProfit self.portfolio["IBM"].last_trade_profit returns the profit of your last IBM trade.

Other helpers like Transactions , Schedule , Notify , and Universe have their own helper methods.

public class QCAlgorithm
{
    SecurityManager Securities;               // Array of Security objects.
    SecurityPortfolioManager Portfolio;       // Array of SecurityHolding objects
    SecurityTransactionManager Transactions;  // Transactions helper
    ScheduleManager Schedule;                 // Scheduling helper
    NotificationManager Notify;               // Email, SMS helper
    UniverseManager Universe;                 // Universe helper

    // Set up Requested Data, Cash, Time Period.
    public virtual void Initialize() { ... };

    // Event Handlers:
    public virtual void OnData(Slice slice) { ... };
    public virtual void OnEndOfDay(Symbol symbol) { ... };
    public virtual void OnEndOfAlgorithm() { ... };

    // Indicator Helpers
    public SimpleMovingAverage SMA(Symbol symbol, int period) { ... };
}
class QCAlgorithm:
    securities   # Array of Security objects.
    portfolio    # Array of SecurityHolding objects
    transactions # Transactions helper
    schedule     # Scheduling helper
    notify       # Email, SMS helper
    universe     # Universe helper

    # Set up Requested Data, Cash, Time Period.
    def initialize(self) -> None:

    # Other Event Handlers
    def on_data(self, slice: Slice) -> None:
    def on_end_of_day(self, symbol: Symbol) -> None:
    def on_end_of_algorithm(self) -> None:

    # Indicator Helpers
    def sma(self, symbol: Symbol, period: int) -> SimpleMovingAverage:

Only define one algorithm class per project. To trade multiple strategies in a single algorithm, implement an Algorithm Framework design with multiple Alpha models . To be notified when you can define more than one algorithm class per project, subscribe to GitHub Issue #6968 .

Threads in LEAN

LEAN is multi-threaded and attempts to consume as much CPU as possible to perform given work as quickly as possible. The analysis engine loads data parallel and synchronizes it to generate the requested security information.

The client algorithm is plugged into LEAN, and has its events triggered synchronously in backtesting. The primary bottle neck to LEAN execution is executing client code.

In live trading, most events are synchronous as in backtesting, however order events are triggered immediately from the brokerage thread (asynchronously) to ensure the lowest latency. For example; a strategy using hourly data, with a limit order could fill between data bars. This fill event is triggered when it occurs in live trading.

We recommend using thread safe collections when possible, or locks around collections to ensure they are thread-safe.

Batch vs Stream Analysis

Backtesting platforms come in two general varieties, batch processing and event streaming. Batch processing backtesting is much simpler. It loads all data into an array and passes it to your algorithm for analysis. Because your algorithm has access to future data points, it is easy to introduce look-ahead bias . Most home-grown analysis tools are batch systems.

QuantConnect/LEAN is a streaming analysis system. In live trading, your algorithm receives data points one after another over time. QuantConnect models this in backtesting, streaming data to your algorithm in fast-forward mode. Because of this, you can't access price data beyond the Time Frontier . Although streaming analysis is slightly trickier to understand, it allows your algorithm to seamlessly work in backtests and live trading with no code changes.

Event Flow

When you deploy an algorithm, LEAN first calls the Initialize initialize method. In live mode, the engine loads your holdings and open orders from your brokerage account to add data subscriptions and populate the Securities securities , Portfolio portfolio , and Transactions transactions objects. LEAN receives the data from the subscriptions, synchronizes the data to create a timeslice , and then performs the following steps. Your algorithm can spend up to 10 minutes on each timeslice unless you call the Train train method.

  1. If it's a backtest, check if there are Scheduled Events in the past that didn't fire because there was no data between the previous slice and the current slice. LEAN automatically creates a Scheduled Event to call the OnEndOfDay on_end_of_day method at the end of each day.
  2. In live mode, Scheduled Events occur in a separate thread from the algorithm manager, so they run at the correct time.

  3. Update the algorithm time.
  4. Update the CurrentSlice current_slice .
  5. Pass the SymbolChangedEvents to the OnSymbolChangedEvents on_symbol_changed_events method.
  6. Cancel all open orders for securities that changed their ticker .
  7. Add a Security object to the Securities securities collection for each new security in the universe.
  8. Update the Security objects with the latest data.
  9. Update the Cash objects in the CashBook with the latest data.
  10. Process fill models for non-market orders.
  11. Submit market on open orders to liquidate Equity Option contracts if the underlying Equity has a split warning .
  12. Process margin calls .
  13. If it's time to settle unsettled cash , perform settlement.
  14. Call the OnSecuritiesChanged on_securities_changed method with the latest security changes.
  15. Apply dividends to the portfolio.
  16. For securities that have a split warning, update their portfolio holdings and adjust their open orders to account for the split.
  17. Update consolidators with the latest data.
  18. Pass custom data to the OnData on_data method.
  19. Pass the Dividends to the OnDividends on_dividends method.
  20. Pass the Splits to the OnSplits on_splits method.
  21. Pass the Delistings to the OnDelistings on_delistings method.
  22. Pass the Slice to the OnData on_data method.
  23. Perform universe selection .
  24. Pass the Slice to the Update update method of each Alpha model .
  25. Pass the Insight objects from the Alpha model to the Portfolio Construction model .
  26. Pass the PortfolioTarget objects from the Portfolio Construction model to each Risk Management model .
  27. Pass the risk-adjusted PortfolioTarget objects from the Risk Management models to the Execution model .

When your algorithm stops executing, LEAN calls the OnEndOfAlgorithm on_end_of_algorithm method .

Python Support

The LEAN engine is written in C#, but you can create algorithms in C# or Python. If you program in Python, LEAN uses Python.Net to bridge between the C# engine and your algorithm. As a result of the bridge, QCAlgorithm class members are in camel case, not snake case. It can be slow to move from Python to C#. If you access C# objects in your Python algorithm, it's fastest to only access them once and save a reference if you need to access them again.

# Do this:
security_holding = self.portfolio[self._symbol]
avg_price = security_holding.average_price
quantity = security_holding.quantity

# Avoid this:
avg_price = self.portfolio[self._symbol].average_price
quantity = self.portfolio[self._symbol].quantity

 

Key Concepts

Multi-Asset Modeling

Introduction

We designed LEAN as a multi-asset platform with out-of-the-box support for multiple securities, so you can model complex portfolios like hedge funds.

Asset Portfolio

The portfolio manages the individual securities it contains. It tracks the cost of holding each security. It aggregates the performance of the individual securities in the portfolio to produce statistics like net profit and drawdown . The portfolio also holds information about each currency in its cashbook.

Cashbooks

We designed LEAN to be a multi-currency platform. LEAN can trade Forex, Cryptocurrencies, and other assets that are quoted in other currencies. A benefit of supporting multiple currencies is that as we add new asset classes from new countries, LEAN is already prepared to transact in those assets by using their quote currency. For instance, we added the India Equity market, which quotes assets in the INR currency.

The portfolio manages your currencies in its cashbook, which models the cash as a ledger of transactions. When you buy assets, LEAN uses the currencies in your cashbook to purchase the asset and pay the transaction fees. For more information about the cashbook, see Cashbook .

Buying Power

We model the margin requirements of each asset and reflect that in the buying power available to the algorithm. We source Futures margins from CME SPAN margins. Equity margin is 2x for standard margin accounts and 4x intraday for Pattern Day Trading accounts. For more information about buying power modeling, see Buying Power .

 

Key Concepts

Time Modeling

Time Modeling

Periods

Introduction

Data comes in two different "shapes" according to the time period it covers: point values or period values. In QuantConnect, ticks are point values, and bars are a period values. These data formats have different properties, which control when LEAN emits them into your algorithm.

Start time vs end time for tick and bar data

Start and End Time

Bars have a start and end time that represent the time period of which the bar aggregates data. LEAN passes the bar to your algorithm at the end time so that you don't receive the bar before it was actually available. Free online data providers commonly timestamp their bars to the start time of the bar and include the bar close price, making your research prone to look ahead bias.

Carefully consider the end-time of data to avoid one-off errors when you import the data into QC or compare indicator values across different platforms. Generally, bar timestamps can be represented as follows: bar.EndTime = bar.Time + bar.Period bar.end_time = bar.time + bar.period .

Period Values

Bars aggregate data across a period of time into a single object. We make this easy for you by pre-aggregating billions of raw trade-ticks into TradeBar objects and quote-ticks into QuoteBar objects.

We don't know the close of a bar until the start of the next bar, which can sometimes be confusing. For example, a price bar for Friday will include all the ticks from Friday 00:00:00 to Friday 23:59:59.99999, but LEAN will emit it to your algorithm on Saturday at midnight. As a result, if you analyze the Friday data and then place an order, LEAN sends the order to your brokerage on Saturday.

Time of receiving bar data via OnData handler

When there are no ticks during a period, LEAN emits the previous bar. This is the default behavior for bar data and it's referred to as "filling the data forward". You can enable and disable this setting when you create the security subscription .

We provide bar data in second, minute, hour, and daily bar formats. To create other periods of bars, see Consolidating Data .

Daily Periods

LEAN emits daily bars at midnight. To be notified when a security has finished trading for the day, add an OnEndOfDay on_end_of_day method to your algorithm. LEAN calls this method for each security every day.

def on_end_of_day(self, symbol: Symbol) -> None:
    pass
public override void OnEndOfDay(Symbol symbol)
{
    
}

Point Values

Point values have no period because they occur at a singular point in time. Examples of point data includes ticks, open interest, and news releases. Tick data represents a single trade or quote in the market. It's a discrete event with no period, so the Time time and EndTime end_time properties are the same. LEAN emits ticks as soon as they arrive and doesn't fill them forward.

Time of receiving tick data via OnData handler

 

Time Modeling

Timeslices

Introduction

The core technology behind QuantConnect algorithmic trading is an event-based, streaming analysis system called LEAN . LEAN attempts to model the stream of time as accurately as possible, presenting data ("events") to your algorithms in the order it arrives, as you would experience in reality.

All QuantConnect algorithms have this time-stream baked in as the primary event handler, OnData on_data . The Slice object this method receives represents all of the data at a moment of time, a time-slice . No matter what data you request, you receive it in the order created according to simulated algorithm time. By only letting your algorithm see the present and past moments, we can prevent the most common quantitative-analysis error, look-ahead bias .

Time Frontier

If you request data for multiple securities and multiple resolutions, it can create a situation where one of your data subscriptions is ready to emit, but another subscription with a longer period is still be constructing its bar. Furthermore, if you request multiple datasets that have different time zones, your algorithm will receive the daily bars of each dataset at midnight in the respective time zone. To coordinate the data in these situations, we use the EndTime end_time of each data point to signal when LEAN should transmit it to your algorithm.

Time frontier as backtest progress

Once your algorithm reaches the EndTime end_time of a data point, LEAN sends the data to your OnData on_data method. For bar data, this is the beginning of the next period. To avoid look-ahead bias, you can only access data from before this Time Frontier. The Time time property of your algorithm is always equal to the Time Frontier.

Properties

Slice objects have the following properties:

Get Time Slices

To get the current Slice object, define an OnData on_data method or use the CurrentSlice current_slice property of your algorithm. The Slice contains all the data for a given moment in time. The Bars bars and QuoteBars quote_bars properties are Symbol /string indexed dictionaries. The Ticks ticks property is a list of ticks for that moment of time, indexed by the Symbol . To check which data formats are available for each asset class, see the Data Formats page in the Asset Classes chapter.

The Slice object gives you the following ways to access your data:

Strongly typed access gives you compile-time safety, but dynamic type access can sometimes simplify coding. We recommend static types since they are easier to debug.

Check if the Slice contains the data you're looking for before you index it. If there is little trading, or you are in the same time loop as when you added the security, it may not have any data. Even if you enabled fill-forward for a security subscription, you should check if the data exists in the dictionary before you try to index it. To check if the Slice contains for a security, call the ContainsKey contains_key method. Note: if the Slice object doesn't contain any market data but it contains auxiliary data, the slice.ContainsKey(symbol) slice.contains_key(symbol) method can return true while slice[symbol] returns None null .

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self._symbol) and slice[self._symbol]:
        data = slice[self._symbol]
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_symbol))
    {
        var data = slice[_symbol];
    }
}

 

Time Modeling

Time Zones

Introduction

LEAN is an international trading engine, so it can operate across time zones. The exchange, your algorithm, and the data in your algorithm can all have different time zones.

Exchange Time Zone

Exchanges are located in different areas, so they can have different time zones. To get the time zone of the exchange that a Security trades on, use its Exchange.Hours.TimeZone exchange.hours.time_zone property.

var timeZone = Securities[_symbol].Exchange.Hours.TimeZone;
time_zone = self.securities[self._symbol].exchange.hours.time_zone

Algorithm Time Zone

LEAN supports international trading across multiple time zones and markets, so it needs a reference time zone for the algorithm to set the Time time . The default time zone is Eastern Time (ET), which is UTC-4 in summer and UTC-5 in winter. To set a different time zone, call the SetTimeZone set_time_zone method. This method accepts either a string following the IANA Time Zone database convention or a NodaTime .DateTimeZone object. If you pass a string, the method converts it to a NodaTime.DateTimeZone object. The TimeZones class provides the following helper attributes to create NodaTime.DateTimeZone objects:

SetTimeZone("Europe/London");
SetTimeZone(NodaTime.DateTimeZone.Utc);
SetTimeZone(TimeZones.Chicago);
self.set_time_zone("Europe/London")
self.set_time_zone(TimeZones.CHICAGO)

To get the time zone of your algorithm, use the TimeZone time_zone property.

time_zone = self.time_zone
var timeZone = TimeZone;

To get the algorithm time in Coordinated Universal Time (UTC), use the UtcTime utc_time property.

utc_time = self.utc_time
var utcTime = UtcTime;

The Time time and UtcTime utc_time objects have no time zone. LEAN maintains their state to be consistent.

Data Time Zone

Datasets can have different time zones because the time zone is up to the data provider, where they are located, and where they collect the data. LEAN tracks the time zone of each dataset so that you receive the correct data at the right point in time in your algorithm. If you have multiple datasets in your algorithm from different time zones, LEAN synchronizes them to your algorithm time. Furthermore, if you set up time period consolidators , LEAN consolidates the data based on the data time zone.

To get the time zone of a dataset, view the listing page in the Dataset Market or call the GetDataTimeZone method.

time_zone = self.market_hours_database.get_data_time_zone(Market.USA, self.symbol, SecurityType.EQUITY)
var timeZone = MarketHoursDatabase.GetDataTimeZone(Market.USA, _symbol, SecurityType.Equity);

 

Key Concepts

Security Identifiers

Introduction

We implemented Symbol objects in the LEAN open-source project as a way to identify or "finger-print" tradable assets so that no further database look-up is required. All QuantConnect and LEAN Algorithm API methods use Symbol objects to identify assets.

Encoding Symbols

SecurityIdentifier objects have several public properties to uniquely identify each asset. The following table describes these properties:

Property Data Type Description
market Market str string The market in which the asset trades
security_type SecurityType SecurityType The asset class
option_style OptionStyle OptionStyle American or European Option style
option_right OptionRight OptionRight Call or put Option type
strike_price StrikePrice float decimal The Option contract strike price
date Date datetime DateTime Earliest listing date for Equities; expiry for Futures and Options; December 30, 1899 for continuous Futures contracts and Indices.
has_underlying HasUnderlying bool A flag to represent if its a derivative asset with another underlying asset

We encode the preceding properties to create Symbol objects. We do our best to hide the details of this process from your algorithm, but you'll occasionally see it come through as an encoded hash like AAPL R735QTJ8XC9X . The first half of the encoded string represents the first ticker AAPL was listed under. The other letters at the end of the string represent the serialized form of the preceding SecurityIdentifier properties. You may also see an encoded has like AAPL XL7X5I241SO6|AAPL R735QTJ8XC9X for a derivative contract. In this case, the part before the | is contract hash and the part after the | is the underlying hash. This serialization approach lets LEAN assign a short, unique string to octillions of different security objects.

Security identifier decomposition

LEAN assumes the ticker you pass to the AddEquity add_equity method is the current ticker of the Equity asset. To access this ticker, use the Value value property of the Symbol object.

self._symbol = self.add_equity("GOOG").symbol
self.debug(self._symbol.id.value) # Prints "GOOCV"
self.debug(self._symbol.value)    # Prints "GOOG"
self.debug(str(self._symbol.id))  # Prints "GOOCV VP83T1ZUHROL"
var symbol = AddEquity("GOOG").Symbol;
Debug(symbol.ID.Value);       // Prints "GOOCV"
Debug(symbol.Value);          // Prints "GOOG"
Debug(symbol.ID.ToString());  // Prints "GOOCV VP83T1ZUHROL"

If you create the security subscription with a universe selection function, the Value value property of the Symbol object is the point-in-time ticker.

Decoding Symbols

When a SecurityIdentifier is serialized to a string, it looks something like SPY R735QTJ8XC9X . This two-part string is a base64 encoded set of data. Encoding all of the properties into a short format allows dense communication without requiring a third-party list or look-up. Most of the time, you will not need to work with these encoded strings. However, to deserialize the string into a Symbol object, call the Symbol symbol method.

var symbol = Symbol("GOOCV VP83T1ZUHROL");
symbol.ID.Market;     // => "USA"
symbol.SecurityType;  // => SecurityType.Equity
symbol.Value;         // => "GOOCV"
symbol = self.symbol("GOOCV VP83T1ZUHROL")
symbol.id.market      # => "USA"
symbol.security_type  # => SecurityType.EQUITY
symbol.value          # => "GOOCV"

The Market market property distinguishes between tickers that have the same string value but represent different underlying assets. A prime example of this is the various market makers who have different prices for EURUSD. We store this data separately and as they have different fill prices, we treat the execution venues as different markets.

Tickers

Tickers are a string shortcode representation for an asset. Some examples of popular tickers include "AAPL" for Apple Corporation and "IBM" for International Business Machines Corporation. These tickers often change when the company rebrands or they undergo a merger or reverse merger.

The ticker of an asset is not the same as the Symbol . Symbol objects are permanent and track the underlying entity. When a company rebrands or changes its name, the Symbol object remains constant, giving algorithms a way to reliably track assets over time.

Tickers are also often reused by different brokerages. For example Coinbase, a leading US Crypto Brokerage lists the "BTCUSD" ticker for trading. Its competitor, Bitfinex, also lists "BTCUSD". You can trade both tickers with LEAN. Symbol objects allow LEAN to identify which market you reference in your algorithms.

To create a Symbol object for a point-in-time ticker, call the GenerateEquity generate_equity method to create the security identifier and then call the Symbol constructor. For example, Heliogen, Inc. changed their ticker from ATHN to HLGN on December 31, 2021. To convert the ATHN ticker to the Equity Symbol , type:

ticker = "ATHN"
security_id = SecurityIdentifier.generate_equity(ticker, Market.USA, mapping_resolve_date=datetime(2021, 12, 1))
symbol = Symbol(security_id, ticker)
var ticker = "ATHN";
var securityID = SecurityIdentifier.GenerateEquity(ticker, Market.USA, mappingResolveDate:new DateTime(2021, 12, 1));
var symbol = new Symbol(securityID, ticker);

In the preceding code snippet, the mappingResolveDate mapping_resolve_date must be a date when the point-in-time ticker was trading.

Symbol Cache

To make using the API easier, we have built the Symbol Cache technology, which accepts strings and tries to guess which Symbol object you might mean. With the Symbol Cache, many methods can accept a string such as "IBM" instead of a complete Symbol object. We highly recommend you don't rely on this technology and instead save explicit references to your securities when you need them.

# Example 1: Relying On Symbol Cache:
self.add_equity("IBM")          # Add by IBM string ticker, save reference to Symbol Cache.
self.market_order("IBM", 100)   # Determine refering to IBM Equity from Symbol Cache.
self.history("AAPL", 14)        # Makes a guess referring to AAPL Equity.

# Example 2: Correctly Using Symbols: 
self.ibm = self.add_equity("IBM").symbol   # Add IBM Equity string ticker, save Symbol.
self.market_order(self.ibm, 100)           # Use IBM Symbol in future API calls.

self.aapl = Symbol.create("AAPL", SecurityType.EQUITY, Market.USA)
self.history(self.aapl, 14)
// Example 1: Relying On Symbol Cache:
AddEquity("IBM");          // Add by IBM string ticker, save reference to Symbol Cache.
MarketOrder("IBM", 100);   // Determine refering to IBM Equity from Symbol Cache.
History("AAPL", 14);       // Guess referring to AAPL Equity.

// Example 2: Correctly Using Symbols: 
var ibm = AddEquity("IBM").Symbol;   // Add IBM Equity string ticker, save Symbol.
MarketOrder(ibm, 100);               // Use IBM Symbol in future API calls.

var aapl = Symbol.Create("AAPL", SecurityType.Equity, Market.USA);
History(aapl, 14);

Industry Standard Identifiers

You can convert industry-standard security identifiers like CUSIP, FIGI, ISIN, and SEDOL to Symbol objects and you can convert Symbol objects to industry-standard security identifiers.

CUSIP

To convert a Committee on Uniform Securities Identification Procedures (CUSIP) number to a Symbol or a Symbol to a CUSIP number, call the CUSIP cusip method.

symbol = self.cusip("03783310") # AAPL Symbol
cusip = self.cusip(symbol) # AAPL CUSIP (03783310)
var symbol = CUSIP("03783310"); // AAPL Symbol
var cusip = CUSIP(symbol); // AAPL CUSIP (03783310)

FIGI

To convert a Financial Instrument Global Identifier (FIGI) to a Symbol or a Symbol to a FIGI, call the CompositeFIGI composite_figi method.

symbol = self.composite_figi("BBG000B9XRY4") # AAPL Symbol
figi = self.composite_figi(symbol) # AAPL FIGI (BBG000B9XRY4)
var symbol = CompositeFIGI("BBG000B9XRY4"); // AAPL Symbol
var figi = CompositeFIGI(symbol); // AAPL FIGI (BBG000B9XRY4)

ISIN

To convert an International Securities Identification Number (ISIN) to a Symbol or a Symbol to an ISIN, call the ISIN isin method.

symbol = self.isin("US0378331005") # AAPL Symbol
isin = self.isin(symbol) # AAPL ISIN (US0378331005)
var symbol = ISIN("US0378331005"); // AAPL Symbol
var isin = ISIN(symbol); // AAPL ISIN (US0378331005)

SEDOL

To convert a Stock Exchange Daily Official List (SEDOL) number to a Symbol or a Symbol to a SEDOL number, call the SEDOL sedol method.

symbol = self.sedol("2046251") # AAPL Symbol
sedol = self.sedol(symbol) # AAPL SEDOL (2046251)
var symbol = SEDOL("2046251"); // AAPL Symbol
var sedol = SEDOL(symbol); // AAPL SEDOL (2046251)

 

Key Concepts

Event Handlers

Introduction

Event handlers are called during an algorithm execution to pass information to your strategy. Most of the events are not needed for simple strategies, but can be helpful for debugging issues in more complex algorithms.

Data Events

public override void OnData(Slice slice)
{
    slice.TryGetValue(_symbol, out var myData);
}

public override void OnSplits(Splits splits)
{
    splits.TryGetValue(_symbol, out var split);
}

public override void OnDividends(Dividends dividends)
{
    dividends.TryGetValue(_symbol, out var dividend);
}

public override void OnSymbolChangedEvents(SymbolChangedEvents symbolChangedEvents)
{
    symbolChangedEvents.TryGetValue(_symbol, out var symbolChangedEvent);
}

public override void OnDelistings(Delistings delistings)
{
    delistings.TryGetValue(_symbol, out var delisting);
}
def on_data(self, slice: Slice) -> None:
    my_data = slice.get(self._symbol)
    
def on_splits(self, splits: Splits) -> None:
    split = splits.get(self._symbol)
    
def on_dividends(self, dividends: Dividends) -> None:
    dividend = dividends.get(self._symbol)
    
def on_symbol_changed_events(self, symbol_changed_events: SymbolChangedEvents) -> None:
    symbol_changed_event = symbol_changed_events.get(self._symbol])
        
def on_delistings(self, delistings: OnDelistings) -> None:
    delisting = delistings.get(self._symbol)

The OnData on_data method is the primary event handler for receiving financial data events to your algorithm. It is triggered sequentially at the point in time the data is available; in backtesting and live. For daily data this means the event is processed at midnight in backtesting or 6am the following day in live trading. In this method, all data for a given moment of time is grouped in a single event, including custom data types. This data is passed with the Slice object.

When fill-forward is enabled for your asset, the OnData event handler will be called regularly even if there was no new data. This is the default behavior.

In backtesting, if your algorithm takes a long time to process a slice, the following slice objects queue up and the next event triggers when your algorithm finishes processing the current slice. In live trading, if your algorithm takes longer to process the current slice than the time period that the slice spans, the next event triggers when your algorithm finishes processing the current slice, but the slice of the following event is the most recent slice. For example, say your algorithm consumes second resolution Crypto data but it takes your algorithm 3.5 seconds to process each slice. In backtesting, you'll get every slice. In live trading, if you deploy at 12:00:00 AM Coordinated Universal Time (UTC), you'll get the first slice at 12:00:01 AM UTC (spanning 12:00:00 AM UTC to 12:00:01 AM UTC) and you'll get the second slice at 12:00:04.5 AM UTC (roughly spanning 12:00:03 AM UTC to 12:00:04 AM UTC).

The OnSplits on_splits , OnDividends on_dividends , OnSymbolChangedEvents on_symbol_changed_events , and OnDelistings on_delistings event handlers provide data for their respective types in an isolated way. However, all of the data for these corporate actions is also available in the Slice in OnData on_data .

To perform intensive computation before the market opens, use a Scheduled Event or the Train train method.

For more information on the Slice object and OnData event, see Handling Data .

Securities Changed Event

public override void OnSecuritiesChanged(SecurityChanges changes)
{
    foreach (var security in changes.AddedSecurities)
    {
        Debug($"{Time}: Added {security.Symbol}");
    }
    foreach (var security in changes.RemovedSecurities)
    {
        Debug($"{Time}: Removed {security.Symbol}");
        
        if (security.Invested)
        {
            Liquidate(security.Symbol, "Removed from Universe");
        }
    }
}
def on_securities_changed(self, changes: SecurityChanges) -> None:
    for security in changes.added_securities::
        self.debug(f"{self.time}: Added {security.symbol}")

    for security in changes.removed_securities:
        self.debug(f"{self.time}: Removed {security.symbol}")
        
        if security.invested:
            self.liquidate(security.symbol, "Removed from Universe")

The OnSecuritiesChanged on_securities_changed event notifies the algorithm when assets are added or removed from the universe. This can be due to changes in the Universe constituents , delisting , contract expiration, or an explicit call to the RemoveSecurity remove_security method.

The event is triggered immediately when the asset is removed from the universe; however the data feed for the asset may remain active if the algorithm has open orders.

For more information, see how to use Security Changed Events .

Order Events

public override void OnOrderEvent(OrderEvent orderEvent)
{
    var order = Transactions.GetOrderById(orderEvent.OrderId);
    if (orderEvent.Status == OrderStatus.Filled)
    {
        Debug($"{Time}: {order.Type}: {orderEvent}");
    }
}

public override void OnAssignmentOrderEvent(OrderEvent assignmentEvent)
{
    Log(assignmentEvent.ToString());
}
def on_order_event(self, order_event: OrderEvent) -> None:
    order = self.transactions.get_order_by_id(order_event.order_id)
    if order_event.status == OrderStatus.FILLED:
        self.debug(f"{self.time}: {order.type}: {order_event}")

def on_assignment_order_event(self, assignment_event: OrderEvent) -> None:
    self.log(str(assignment_event))

The OnOrderEvent on_order_event method notifies the algorithm of new orders, and changes in the order status such as fill events and cancelations. For options assignment events there is a dedicated event handler OnAssignmentOrderEvent on_assignment_order_event .

In backtesting order events are triggered synchronously after the main data events. In live trading, order events are asynchronously as they occur. To avoid infinite loops, we recommend not to place orders in the OnOrderEvent.

For more information, see how to use Order Events .

Brokerage Events

public override void OnBrokerageMessage(BrokerageMessageEvent message)
{
    if (message.Type== BrokerageMessageType.Reconnect)
    {
        Log($"{Time}: {message.Type}: Message: {message.Message}");
    }
}

public override void OnBrokerageDisconnect()
{
    Log($"Brokerage disconnection detected at {Time}.");
}

public override void OnBrokerageReconnect()
{
    Log($"Brokerage reconnected at {Time}.");
}
def on_brokerage_message(self, message: BrokerageMessageEvent) -> None: 
    if message.type == BrokerageMessageType.RECONNECT:
        self.log(f"{self.time}: {message.type}: Message: {message.message}")

def on_brokerage_disconnect(self) -> None:
    self.log(f"Brokerage disconnection detected at {self.time}")

def on_brokerage_reconnect(self) -> None:
    self.log(f"Brokerage reconnected at {self.time}")

The OnBrokerageDisconnect on_brokerage_disconnect and OnBrokerageReconnect on_brokerage_reconnect event handlers pass information to the algorithm about the brokerage connection status. This can be helpful for considering when to place a trade when a brokerage API is unreliable or under maintenance. The OnBrokerageMessage on_brokerage_message event handler provides information from the brokerages, including the disconnect and reconnect messages. Message content varies with each brokerage.

Brokerage events are triggered asynchronously in live trading, and are not created in backtesting.

Margin Call Events

public override void OnMarginCall(List requests)
{
    foreach (var orderRequest in requests) {
    }
}

public override void OnMarginCallWarning()
{
    Log("Margin call warning, 5% margin remaining");
}
def on_margin_call(self, requests): -> List[SubmitOrderRequest]: 
    # Modify order requests to choose what to liquidate.
    return requests

def on_margin_call_warning(self) -> None:
    self.log("Margin call warning, 5% margin remaining")

The OnMarginCallWarning on_margin_call_warning and OnMarginCall on_margin_call event handlers provide information and control over how to reduce algorithm leverage when performance is poor.

The OnMarginCallWarning on_margin_call_warning method is called when there is less than 5% margin remaining, this gives you an opportunity to reduce leverage before an official margin call is performed by the brokerage. The OnMarginCall on_margin_call event handler is passed a list of SubmitOrderRequest objects which will be executed on exiting the method.

Margin events are called before the data events are processed.

The following demonstration demonstration processes suggested orders and modifies the qualities to liquidate more than necessary and prevent a second margin call. For more information, see how to handle Margin Calls .

Warmup Finished Event

public override void OnWarmupFinished()
{
    // Done warming up
}
def on_warmup_finished(self) -> None:
    pass # Done warming up

The OnWarmupFinished on_warmup_finished event handler is triggered after initialization and warm up is complete. This event signals that the initialization of the algorithm is complete.

For more information, see how to use Warm Up to prepare your algorithm.

End Of Algorithm Events

def on_end_of_algorithm(self) -> None:
    self.debug("Algorithm done")
public override void OnEndOfAlgorithm()
{
    Debug("Algorithm done");
}

The OnEndOfAlgorithm on_end_of_algorithm event handler is when the algorithm has finished executing as its final step. This is helpful for performing final analysis, or saving algorithm state.

Event Flow

When you deploy an algorithm, LEAN first calls the Initialize initialize method. In live mode, the engine loads your holdings and open orders from your brokerage account to add data subscriptions and populate the Securities securities , Portfolio portfolio , and Transactions transactions objects. LEAN receives the data from the subscriptions, synchronizes the data to create a timeslice , and then performs the following steps. Your algorithm can spend up to 10 minutes on each timeslice unless you call the Train train method.

  1. If it's a backtest, check if there are Scheduled Events in the past that didn't fire because there was no data between the previous slice and the current slice. LEAN automatically creates a Scheduled Event to call the OnEndOfDay on_end_of_day method at the end of each day.
  2. In live mode, Scheduled Events occur in a separate thread from the algorithm manager, so they run at the correct time.

  3. Update the algorithm time.
  4. Update the CurrentSlice current_slice .
  5. Pass the SymbolChangedEvents to the OnSymbolChangedEvents on_symbol_changed_events method.
  6. Cancel all open orders for securities that changed their ticker .
  7. Add a Security object to the Securities securities collection for each new security in the universe.
  8. Update the Security objects with the latest data.
  9. Update the Cash objects in the CashBook with the latest data.
  10. Process fill models for non-market orders.
  11. Submit market on open orders to liquidate Equity Option contracts if the underlying Equity has a split warning .
  12. Process margin calls .
  13. If it's time to settle unsettled cash , perform settlement.
  14. Call the OnSecuritiesChanged on_securities_changed method with the latest security changes.
  15. Apply dividends to the portfolio.
  16. For securities that have a split warning, update their portfolio holdings and adjust their open orders to account for the split.
  17. Update consolidators with the latest data.
  18. Pass custom data to the OnData on_data method.
  19. Pass the Dividends to the OnDividends on_dividends method.
  20. Pass the Splits to the OnSplits on_splits method.
  21. Pass the Delistings to the OnDelistings on_delistings method.
  22. Pass the Slice to the OnData on_data method.
  23. Perform universe selection .
  24. Pass the Slice to the Update update method of each Alpha model .
  25. Pass the Insight objects from the Alpha model to the Portfolio Construction model .
  26. Pass the PortfolioTarget objects from the Portfolio Construction model to each Risk Management model .
  27. Pass the risk-adjusted PortfolioTarget objects from the Risk Management models to the Execution model .

When your algorithm stops executing, LEAN calls the OnEndOfAlgorithm on_end_of_algorithm method .

 

Key Concepts

Python and LEAN

Introduction

The LEAN open-source package powers the core functionality of QuantConnect. Strategies plugin to LEAN to request data, and process trades. LEAN is written in C# and accessed in python with a defined API. Most of these interactions are using native python types, with a few key exceptions. To comfortably use LEAN you should learn to recognize error messages when you hit a non-native API, and how to convert back to a native type.

Enumerable Types

When LEAN returns an enumerable, the object should be converted to a list() to be easily read by python classes. Popular API methods which return an enumerable are shown below:

Historical Data

QuantConnect also provides methods to request historical data that return a pandas dataframe, or an enumerable. If loading a large amount of data using an enumerable streams the results reducing RAM usage.

The enumerable types might look like the MemoizingEnumerable that is a raw C# type accessible in python.



You can directly enumerate this object with standard python for loops, or to convert it to a native type, wrap the object in the list() :

Underlying Plugin Architecture

Your strategy code implements the QCAlgorithm class, which can communicate with the LEAN Engine. These method calls are done at the same speed as cython, directly invoking calls at the C layer of python. Your algorithm is imported as syntax checked, interpreted python.

 

Key Concepts

Duck Typing

Introduction

Duck typing is popular type system in Python. The language documentation defines duck typing as follows:

A programming style which does not look at an object's type to determine if it has the right interface; instead, the method or attribute is simply called or used (“If it looks like a duck and quacks like a duck, it must be a duck.”) By emphasizing interfaces rather than specific types, well-designed code improves its flexibility by allowing polymorphic substitution.

Duck-typing avoids tests using type() or isinstance() . (Note, however, that duck-typing can be complemented with abstract base classes .) Instead, it typically employs hasattr() tests or EAFP programming.


You cannot use duck-typing to add members to regular C# types.

You can use duck-typing to add attributes to all non-primitive types in Python

class Duck { }
var duck = new Duck();
duck.quacks = "Quack!"   // Yields a compilation error

dynamic duck = new Duck();
duck.quacks = "Quack!"   // Yields a runtime error
class Duck:
    pass

duck = Duck()
duck.quacks = "Quack!"
print(duck.quacks)

LEAN allows duck-typing in the Security type.

Custom Security Properties

You can add properties attributes to the Security object. For example, you can add an exponential moving average .

dynamic equity = AddEquity("SPY");
equity.ema = EMA(equity.Symbol, 10, Resolution.Daily);
equity = self.add_equity("SPY")
equity.ema = self.ema(equity.symbol, 10, Resolution.DAILY)

This feature is helpful because you can get the Security object from the Securities securities object.

var ema = (Securities["SPY"] as dynamic).ema.Current.Value;
ema = self.securities["SPY"].ema.current.value

Other Types

You can only add properties to the Security type.

You can add properties to all types. However, these properties live in the Python space, so you can't access them without a reference. The following example demonstrates that you can add an exponential moving average to the symbol attribute of a Security object.

equity = self.add_equity("SPY")
self._symbol = equity.symbol
self._symbol.ema = self.ema(self._symbol, 10)
ema = self._symbol.ema.current.value

ema = self.securities["SPY"].symbol.ema.current.value   # 'Symbol' object has no attribute 'time'

 

Key Concepts

Research Guide

Introduction

We aim to teach and inspire our community to create high-performing algorithmic trading strategies. We measure our success by the profits community members create through their live trading. As such, we try to build the best quantitative research techniques possible into the product to encourage a robust research process.

Hypothesis-Driven Research

We recommend you develop an algorithmic trading strategy based on a central hypothesis. You should develop an algorithm hypothesis at the start of your research and spend the remaining time exploring how to test your theory. If you find yourself deviating from your core theory or introducing code that isn't based around that hypothesis, you should stop and go back to thesis development.

Wang et al. (2014) illustrate the danger of creating your hypothesis based on test results. In their research, they examined the earnings yield factor in the technology sector over time. During 1998-1999, before the tech bubble burst, the factor was unprofitable. If you saw the results and then decided to bet against the factor during 2000-2002, you would have lost a lot of money because the factor performed extremely well during that time.

Hypothesis development is somewhat of an art and requires creativity and great observation skills. It is one of the most powerful skills a quant can learn. We recommend that an algorithm hypothesis follow the pattern of cause and effect. Your aim should be to express your strategy in the following sentence:

A change in {cause} leads to an {effect}.

To search for inspiration, consider causes from your own experience, intuition, or the media. Generally, causes of financial market movements fall into the following categories:

Consider the following examples:

Cause leads to Effect
Share class stocks are the same company, so any price divergence is irrational... A perfect pairs trade. Since they are the same company, the price will revert.
New stock addition to the S&P500 Index causes fund managers to buy up stock... An increase in the price of the new asset in the universe from buying pressure.
Increase in sunshine-hours increases the production of oranges... An increase in the supply of oranges, decreasing the price of Orange Juice Futures.
Allegations of fraud by the CEO causes investor faith in the stock to fall... A collapse of stock prices for the company as people panic.
FDA approval of a new drug opens up new markets for the pharmaceutical company... A jump in stock prices for the company.
Increasing federal interest rates restrict lending from banks, raising interest rates... Restricted REIT leverage and lower REIT ETF returns.

There are millions of potential alpha strategies to explore, each of them a candidate for an algorithm. Once you have chosen a strategy, we recommend exploring it for no more than 8-32 hours, depending on your coding ability.

Data Mining Driven Research

An alternative view is to follow any statistical anomaly without explaining it. In this case, you can use statistical techniques to identify the discontinuities and eliminate them when their edge is gone. Apparently, Renaissance Technologies has data mining models like this.

Overfitting

Overfitting occurs when you fine-tune the parameters of an algorithm to fit the detail and noise of backtesting data to the extent that it negatively impacts the performance of the algorithm on new data. The problem is that the parameters don't necessarily apply to new data and thus negatively impact the algorithm's ability to generalize and trade well in all market conditions. The following table shows ways that overfitting can manifest itself:

Data Practice Description
Data Dredging Performing many statistical tests on data and only paying attention to those that come back with significant results.
Hyper-Tuning Parameters Manually changing algorithm parameters to produce better results without altering the test data.
Overfit Regression Models Regression, machine learning, or other statistical models with too many variables will likely introduce overfitting to an algorithm.
Stale Testing Data Not changing the backtesting data set when testing the algorithm. Any improvements might not be able to be generalized to different datasets.

An algorithm that is dynamic and generalizes to new data is more valuable to funds and individual investors. It is more likely to survive across different market conditions and apply to new asset classes and markets.

If you have a collection of factors, you can backtest over a period of time to find the best-performing factors for the time period. If you then narrow the collection of factors to just the best-performing ones and backtest over the same period, the backtest will show great results. However, if you take the same best-performing factors and backtest them on an out-of-sample dataset, the performance will almost always underperform the in-sample period. To avoid issues with overfitting, follow these guidelines:

Look-ahead Bias

Look-ahead bias occurs when you use information from the future to inform decisions in the present. An example of look-ahead bias is using financial statement data to make trading decisions at the end of the reporting period instead of when the financial statement data was released. Another example is using updated financial statement data before the updated figures were actually available. Wang et al. (2014) show that using the date of when the period ends instead of when the data is actually available can increase the performance of the earnings yield factor by 60%.

Another culprit of look-ahead bias is adjusted price data. Splits and reverse splits can improve liquidity or attract certain investors, causing the performance of the stock to be different than without the split or reverse split. Wang et al (2014) build a portfolio using the 25 lowest priced stocks in the S&P index based on adjusted and non-adjusted prices. The portfolio based on adjusted prices greatly outperformed the one with raw prices in terms of return and Sharpe ratio . In this case, if you were to analyze the low price factor with adjusted prices, it would lead you to believe the factor is very informative, but it would not perform well out-of-sample with raw data.

Look-ahead bias can also occur if you set the universe to assets that have performed well during the backtest period or initialize indicators with values that have performed well during the backtest period. To avoid issues with look-ahead bias, trade a dynamic universe of assets and use point-in-time data. If point-in-time data is not available for the dataset you use, apply a reporting lag. Since the backtesting environment is event-driven and you can't pass the time frontier, it naturally helps to reduce the risk of look-ahead bias.

Survivorship Bias

Survivorship bias occurs when you test a strategy using only the securities that have survived to the end of the testing period and omit securities that have been delisted. If you use the current constituents of an index and backtest over the past, you'll most likely outperform the index because many of the underperformers have dropped out of the index over time and outperformers have been added to the index. In this case, the current constituent universe would consist of only outperformers. This technique is a form of look-ahead bias because if you were trading the strategy in real-time throughout the backtest period, you would not know the current index constituents until today.

If you analyze a dataset that has survivorship bias, you can discover results that are opposite of the true results. For example, Wang et al. (2014) analyze the low volatility factor using two universes. The first universe was the current S&P 500 constituents and the second universe was the point-in-time constituents. When they used the point-in-time constituents, the low volatility quintile outperformed the high volatility quintile. However, when they used the current constituents, the high volatility quintile significantly outperformed the low volatility quintile.

To avoid issues with survivorship bias, trade a dynamic universe of assets and use the datasets in the Dataset Market . We thoroughly vet the datasets we add to the market to ensure they're free of survivorship bias.

Outliers

Outliers in a dataset can have large impacts on how models train. In some cases, you may leave outliers in a dataset because they can contain useful information. In other cases, you may want to transform the data to handle the outlier data points. There are several common methods to handle outliers.

Winsorization Method

The winsorization method removes outliers at the $x$% of the extremes. For example, if you winsorize at 1%, it removes the 1% of data points with the lowest value and the 1% of data points with the highest value. This threshold percentage is subjective, so it can result in overfitting.

IQR Method

The interquartile range method removes data points that fall outside of the interval \([Q_1 - k (Q_3 - Q_1),\ Q_3 + k (Q_3 - Q_1)]\) for some constant \(k\ge 0\). This method can exclude up to 25% of observations on each side of the extremes. The interquartile range method doesn't work if the data is skewed or non-normal. Therefore, the disadvantage to this method is you need to review the factor distribution properties. If you need to, you can normalize the data with z-scores.

$$ Z = \frac{x - \mu}{\sigma} $$

Factor Ranking Method

The factor ranking method ranks the data values instead of taking their raw values. With this method, you don't need to remove any outlier data points. This method transforms the data into a uniform distribution. After converting the data to a uniform distribution, Wang et al. (2014) perform an inverse normal transformation to make the factor values normally distributed. Wang et al. found this ranking technique outperforms the z-score transformation, suggesting that the distance between factor scores doesn't add useful information.

Short Availability

To open a short position, you need to borrow shares from an investor or brokerage that owns them. Wang et al. (2014) show that some factors have a larger edge for long positions and some have a larger edge for short positions. Their research found that the factors that perform better on the short side usually target more securities that are on hard-to-borrow lists than factors that perform better on the long side. Their research also shows that a large part of the returns from these short-biased factors come from securities that are on hard-to-borrow lists. Therefore, if you don't account for short availability, your backtest results can be unrealistic and not reproducible in live trading.

To avoid issues with short availability, add a shortable provider to your algorithm. The shortable provider only lets you open a short trade if there are actually shares available to borrow. LEAN doesn't currently model the fees associated with short positions, but we have an open GitHub Issue to add the functionality. Subscribe to GitHub Issue #4563 to track the feature progress.

 

Key Concepts

Globals and Statics

Introduction

It is often convenient to access the QCAlgorithm API in classes outside of the QCAlgorithm class. To achieve this, pass an instance reference or access a global static variable. Whenever possible, we recommend using an instance reference to keep your global namespace clean.

API Access by Algorithm Instance

You can access the QCAlgorithm API by passing the self this object into a constructor of your target class. The class constructor receives it as a variable that you can use to initialize your algorithm as you need. The following algorithm demonstrates this process:

public class CustomPartialFillModelAlgorithm : QCAlgorithm
{
    private Symbol _spy;
    private SecurityHolding _holdings;
     
    public override void Initialize()
    {
        SetStartDate(2019, 1, 1);
        SetEndDate(2019, 3, 1);

        var equity = AddEquity("SPY", Resolution.Hour);
        _spy = equity.Symbol;
        _holdings = equity.Holdings;

        // Set the fill model with the instance of the algorithm
        equity.SetFillModel(new CustomPartialFillModel(this));
    }
     
    public override void OnData(Slice data)
    {
        var openOrders = Transactions.GetOpenOrders(_spy);
        if (openOrders.Count != 0) return;

        if (Time.Day > 10 && _holdings.Quantity <= 0)
        {
            MarketOrder(_spy, 105, true);
        }
        else if (Time.Day > 20 && _holdings.Quantity >= 0)
        {
            MarketOrder(_spy, -100, true);
        }
    }

    internal class CustomPartialFillModel : FillModel
    {
        private readonly QCAlgorithm _algorithm;
        private readonly Dictionary<int, decimal> _absoluteRemainingByOrderId = new();
     
        public CustomPartialFillModel(QCAlgorithm algorithm)
            : base()
        {
            _algorithm = algorithm;
        }
     
        public override OrderEvent MarketFill(Security asset, MarketOrder order)
        {
            if (!_absoluteRemainingByOrderId.TryGetValue(order.Id, out var absoluteRemaining))
            {
              absoluteRemaining = order.AbsoluteQuantity;
            }
     
            var fill = base.MarketFill(asset, order);
     
            fill.FillQuantity = Math.Sign(order.Quantity) * 10m;
            if (Math.Min(Math.Abs(fill.FillQuantity), absoluteRemaining) == absoluteRemaining)
            {
                fill.FillQuantity = Math.Sign(order.Quantity) * absoluteRemaining;
                fill.Status = OrderStatus.Filled;
                _absoluteRemainingByOrderId.Remove(order.Id);
            }
            else
            {
                fill.Status = OrderStatus.PartiallyFilled;
                _absoluteRemainingByOrderId[order.Id] = absoluteRemaining - Math.Abs(fill.FillQuantity);
                 var price = fill.FillPrice;

                // Use the instance of the algorithm to log the information
                _algorithm.Debug($"{_algorithm.Time} - Partial Fill - Remaining {_absoluteRemainingByOrderId[order.Id]} Price - {price}");
            }
            return fill;
        }
    }
}
class CustomPartialFillModelAlgorithm(QCAlgorithm):      
    def initialize(self):
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2019, 3, 1)

        equity = self.add_equity("SPY", Resolution.HOUR)
        self._spy = equity.symbol
        self._holdings = equity.holdings

        # Set the fill model with the instance of the algorithm
        equity.set_fill_model(CustomPartialFillModel(self))

    def on_data(self, data):
        open_orders = self.transactions.get_open_orders(self.spy)
        if len(open_orders) != 0: return

        if self.time.day > 10 and self._holdings.quantity <= 0:
            self.market_order(self._spy, 105, True)

        elif self.time.day > 20 and self._holdings.quantity >= 0:
            self.market_order(self._spy, -100, True)
      
class CustomPartialFillModel(FillModel):
    def __init__(self, algorithm):
        self._algorithm = algorithm
        self._absolute_remaining_by_order_id = {}

    def market_fill(self, asset, order):
        absolute_remaining = self._absolute_remaining_by_order_id.get(order.id, order.absolute_quantity)
        fill = super().market_fill(asset, order)
        fill.fill_quantity = np.sign(order.quantity) * 10
        if (min(abs(fill.fill_quantity), absolute_remaining) == absolute_remaining):
            fill.fill_quantity = np.sign(order.quantity) * absolute_remaining
            fill.status = OrderStatus.FILLED
            self._absolute_remaining_by_order_id.pop(order.id, None)
        else:
            fill.status = OrderStatus.PARTIALLY_FILLED
            self._absolute_remaining_by_order_id[order.id] = absolute_remaining - abs(fill.fill_quantity)
            price = fill.fill_price
            # Use the instance of the algorithm to log the information
            self._algorithm.debug(f"{self._algorithm.time} - Partial Fill - Remaining {self._absolute_remaining_by_order_id[order.id]} Price - {price}")
      
        return fill

API Access by Global Static Variable

Occasionally, passing the QCAlgorithm object to your class constructor is impossible, so you need to use global static variables to access the API for debugging and initialization purposes. The most common case is custom data implementations , where the LEAN Engine is creating the objects and you're unable to specify a custom constructor.

To create a global static variable, assign the reference to the global variable in the algorithm's Initialize initialize method. This assignment sets the active instance of the variable to the global static. Then, in your custom class, you can access the QCAlgorithm API through the global. The following algorithm demonstrates this process:

public class MyCustomDataTypeAlgorithm : QCAlgorithm
{
    public override void Initialize()
    {
        MyCustomDataType.ALGORITHM = this;
        var symbol = AddData<MyCustomDataType>("<name>", Resolution.Daily).Symbol;
    }
}

public class MyCustomDataType : BaseData
{
    public static QCAlgorithm ALGORITHM;

    public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
    {
        if (!char.IsDigit(line.Trim()[0]))
        {
            // Display the line with the header
            ALGORITHM.Debug($"HEADER: {line}");
            return null;
        }
        var data = line.Split(',');
        return new MyCustomDataType()
        {
            Time = DateTime.ParseExact(data[0], "yyyyMMdd", CultureInfo.InvariantCulture),
            EndTime = Time.AddDays(1),
            Symbol = config.Symbol,
            Value = data[1].IfNotNullOrEmpty(
                s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture)),
        };
    }
}
class MyAlgorithmInstance(QCAlgorithm):

    def initialize(self):
        self.set_cash(100000)
        self.set_start_date(1998, 1, 1)
        self.set_end_date(2014, 6, 1)
            
        # Assign self to Static Cape Variable.
        Cape.algorithm = self
        self.add_data(Cape, "CAPE")
    
    def on_data(self, data):
        self.plot("CAPE", "Value", data["CAPE"].value)
    
class Cape(PythonData):  
    def get_source(self, config, date, isLiveMode): 
        Cape.algorithm.debug("Test Static: GetSource")
        return SubscriptionDataSource("https://www.dropbox.com/scl/fi/mqbnfb7ll88nne7b8ymy7/CAPE.csv?rlkey=mnu0ax1d8lcj3gzkdw79z0pm8&dl=1", SubscriptionTransportMedium.REMOTE_FILE)
        
    def reader(self, config, line, date, isLiveMode):
        if not (line.strip() and line[0].isdigit()): return None 
        index = Cape()
        try: 
            data = line.split(',') 
            index.symbol = config.symbol
            index.time = datetime.strptime(data[0], "%Y-%m") 
            index.value = float(data[10])
        except ValueError: 
            Cape.algorithm.debug("Test Static 2: ValueError")
            return None 
        return index

 

Key Concepts

Libraries

Introduction

Libraries (or packages) are third-party software that you can use in your projects. You can use many of the available open-source libraries to complement the classes and methods that you create. Libraries reduce your development time because it's faster to use a pre-built, open-source library than to write the functionality. Libraries can be used in backtesting, research, and live trading. The environments support various libraries for machine learning, plotting, and data processing. As members often request new libraries, we frequently add new libraries to the underlying docker image that runs the Lean engine.

This feature is primarily for Python algorithms as not all Python libraries are compatible with each other. We've bundled together different sets of libraries into distinct environments. To use the libraries of an environment, set the environment in your project and add the relevant using import statement of a library at the top of your file.

Default Environment Libraries

The default environment supports the following libraries:

absl-py                                 2.1.0
accelerate                              0.30.1
adagio                                  0.2.4
aesara                                  2.9.3
aiohttp                                 3.9.5
aiosignal                               1.3.1
aiosqlite                               0.20.0
alembic                                 1.13.1
alibi-detect                            0.12.0
alphalens-reloaded                      0.4.3
altair                                  5.2.0
aniso8601                               9.0.1
annotated-types                         0.7.0
antlr4-python3-runtime                  4.9.3
anyio                                   4.4.0
appdirs                                 1.4.4
apricot-select                          0.6.1
arch                                    6.3.0
argon2-cffi                             23.1.0
argon2-cffi-bindings                    21.2.0
arrow                                   1.3.0
arviz                                   0.18.0
astropy                                 6.0.0
astropy-iers-data                       0.2024.6.3.0.31.14
asttokens                               2.4.1
astunparse                              1.6.3
async-lru                               2.0.4
attrs                                   23.2.0
Authlib                                 1.3.0
autograd                                1.6.2
autograd-gamma                          0.5.0
autokeras                               2.0.0
autoray                                 0.6.12
ax-platform                             0.3.7
Babel                                   2.15.0
bayesian-optimization                   1.4.3
beautifulsoup4                          4.12.3
bleach                                  6.1.0
blinker                                 1.8.2
blis                                    0.7.11
blosc2                                  2.6.2
bokeh                                   3.3.4
botorch                                 0.10.0
Bottleneck                              1.3.8
cachetools                              5.3.3
captum                                  0.7.0
catalogue                               2.0.10
catboost                                1.2.3
category-encoders                       2.6.3
causal-conv1d                           1.2.0.post2
chardet                                 5.2.0
check-shapes                            1.1.1
clarabel                                0.9.0
click                                   8.1.7
clikit                                  0.6.2
cloudpathlib                            0.16.0
cloudpickle                             3.0.0
cmdstanpy                               1.2.1
colorama                                0.4.6
colorcet                                3.1.0
colorlog                                6.8.2
colorlover                              0.3.0
colour                                  0.1.5
comm                                    0.2.2
confection                              0.1.5
cons                                    0.4.6
contourpy                               1.2.0
control                                 0.9.4
copulae                                 0.7.9
copulas                                 0.10.1
coreforecast                            0.0.9
cramjam                                 2.8.3
crashtest                               0.3.1
creme                                   0.6.1
cufflinks                               0.17.3
cvxopt                                  1.3.2
cvxpy                                   1.4.2
cycler                                  0.12.1
cymem                                   2.0.8
Cython                                  3.0.10
darts                                   0.28.0
dash                                    2.17.0
dash-core-components                    2.0.0
dash-cytoscape                          1.0.1
dash-html-components                    2.0.0
dash-table                              5.0.0
dask                                    2024.3.1
dask-expr                               1.0.5
dataclasses-json                        0.6.6
datasets                                2.17.1
deap                                    1.4.1
debugpy                                 1.6.7.post1
decorator                               5.1.1
deepmerge                               1.1.1
defusedxml                              0.7.1
Deprecated                              1.2.14
deprecation                             2.1.0
dgl                                     2.1.0
dill                                    0.3.8
dimod                                   0.12.14
dirtyjson                               1.0.8
diskcache                               5.6.3
distributed                             2024.3.1
dm-tree                                 0.1.8
docker                                  7.1.0
docutils                                0.20.1
DoubleML                                0.7.1
dropstackframe                          0.1.0
dtreeviz                                2.2.2
dtw-python                              1.3.1
dwave-cloud-client                      0.11.3
dwave-drivers                           0.4.4
dwave-greedy                            0.3.0
dwave-hybrid                            0.6.11
dwave-inspector                         0.4.4
dwave-inspectorapp                      0.3.1
dwave-neal                              0.6.0
dwave-networkx                          0.8.14
dwave-ocean-sdk                         6.9.0
dwave-preprocessing                     0.6.5
dwave-samplers                          1.2.0
dwave-system                            1.23.0
dwave-tabu                              0.5.0
dwavebinarycsp                          0.3.0
ecos                                    2.0.13
einops                                  0.7.0
EMD-signal                              1.6.0
empyrical-reloaded                      0.5.10
en-core-web-md                          3.7.1
en-core-web-sm                          3.7.1
entrypoints                             0.4
et-xmlfile                              1.1.0
etuples                                 0.3.9
exchange_calendars                      4.5.4
executing                               2.0.1
faiss-cpu                               1.8.0
Farama-Notifications                    0.0.4
fastai                                  2.7.14
fastai2                                 0.0.30
fastcore                                1.5.43
fastdownload                            0.0.7
fasteners                               0.19
fastjsonschema                          2.19.1
fastparquet                             2024.2.0
fastprogress                            1.0.3
fasttext                                0.9.2
feature-engine                          1.6.2
featuretools                            1.30.0
filelock                                3.14.0
findiff                                 0.10.0
FixedEffectModel                        0.0.5
FlagEmbedding                           1.2.10
FLAML                                   2.1.2
Flask                                   3.0.3
flatbuffers                             24.3.25
fonttools                               4.53.0
formulaic                               1.0.1
fqdn                                    1.5.1
frozendict                              2.4.4
frozenlist                              1.4.1
fs                                      2.4.16
fsspec                                  2023.10.0
fugue                                   0.9.0
functime                                0.9.5
future                                  1.0.0
fuzzy-c-means                           1.7.2
gast                                    0.5.4
gensim                                  4.3.2
gevent                                  24.2.1
gitdb                                   4.0.11
GitPython                               3.1.43
gluonts                                 0.14.4
google-pasta                            0.2.0
gpflow                                  2.9.1
gplearn                                 0.4.2
gpytorch                                1.11
graphene                                3.3
graphql-core                            3.2.3
graphql-relay                           3.2.0
graphviz                                0.20.1
greenlet                                3.0.3
grpcio                                  1.64.1
gunicorn                                21.2.0
gym                                     0.26.2
gym-notices                             0.0.8
gymnasium                               0.28.1
h11                                     0.14.0
h2o                                     3.46.0.1
h5netcdf                                1.3.0
h5py                                    3.11.0
hmmlearn                                0.3.2
holidays                                0.50
holoviews                               1.18.3
homebase                                1.0.1
hopcroftkarp                            1.2.5
html5lib                                1.1
httpcore                                1.0.5
httpstan                                4.12.0
httpx                                   0.27.0
huggingface-hub                         0.23.2
hurst                                   0.0.5
hvplot                                  0.9.2
hydra-core                              1.3.0
hyperopt                                0.2.7
ibm-cloud-sdk-core                      3.20.1
ibm-platform-services                   0.53.7
iisignature                             0.24
ijson                                   3.2.3
imageio                                 2.34.1
imbalanced-learn                        0.12.0
immutabledict                           4.2.0
importlib_metadata                      7.1.0
importlib_resources                     6.4.0
iniconfig                               2.0.0
injector                                0.21.0
interface-meta                          1.3.0
interpret                               0.5.1
interpret-core                          0.5.1
ipykernel                               6.29.4
ipython                                 8.25.0
ipywidgets                              8.1.2
isoduration                             20.11.0
itsdangerous                            2.2.0
jax                                     0.4.25
jax-jumpy                               1.0.0
jaxlib                                  0.4.25
jaxtyping                               0.2.29
jedi                                    0.19.1
Jinja2                                  3.1.4
joblib                                  1.3.2
json5                                   0.9.25
jsonpatch                               1.33
jsonpath-ng                             1.6.1
jsonpointer                             2.1
jsonschema                              4.21.1
jsonschema-specifications               2023.12.1
jupyter                                 1.0.0
jupyter-console                         6.6.3
jupyter-events                          0.10.0
jupyter-lsp                             2.2.5
jupyter-resource-usage                  1.0.2
jupyter_ai                              2.12.0
jupyter_ai_magics                       2.16.0
jupyter_bokeh                           4.0.0
jupyter_client                          8.6.2
jupyter_core                            5.7.2
jupyter_server                          2.14.1
jupyter_server_terminals                0.5.3
jupyterlab                              4.1.5
jupyterlab_pygments                     0.3.0
jupyterlab_server                       2.27.2
jupyterlab_widgets                      3.0.11
kagglehub                               0.2.5
kaleido                                 0.2.1
keras                                   3.3.3
keras-core                              0.1.7
keras-nlp                               0.12.1
keras-rl                                0.4.2
keras-tcn                               3.5.0
keras-tuner                             1.4.7
kiwisolver                              1.4.5
kmapper                                 2.0.1
korean-lunar-calendar                   0.3.1
kt-legacy                               1.0.5
langchain                               0.1.12
langchain-community                     0.0.38
langchain-core                          0.1.52
langchain-text-splitters                0.0.2
langcodes                               3.4.0
langsmith                               0.1.67
language_data                           1.2.0
lark                                    1.1.9
lazy_loader                             0.4
lazypredict-nightly                     0.3.0
libclang                                18.1.1
lifelines                               0.28.0
lightgbm                                4.3.0
lightning                               2.2.5
lightning-utilities                     0.11.2
lime                                    0.2.0.1
line-profiler                           4.1.2
linear-operator                         0.5.1
linkify-it-py                           2.0.3
livelossplot                            0.5.5
llama-index                             0.10.19
llama-index-agent-openai                0.1.7
llama-index-cli                         0.1.12
llama-index-core                        0.10.43
llama-index-embeddings-openai           0.1.10
llama-index-indices-managed-llama-cloud 0.1.6
llama-index-legacy                      0.9.48
llama-index-llms-openai                 0.1.22
llama-index-multi-modal-llms-openai     0.1.6
llama-index-program-openai              0.1.6
llama-index-question-gen-openai         0.1.3
llama-index-readers-file                0.1.23
llama-index-readers-llama-parse         0.1.4
llama-parse                             0.4.4
llamaindex-py-client                    0.1.19
llvmlite                                0.42.0
locket                                  1.0.0
logical-unification                     0.4.6
lxml                                    5.1.0
lz4                                     4.3.3
Mako                                    1.3.5
mamba-ssm                               1.2.0.post1
MAPIE                                   0.8.3
marisa-trie                             1.1.1
Markdown                                3.6
markdown-it-py                          3.0.0
MarkupSafe                              2.1.5
marshmallow                             3.21.2
matplotlib                              3.7.5
matplotlib-inline                       0.1.7
mdit-py-plugins                         0.4.1
mdurl                                   0.1.2
mgarch                                  0.3.0
miniKanren                              1.0.3
minorminer                              0.2.13
mistune                                 3.0.2
ml-dtypes                               0.3.2
mlflow                                  2.11.1
mlforecast                              0.12.0
mljar-supervised                        1.1.6
mlxtend                                 0.23.1
mmh3                                    2.5.1
modin                                   0.26.1
mplfinance                              0.12.10b0
mpmath                                  1.3.0
msgpack                                 1.0.8
multidict                               6.0.5
multipledispatch                        1.0.0
multiprocess                            0.70.16
multitasking                            0.0.11
murmurhash                              1.0.10
mypy-extensions                         1.0.0
namex                                   0.0.8
nbclient                                0.10.0
nbconvert                               7.16.4
nbformat                                5.10.4
ndindex                                 1.8
nest-asyncio                            1.6.0
networkx                                3.3
neural-tangents                         0.6.5
neuralprophet                           0.8.0
nfoursid                                1.0.1
ngboost                                 0.5.1
ninja                                   1.11.1.1
nltk                                    3.8.1
nolds                                   0.5.2
nose                                    1.3.7
notebook                                7.1.3
notebook_shim                           0.2.4
numba                                   0.59.0
numerapi                                2.18.0
numexpr                                 2.10.0
numpy                                   1.26.4
nvidia-cublas-cu12                      12.1.3.1
nvidia-cuda-cupti-cu12                  12.1.105
nvidia-cuda-nvrtc-cu12                  12.1.105
nvidia-cuda-runtime-cu12                12.1.105
nvidia-cudnn-cu12                       8.9.2.26
nvidia-cufft-cu12                       11.0.2.54
nvidia-curand-cu12                      10.3.2.106
nvidia-cusolver-cu12                    11.4.5.107
nvidia-cusparse-cu12                    12.1.0.106
nvidia-nccl-cu12                        2.19.3
nvidia-nvjitlink-cu12                   12.5.40
nvidia-nvtx-cu12                        12.1.105
oauthlib                                3.2.2
omegaconf                               2.3.0
openai                                  1.30.4
opencv-contrib-python-headless          4.9.0.80
opencv-python                           4.10.0.82
openpyxl                                3.1.2
opt-einsum                              3.3.0
optree                                  0.11.0
optuna                                  3.5.0
orjson                                  3.10.3
ortools                                 9.9.3963
osqp                                    0.6.7
overrides                               7.7.0
packaging                               23.2
pandas                                  2.1.4
pandas-flavor                           0.6.0
pandas-ta                               0.3.14b0
pandas_market_calendars                 4.4.0
pandocfilters                           1.5.1
panel                                   1.3.8
param                                   2.1.0
parso                                   0.8.4
partd                                   1.4.2
pastel                                  0.2.1
pathos                                  0.3.2
patsy                                   0.5.6
pbr                                     6.0.0
peewee                                  3.17.3
peft                                    0.11.1
penaltymodel                            1.1.0
PennyLane                               0.35.1
PennyLane-qiskit                        0.35.1
PennyLane_Lightning                     0.35.1
persim                                  0.3.5
pexpect                                 4.9.0
pgmpy                                   0.1.25
pillow                                  10.3.0
pingouin                                0.5.4
plotly                                  5.20.0
plotly-resampler                        0.10.0
plucky                                  0.4.3
pluggy                                  1.5.0
ply                                     3.11
pmdarima                                2.0.4
polars                                  0.20.15
pomegranate                             1.0.4
POT                                     0.9.3
pox                                     0.3.4
ppft                                    1.7.6.8
pprofile                                2.1.0
preshed                                 3.0.9
prometheus_client                       0.20.0
prompt_toolkit                          3.0.45
prophet                                 1.1.5
protobuf                                4.25.3
psutil                                  5.9.8
ptvsd                                   4.3.2
ptyprocess                              0.7.0
PuLP                                    2.8.0
pure-eval                               0.2.2
py-cpuinfo                              9.0.0
py-heat                                 0.0.6
py-heat-magic                           0.0.2
py-lets-be-rational                     1.0.1
py-vollib                               1.0.1
py4j                                    0.10.9.7
pyaml                                   24.4.0
pyarrow                                 15.0.1
pyarrow-hotfix                          0.6
pybind11                                2.12.0
pycaret                                 3.3.2
pydantic                                2.7.3
pydantic_core                           2.18.4
pydevd-pycharm                          231.9225.15
pydmd                                   1.0.0
pyerfa                                  2.0.1.4
pyfolio-reloaded                        0.9.5
Pygments                                2.18.0
PyJWT                                   2.8.0
pykalman                                0.9.7
pylev                                   1.4.0
pyluach                                 2.2.0
pymannkendall                           1.4.3
pymc                                    5.10.4
pymdptoolbox                            4.0b3
pynndescent                             0.5.12
pyod                                    2.0.0
Pyomo                                   6.7.1
pyparsing                               3.1.2
pypdf                                   4.2.0
pyportfolioopt                          1.5.5
pyre-extensions                         0.0.30
pyro-api                                0.1.2
pyro-ppl                                1.9.0
pysimdjson                              5.0.2
pyspnego                                0.10.2
pystan                                  3.9.0
pytensor                                2.18.6
pytest                                  8.2.1
python-dateutil                         2.9.0.post0
python-dotenv                           1.0.0
python-json-logger                      2.0.7
python-statemachine                     2.1.2
pytorch-ignite                          0.4.13
pytorch-lightning                       1.9.5
pytorch-tabnet                          4.1.0
pytz                                    2024.1
pyvinecopulib                           0.6.5
pyviz_comms                             3.0.2
PyWavelets                              1.5.0
PyYAML                                  6.0.1
pyzmq                                   26.0.3
qdldl                                   0.1.7.post2
qiskit                                  1.0.2
qiskit-aer                              0.14.2
qiskit-ibm-provider                     0.11.0
qiskit-ibm-runtime                      0.20.0
qtconsole                               5.5.2
QtPy                                    2.4.1
quadprog                                0.1.12
quantecon                               0.7.2
QuantLib                                1.33
QuantStats                              0.0.62
querystring-parser                      1.2.4
rauth                                   0.7.3
ray                                     2.9.3
Rbeast                                  0.1.19
rectangle-packer                        2.0.2
referencing                             0.35.1
regex                                   2024.5.15
requests-ntlm                           1.2.0
requests-oauthlib                       1.3.1
retrying                                1.3.4
rfc3339-validator                       0.1.4
rfc3986-validator                       0.1.1
rich                                    13.7.1
ripser                                  0.6.8
Riskfolio-Lib                           6.0.0
riskparityportfolio                     0.5.1
river                                   0.21.0
rpds-py                                 0.18.1
ruptures                                1.1.9
rustworkx                               0.14.2
safetensors                             0.4.3
SALib                                   1.5.0
schemdraw                               0.15
scikeras                                0.13.0
scikit-base                             0.7.8
scikit-image                            0.22.0
scikit-learn                            1.4.2
scikit-learn-extra                      0.3.0
scikit-optimize                         0.10.0
scikit-plot                             0.3.7
scikit-tda                              1.0.0
scipy                                   1.11.4
scs                                     3.2.4.post2
sdeint                                  0.3.0
seaborn                                 0.13.2
semantic-version                        2.10.0
Send2Trash                              1.8.3
sentence-transformers                   3.0.0
setuptools-scm                          8.1.0
shap                                    0.45.0
Shimmy                                  1.3.0
simplejson                              3.19.2
simpy                                   4.1.1
six                                     1.16.0
sklearn-json                            0.1.0
sktime                                  0.26.0
slicer                                  0.0.7
smart-open                              6.4.0
smmap                                   5.0.1
sniffio                                 1.3.1
sortedcontainers                        2.4.0
soupsieve                               2.5
spacy                                   3.7.4
spacy-legacy                            3.0.12
spacy-loggers                           1.0.5
SQLAlchemy                              2.0.30
sqlparse                                0.5.0
srsly                                   2.4.8
stable_baselines3                       2.3.2
stack-data                              0.6.3
stanio                                  0.3.0
statsforecast                           1.7.5
statsmodels                             0.14.1
stevedore                               5.2.0
stochastic                              0.6.0
stockstats                              0.6.2
stopit                                  1.1.2
striprtf                                0.0.26
stumpy                                  1.12.0
symengine                               0.11.0
sympy                                   1.12.1
ta                                      0.11.0
TA-Lib                                  0.4.28
tables                                  3.9.2
tabulate                                0.8.10
tadasets                                0.2.1
tbats                                   1.1.3
tblib                                   3.0.0
tenacity                                8.3.0
tensorboard                             2.16.2
tensorboard-data-server                 0.7.2
tensorboardX                            2.6.2.2
tensorflow                              2.16.1
tensorflow-addons                       0.23.0
tensorflow-io-gcs-filesystem            0.37.0
tensorflow-probability                  0.24.0
tensorflow-text                         2.16.1
tensorflow_decision_forests             1.9.0
tensorly                                0.8.1
tensorrt                                8.6.1.post1
tensorrt-bindings                       8.6.1
tensorrt-libs                           8.6.1
tensortrade                             1.0.3
termcolor                               2.4.0
terminado                               0.18.1
tf2jax                                  0.3.6
tf_keras                                2.16.0
thinc                                   8.2.3
threadpoolctl                           3.5.0
thundergbm                              0.3.17
tifffile                                2024.5.22
tiktoken                                0.7.0
tinycss2                                1.3.0
tokenizers                              0.19.1
toml                                    0.10.2
toolz                                   0.12.1
torch                                   2.2.1
torch-cluster                           1.6.3
torch-scatter                           2.1.2
torch-sparse                            0.6.18
torch-spline-conv                       1.2.2
torch_geometric                         2.5.1
torchdata                               0.7.1
torchmetrics                            1.4.0.post0
torchvision                             0.17.1
tornado                                 6.4
TPOT                                    0.12.2
tqdm                                    4.66.4
traitlets                               5.14.3
transformers                            4.40.2
triad                                   0.9.6
triton                                  2.2.0
tsdownsample                            0.1.3
tsfresh                                 0.20.2
tslearn                                 0.6.3
tweepy                                  4.14.0
typeguard                               2.13.3
typer                                   0.9.4
typer-config                            1.4.0
types-python-dateutil                   2.9.0.20240316
typing-inspect                          0.9.0
typing_extensions                       4.12.1
tzdata                                  2024.1
uc-micro-py                             1.0.3
umap-learn                              0.5.5
update-checker                          0.18.0
uri-template                            1.3.0
utilsforecast                           0.1.10
wasabi                                  1.1.3
wcwidth                                 0.2.13
weasel                                  0.3.4
webargs                                 8.4.0
webcolors                               1.13
webencodings                            0.5.1
websocket-client                        1.8.0
websockets                              12.0
Werkzeug                                3.0.1
widgetsnbextension                      4.0.11
window_ops                              0.0.15
woodwork                                0.31.0
wordcloud                               1.9.3
wrapt                                   1.16.0
wurlitzer                               3.1.0
x-transformers                          1.30.4
xarray                                  2024.2.0
xarray-einstats                         0.7.0
xgboost                                 2.0.3
xlrd                                    2.0.1
XlsxWriter                              3.2.0
xxhash                                  3.4.1
xyzservices                             2024.4.0
yarl                                    1.9.4
yellowbrick                             1.5
yfinance                                0.2.40
zict                                    3.0.0
zipp                                    3.19.1
zope.event                              5.0
zope.interface                          6.4.post2
Accord                               3.6.0
Accord.Fuzzy                         3.6.0
Accord.MachineLearning               3.6.0
Accord.Math                          3.6.0
Accord.Statistics                    3.6.0
CloneExtensions                      1.3.0
Common.Logging                       3.4.1
Common.Logging.Core                  3.4.1
CsvHelper                            19.0.0
Deedle                               2.1.0
DotNetZip                            1.16.0
DynamicInterop                       0.9.1
fasterflect                          3.0.0
MathNet.Numerics                     5.0.0
McMaster.Extensions.CommandLineUtils 2.6.0
Microsoft.IO.RecyclableMemoryStream  2.3.2
Microsoft.NET.Test.Sdk               16.9.4
Microsoft.TestPlatform.ObjectModel   16.9.4
Moq                                  4.16.1
NetMQ                                4.0.1.6
Newtonsoft.Json                      13.0.2
NodaTime                             3.0.5
NUnit                                3.13.3
NUnit3TestAdapter                    4.2.1
Plotly.NET                           3.0.1
Plotly.NET.Interactive               3.0.2
protobuf-net                         3.1.3
QLNet                                1.13.0
QuantConnect.pythonnet               2.0.38
RestSharp                            106.12.0
SharpZipLib                          1.3.3
System.ComponentModel.Composition    6.0.0

Autokeras Environment Libraries

This environment is only available for Python projects.

The Autokeras environment provides a backwards compatability environment for compatibility with Keras < 3 , Tensorflow 2.14.1 , and Pydantic . This environment supports the following libraries:

absl-py                                 2.1.0
accelerate                              0.30.1
adagio                                  0.2.4
aesara                                  2.9.3
aiohttp                                 3.9.5
aiosignal                               1.3.1
aiosqlite                               0.20.0
alibi-detect                            0.12.0
alphalens-reloaded                      0.4.3
altair                                  5.2.0
aniso8601                               9.0.1
annotated-types                         0.7.0
antlr4-python3-runtime                  4.9.3
anyio                                   4.4.0
appdirs                                 1.4.4
apricot-select                          0.6.1
arch                                    6.3.0
argon2-cffi                             23.1.0
argon2-cffi-bindings                    21.2.0
arrow                                   1.3.0
arviz                                   0.18.0
astropy                                 6.0.0
astropy-iers-data                       0.2024.6.3.0.31.14
asttokens                               2.4.1
astunparse                              1.6.3
async-generator                         1.10
async-lru                               2.0.4
Authlib                                 1.3.0
autograd                                1.6.2
autograd-gamma                          0.5.0
autokeras                               1.1.0
autoray                                 0.6.12
ax-platform                             0.3.7
Babel                                   2.15.0
bayesian-optimization                   1.4.3
beautifulsoup4                          4.12.3
bleach                                  6.1.0
blis                                    0.7.11
blosc2                                  2.6.2
bokeh                                   3.3.4
botorch                                 0.10.0
Bottleneck                              1.3.8
cachetools                              5.3.3
captum                                  0.7.0
catalogue                               2.0.10
catboost                                1.2.3
category-encoders                       2.6.3
causal-conv1d                           1.2.0.post2
certipy                                 0.1.3
chardet                                 5.2.0
check-shapes                            1.1.1
clarabel                                0.9.0
click                                   8.1.7
clikit                                  0.6.2
cloudpathlib                            0.16.0
cloudpickle                             3.0.0
clr-loader                              0.1.6
cmdstanpy                               1.2.1
colorama                                0.4.6
colorcet                                3.1.0
colorlog                                6.8.2
colorlover                              0.3.0
colour                                  0.1.5
comm                                    0.2.2
confection                              0.1.5
cons                                    0.4.6
contourpy                               1.2.0
control                                 0.9.4
copulae                                 0.7.9
copulas                                 0.10.1
coreforecast                            0.0.9
cramjam                                 2.8.3
crashtest                               0.3.1
creme                                   0.6.1
cufflinks                               0.17.3
cvxopt                                  1.3.2
cvxpy                                   1.4.2
cycler                                  0.12.1
cymem                                   2.0.8
Cython                                  3.0.9
darts                                   0.28.0
dash                                    2.17.0
dash-core-components                    2.0.0
dash-cytoscape                          1.0.1
dash-html-components                    2.0.0
dash-table                              5.0.0
dask                                    2024.3.1
dask-expr                               1.0.5
dataclasses-json                        0.6.6
datasets                                2.17.1
deap                                    1.4.1
debugpy                                 1.8.1
decorator                               5.1.1
deepmerge                               1.1.1
defusedxml                              0.7.1
Deprecated                              1.2.14
deprecation                             2.1.0
dgl                                     2.1.0
dill                                    0.3.8
dimod                                   0.12.14
dirtyjson                               1.0.8
diskcache                               5.6.3
distributed                             2024.3.1
dm-tree                                 0.1.8
docker                                  7.1.0
docutils                                0.20.1
DoubleML                                0.7.1
dropstackframe                          0.1.0
dtreeviz                                2.2.2
dtw-python                              1.3.1
dwave-cloud-client                      0.11.3
dwave-drivers                           0.4.4
dwave-greedy                            0.3.0
dwave-hybrid                            0.6.11
dwave-inspector                         0.4.4
dwave-inspectorapp                      0.3.1
dwave-neal                              0.6.0
dwave-networkx                          0.8.14
dwave-ocean-sdk                         6.9.0
dwave-preprocessing                     0.6.5
dwave-samplers                          1.2.0
dwave-system                            1.23.0
dwave-tabu                              0.5.0
dwavebinarycsp                          0.3.0
ecos                                    2.0.13
einops                                  0.7.0
EMD-signal                              1.6.0
empyrical-reloaded                      0.5.10
en-core-web-md                          3.7.1
en-core-web-sm                          3.7.1
et-xmlfile                              1.1.0
etuples                                 0.3.9
exchange_calendars                      4.5.4
executing                               2.0.1
faiss-cpu                               1.8.0
Farama-Notifications                    0.0.4
fastai                                  2.7.14
fastai2                                 0.0.30
fastcore                                1.5.43
fastdownload                            0.0.7
fasteners                               0.19
fastjsonschema                          2.19.1
fastparquet                             2024.2.0
fastprogress                            1.0.3
fasttext                                0.9.2
feature-engine                          1.6.2
featuretools                            1.30.0
filelock                                3.14.0
findiff                                 0.10.0
FixedEffectModel                        0.0.5
FlagEmbedding                           1.2.10
FLAML                                   2.1.2
Flask                                   3.0.3
flatbuffers                             24.3.25
fonttools                               4.53.0
formulaic                               1.0.1
fqdn                                    1.5.1
frozendict                              2.4.4
frozenlist                              1.4.1
fs                                      2.4.16
fsspec                                  2023.10.0
fugue                                   0.9.0
functime                                0.9.5
future                                  1.0.0
fuzzy-c-means                           1.7.2
gast                                    0.5.4
gensim                                  4.3.2
gevent                                  24.2.1
gitdb                                   4.0.11
GitPython                               3.1.43
gluonts                                 0.14.4
google-auth                             2.29.0
google-auth-oauthlib                    1.0.0
google-pasta                            0.2.0
gpflow                                  2.9.1
gplearn                                 0.4.2
gpytorch                                1.11
graphene                                3.3
graphql-core                            3.2.3
graphql-relay                           3.2.0
graphviz                                0.20.1
grpcio                                  1.64.1
gunicorn                                21.2.0
gym                                     0.26.2
gym-notices                             0.0.8
gymnasium                               0.28.1
h11                                     0.14.0
h2o                                     3.46.0.1
h5netcdf                                1.3.0
h5py                                    3.11.0
hmmlearn                                0.3.2
holidays                                0.50
holoviews                               1.18.3
homebase                                1.0.1
hopcroftkarp                            1.2.5
html5lib                                1.1
httpcore                                1.0.5
httpstan                                4.12.0
httpx                                   0.27.0
huggingface-hub                         0.23.2
hurst                                   0.0.5
hvplot                                  0.9.2
hydra-core                              1.3.0
hyperopt                                0.2.7
ibm-cloud-sdk-core                      3.20.1
ibm-platform-services                   0.53.7
iisignature                             0.24
ijson                                   3.2.3
imageio                                 2.34.1
imbalanced-learn                        0.12.0
immutabledict                           4.2.0
importlib-metadata                      4.13.0
iniconfig                               2.0.0
injector                                0.21.0
interface-meta                          1.3.0
interpret                               0.5.1
interpret-core                          0.5.1
ipykernel                               6.29.4
ipython                                 8.25.0
ipywidgets                              8.1.2
isoduration                             20.11.0
itsdangerous                            2.2.0
jax                                     0.4.25
jax-jumpy                               1.0.0
jaxlib                                  0.4.25
jaxtyping                               0.2.29
jedi                                    0.19.1
joblib                                  1.3.2
json5                                   0.9.25
jsonpatch                               1.33
jsonpath-ng                             1.6.1
jsonpointer                             2.1
jupyter                                 1.0.0
jupyter-console                         6.6.3
jupyter-events                          0.10.0
jupyter-lsp                             2.2.5
jupyter-resource-usage                  1.0.2
jupyter_ai                              2.12.0
jupyter_ai_magics                       2.16.0
jupyter_bokeh                           4.0.0
jupyter_client                          8.6.2
jupyter_core                            5.7.2
jupyter_server                          2.14.1
jupyter_server_terminals                0.5.3
jupyterlab                              4.1.5
jupyterlab_pygments                     0.3.0
jupyterlab_server                       2.27.2
jupyterlab_widgets                      3.0.11
kagglehub                               0.2.5
kaleido                                 0.2.1
keras                                   2.14.0
keras-core                              0.1.7
keras-nlp                               0.12.1
keras-rl                                0.4.2
keras-tcn                               3.5.0
keras-tuner                             1.4.7
kiwisolver                              1.4.5
kmapper                                 2.0.1
korean-lunar-calendar                   0.3.1
kt-legacy                               1.0.5
langchain                               0.1.12
langchain-community                     0.0.38
langchain-core                          0.1.52
langchain-text-splitters                0.0.2
langcodes                               3.4.0
langsmith                               0.1.67
language_data                           1.2.0
lark                                    1.1.9
lazy_loader                             0.4
lazypredict-nightly                     0.3.0
libclang                                18.1.1
lifelines                               0.28.0
lightgbm                                4.3.0
lightning                               2.2.5
lightning-utilities                     0.11.2
lime                                    0.2.0.1
line-profiler                           4.1.2
linear-operator                         0.5.1
linkify-it-py                           2.0.3
livelossplot                            0.5.5
llama-index                             0.10.19
llama-index-agent-openai                0.1.7
llama-index-cli                         0.1.12
llama-index-core                        0.10.43
llama-index-embeddings-openai           0.1.10
llama-index-indices-managed-llama-cloud 0.1.6
llama-index-legacy                      0.9.48
llama-index-llms-openai                 0.1.22
llama-index-multi-modal-llms-openai     0.1.6
llama-index-program-openai              0.1.6
llama-index-question-gen-openai         0.1.3
llama-index-readers-file                0.1.23
llama-index-readers-llama-parse         0.1.4
llama-parse                             0.4.4
llamaindex-py-client                    0.1.19
llvmlite                                0.42.0
locket                                  1.0.0
logical-unification                     0.4.6
lxml                                    5.1.0
lz4                                     4.3.3
mamba-ssm                               1.2.0.post1
MAPIE                                   0.8.3
marisa-trie                             1.1.1
Markdown                                3.6
markdown-it-py                          3.0.0
marshmallow                             3.21.2
matplotlib                              3.7.5
matplotlib-inline                       0.1.7
mdit-py-plugins                         0.4.1
mdurl                                   0.1.2
mgarch                                  0.3.0
miniKanren                              1.0.3
minorminer                              0.2.13
mistune                                 3.0.2
ml-dtypes                               0.2.0
mlflow                                  2.11.1
mlforecast                              0.12.0
mljar-supervised                        1.1.6
mlxtend                                 0.23.1
mmh3                                    2.5.1
modin                                   0.26.1
mplfinance                              0.12.10b0
mpmath                                  1.3.0
msgpack                                 1.0.8
multidict                               6.0.5
multipledispatch                        1.0.0
multiprocess                            0.70.16
multitasking                            0.0.11
murmurhash                              1.0.10
mypy-extensions                         1.0.0
namex                                   0.0.8
nbclient                                0.10.0
nbconvert                               7.16.4
nbformat                                5.10.4
ndindex                                 1.8
nest-asyncio                            1.6.0
networkx                                3.3
neural-tangents                         0.6.5
neuralprophet                           0.8.0
nfoursid                                1.0.1
ngboost                                 0.5.1
ninja                                   1.11.1.1
nixtlats                                0.2.0
nltk                                    3.8.1
nolds                                   0.5.2
nose                                    1.3.7
notebook                                7.1.3
notebook_shim                           0.2.4
numba                                   0.59.0
numerapi                                2.18.0
numexpr                                 2.10.0
numpy                                   1.26.4
nvidia-cublas-cu12                      12.5.2.13
nvidia-cuda-cupti-cu12                  12.1.105
nvidia-cuda-nvrtc-cu12                  12.1.105
nvidia-cuda-runtime-cu12                12.1.105
nvidia-cudnn-cu12                       8.9.2.26
nvidia-cufft-cu12                       11.0.2.54
nvidia-curand-cu12                      10.3.2.106
nvidia-cusolver-cu12                    11.4.5.107
nvidia-cusparse-cu12                    12.1.0.106
nvidia-nccl-cu12                        2.19.3
nvidia-nvjitlink-cu12                   12.5.40
nvidia-nvtx-cu12                        12.1.105
omegaconf                               2.3.0
openai                                  1.30.4
opencv-contrib-python-headless          4.9.0.80
opencv-python                           4.10.0.82
openpyxl                                3.1.2
opt-einsum                              3.3.0
optree                                  0.11.0
optuna                                  3.5.0
orjson                                  3.10.3
ortools                                 9.9.3963
osqp                                    0.6.7
overrides                               7.7.0
packaging                               23.2
pandas                                  2.1.4
pandas-flavor                           0.6.0
pandas-ta                               0.3.14b0
pandas_market_calendars                 4.4.0
pandocfilters                           1.5.1
panel                                   1.3.8
param                                   2.1.0
parso                                   0.8.4
partd                                   1.4.2
pastel                                  0.2.1
pathos                                  0.3.2
patsy                                   0.5.6
pbr                                     6.0.0
pearl                                   2.3.12
peewee                                  3.17.3
peft                                    0.11.1
penaltymodel                            1.1.0
PennyLane                               0.35.1
PennyLane-qiskit                        0.35.1
PennyLane_Lightning                     0.35.1
persim                                  0.3.5
pexpect                                 4.9.0
pgmpy                                   0.1.25
pillow                                  10.3.0
pingouin                                0.5.4
plotly                                  5.20.0
plotly-resampler                        0.10.0
plucky                                  0.4.3
pluggy                                  1.5.0
ply                                     3.11
pmdarima                                2.0.4
polars                                  0.20.15
pomegranate                             1.0.4
POT                                     0.9.3
pox                                     0.3.4
ppft                                    1.7.6.8
pprofile                                2.1.0
preshed                                 3.0.9
prompt_toolkit                          3.0.45
prophet                                 1.1.5
protobuf                                4.25.3
ptyprocess                              0.7.0
PuLP                                    2.8.0
pure-eval                               0.2.2
py-cpuinfo                              9.0.0
py-heat                                 0.0.6
py-heat-magic                           0.0.2
py-lets-be-rational                     1.0.1
py-vollib                               1.0.1
py4j                                    0.10.9.7
pyaml                                   24.4.0
pyarrow                                 15.0.1
pyarrow-hotfix                          0.6
pyasn1                                  0.6.0
pyasn1_modules                          0.4.0
pybind11                                2.12.0
pycaret                                 3.3.2
pycparser                               2.20
pydantic                                1.10.15
pydantic_core                           2.18.4
pydmd                                   1.0.0
pyerfa                                  2.0.1.4
pyfolio-reloaded                        0.9.5
Pygments                                2.18.0
pykalman                                0.9.7
pylev                                   1.4.0
pyluach                                 2.2.0
pymannkendall                           1.4.3
pymc                                    5.10.4
pymdptoolbox                            4.0b3
pynndescent                             0.5.12
pyod                                    2.0.0
Pyomo                                   6.7.1
pyparsing                               3.1.2
pypdf                                   4.2.0
pyportfolioopt                          1.5.5
pyre-extensions                         0.0.30
pyro-api                                0.1.2
pyro-ppl                                1.9.0
pysimdjson                              5.0.2
pyspnego                                0.10.2
pystan                                  3.9.0
pytensor                                2.18.6
pytest                                  8.2.1
python-dotenv                           1.0.0
python-statemachine                     2.1.2
pytorch-ignite                          0.4.13
pytorch-lightning                       1.9.5
pytorch-tabnet                          4.1.0
pytz                                    2024.1
pyvinecopulib                           0.6.5
pyviz_comms                             3.0.2
PyWavelets                              1.5.0
PyYAML                                  6.0.1
pyzmq                                   26.0.3
qdldl                                   0.1.7.post2
qiskit                                  1.0.2
qiskit-aer                              0.14.2
qiskit-ibm-provider                     0.11.0
qiskit-ibm-runtime                      0.20.0
qtconsole                               5.5.2
QtPy                                    2.4.1
quadprog                                0.1.12
quantconnect-stubs                      16467
quantecon                               0.7.2
QuantLib                                1.33
QuantStats                              0.0.62
querystring-parser                      1.2.4
rauth                                   0.7.3
ray                                     2.9.3
Rbeast                                  0.1.19
rectangle-packer                        2.0.2
regex                                   2024.5.15
requests-ntlm                           1.2.0
requests-oauthlib                       1.3.1
retrying                                1.3.4
rfc3339-validator                       0.1.4
rfc3986-validator                       0.1.1
rich                                    13.7.1
ripser                                  0.6.8
Riskfolio-Lib                           6.0.0
riskparityportfolio                     0.5.1
river                                   0.21.0
rsa                                     4.9
ruptures                                1.1.9
rustworkx                               0.14.2
safetensors                             0.4.3
SALib                                   1.5.0
schemdraw                               0.15
scikeras                                0.13.0
scikit-base                             0.7.8
scikit-image                            0.22.0
scikit-learn                            1.4.2
scikit-learn-extra                      0.3.0
scikit-optimize                         0.10.0
scikit-plot                             0.3.7
scikit-tda                              1.0.0
scipy                                   1.11.4
scs                                     3.2.4.post2
sdeint                                  0.3.0
seaborn                                 0.13.2
semantic-version                        2.10.0
Send2Trash                              1.8.3
sentence-transformers                   3.0.0
setuptools-scm                          8.1.0
shap                                    0.45.0
Shimmy                                  1.3.0
simplejson                              3.19.2
simpy                                   4.1.1
sklearn-json                            0.1.0
sktime                                  0.26.0
slicer                                  0.0.7
smart-open                              6.4.0
smmap                                   5.0.1
sniffio                                 1.3.1
sortedcontainers                        2.4.0
soupsieve                               2.5
spacy                                   3.7.4
spacy-legacy                            3.0.12
spacy-loggers                           1.0.5
sqlparse                                0.5.0
srsly                                   2.4.8
stable_baselines3                       2.3.2
stack-data                              0.6.3
stanio                                  0.3.0
statsforecast                           1.7.5
statsmodels                             0.14.1
stevedore                               5.2.0
stochastic                              0.6.0
stockstats                              0.6.2
stopit                                  1.1.2
striprtf                                0.0.26
stumpy                                  1.12.0
symengine                               0.11.0
sympy                                   1.12.1
ta                                      0.11.0
TA-Lib                                  0.4.28
tables                                  3.9.2
tabulate                                0.8.10
tadasets                                0.2.1
tbats                                   1.1.3
tblib                                   3.0.0
tenacity                                8.3.0
tensorboard                             2.14.1
tensorboard-data-server                 0.7.2
tensorboardX                            2.6.2.2
tensorflow                              2.14.1
tensorflow-addons                       0.23.0
tensorflow-estimator                    2.14.0
tensorflow-hub                          0.16.1
tensorflow-io-gcs-filesystem            0.37.0
tensorflow-probability                  0.24.0
tensorflow-ranking                      0.5.3
tensorflow-serving-api                  2.14.1
tensorflow-text                         2.14.0
tensorflow_decision_forests             1.9.0
tensorly                                0.8.1
tensorrt                                8.6.1.post1
tensorrt-bindings                       8.6.1
tensorrt-libs                           8.6.1
tensortrade                             1.0.3
termcolor                               2.4.0
terminado                               0.18.1
tf-keras                                2.15.0
tf2jax                                  0.3.6
thinc                                   8.2.3
threadpoolctl                           3.5.0
thundergbm                              0.3.17
tifffile                                2024.5.22
tiktoken                                0.7.0
tinycss2                                1.3.0
tokenizers                              0.19.1
toml                                    0.10.2
toolz                                   0.12.1
torch                                   2.2.1
torch-cluster                           1.6.3
torch-scatter                           2.1.2
torch-sparse                            0.6.18
torch-spline-conv                       1.2.2
torch_geometric                         2.5.1
torchdata                               0.7.1
torchmetrics                            1.4.0.post0
torchvision                             0.17.1
TPOT                                    0.12.2
tqdm                                    4.66.4
transformers                            4.40.2
triad                                   0.9.6
triton                                  2.2.0
tsdownsample                            0.1.3
tsfresh                                 0.20.2
tslearn                                 0.6.3
tweepy                                  4.14.0
typeguard                               2.13.3
typer                                   0.9.4
typer-config                            1.4.0
types-python-dateutil                   2.9.0.20240316
typing-inspect                          0.9.0
tzdata                                  2024.1
uc-micro-py                             1.0.3
umap-learn                              0.5.5
update-checker                          0.18.0
uri-template                            1.3.0
utilsforecast                           0.1.10
wasabi                                  1.1.3
wcwidth                                 0.2.13
weasel                                  0.3.4
webargs                                 8.4.0
webcolors                               1.13
webencodings                            0.5.1
websocket-client                        1.8.0
websockets                              12.0
Werkzeug                                3.0.1
widgetsnbextension                      4.0.11
window_ops                              0.0.15
woodwork                                0.31.0
wordcloud                               1.9.3
wrapt                                   1.14.1
wurlitzer                               3.1.0
x-transformers                          1.30.4
xarray                                  2024.2.0
xarray-einstats                         0.7.0
xgboost                                 2.0.3
xlrd                                    2.0.1
XlsxWriter                              3.2.0
xxhash                                  3.4.1
xyzservices                             2024.4.0
yarl                                    1.9.4
yellowbrick                             1.5
yfinance                                0.2.40
zict                                    3.0.0
zope.event                              5.0
zope.interface                          6.4.post2

Autogluon Environment Libraries

This environment is only available for Python.

The Autogluon environment provides the following libraries:

absl-py                                 2.1.0
accelerate                              0.21.0
adagio                                  0.2.4
aesara                                  2.9.3
aiohttp                                 3.9.5
aiohttp-cors                            0.7.0
aiosignal                               1.3.1
aiosqlite                               0.20.0
alibi-detect                            0.12.0
aliyun-python-sdk-core                  2.15.1
aliyun-python-sdk-kms                   2.16.3
alphalens-reloaded                      0.4.3
altair                                  5.2.0
aniso8601                               9.0.1
annotated-types                         0.7.0
antlr4-python3-runtime                  4.9.3
anyio                                   4.4.0
appdirs                                 1.4.4
apricot-select                          0.6.1
arch                                    6.3.0
argon2-cffi                             23.1.0
argon2-cffi-bindings                    21.2.0
arrow                                   1.3.0
arviz                                   0.18.0
astropy                                 6.0.0
astropy-iers-data                       0.2024.6.3.0.31.14
asttokens                               2.4.1
astunparse                              1.6.3
async-generator                         1.10
async-lru                               2.0.4
Authlib                                 1.3.0
autogluon                               1.1.0
autogluon.common                        1.1.0
autogluon.core                          1.1.0
autogluon.features                      1.1.0
autogluon.multimodal                    1.1.0
autogluon.tabular                       1.1.0
autogluon.timeseries                    1.1.0
autograd                                1.6.2
autograd-gamma                          0.5.0
autokeras                               2.0.0
autoray                                 0.6.12
ax-platform                             0.3.7
Babel                                   2.15.0
bayesian-optimization                   1.4.3
beautifulsoup4                          4.12.3
bleach                                  6.1.0
blis                                    0.7.11
blosc2                                  2.6.2
bokeh                                   3.3.4
boto3                                   1.34.118
botocore                                1.34.118
botorch                                 0.10.0
Bottleneck                              1.3.8
cachetools                              5.3.3
captum                                  0.7.0
catalogue                               2.0.10
catboost                                1.2.3
category-encoders                       2.6.3
causal-conv1d                           1.2.0.post2
certipy                                 0.1.3
chardet                                 5.2.0
check-shapes                            1.1.1
clarabel                                0.9.0
click                                   8.1.7
clikit                                  0.6.2
cloudpathlib                            0.16.0
cloudpickle                             3.0.0
clr-loader                              0.1.6
cmdstanpy                               1.2.1
colorama                                0.4.6
colorcet                                3.1.0
coloredlogs                             15.0.1
colorful                                0.5.6
colorlog                                6.8.2
colorlover                              0.3.0
colour                                  0.1.5
comm                                    0.2.2
confection                              0.1.5
cons                                    0.4.6
contourpy                               1.2.0
control                                 0.9.4
copulae                                 0.7.9
copulas                                 0.10.1
coreforecast                            0.0.9
cramjam                                 2.8.3
crashtest                               0.3.1
crcmod                                  1.7
creme                                   0.6.1
cufflinks                               0.17.3
cvxopt                                  1.3.2
cvxpy                                   1.4.2
cycler                                  0.12.1
cymem                                   2.0.8
Cython                                  3.0.9
darts                                   0.28.0
dash                                    2.17.0
dash-core-components                    2.0.0
dash-cytoscape                          1.0.1
dash-html-components                    2.0.0
dash-table                              5.0.0
dask                                    2024.3.1
dask-expr                               1.0.5
dataclasses-json                        0.6.6
datasets                                2.17.1
deap                                    1.4.1
debugpy                                 1.8.1
decorator                               5.1.1
deepmerge                               1.1.1
defusedxml                              0.7.1
Deprecated                              1.2.14
deprecation                             2.1.0
dgl                                     2.1.0
dill                                    0.3.8
dimod                                   0.12.14
dirtyjson                               1.0.8
diskcache                               5.6.3
distlib                                 0.3.8
distributed                             2024.3.1
dm-tree                                 0.1.8
docker                                  7.1.0
docutils                                0.20.1
DoubleML                                0.7.1
dropstackframe                          0.1.0
dtreeviz                                2.2.2
dtw-python                              1.3.1
dwave-cloud-client                      0.11.3
dwave-drivers                           0.4.4
dwave-greedy                            0.3.0
dwave-hybrid                            0.6.11
dwave-inspector                         0.4.4
dwave-inspectorapp                      0.3.1
dwave-neal                              0.6.0
dwave-networkx                          0.8.14
dwave-ocean-sdk                         6.9.0
dwave-preprocessing                     0.6.5
dwave-samplers                          1.2.0
dwave-system                            1.23.0
dwave-tabu                              0.5.0
dwavebinarycsp                          0.3.0
ecos                                    2.0.13
einops                                  0.7.0
EMD-signal                              1.6.0
empyrical-reloaded                      0.5.10
en-core-web-md                          3.7.1
en-core-web-sm                          3.7.1
et-xmlfile                              1.1.0
etuples                                 0.3.9
evaluate                                0.4.2
exchange_calendars                      4.5.4
executing                               2.0.1
faiss-cpu                               1.8.0
Farama-Notifications                    0.0.4
fastai                                  2.7.14
fastai2                                 0.0.30
fastcore                                1.5.43
fastdownload                            0.0.7
fasteners                               0.19
fastjsonschema                          2.19.1
fastparquet                             2024.2.0
fastprogress                            1.0.3
fasttext                                0.9.2
feature-engine                          1.6.2
featuretools                            1.30.0
filelock                                3.14.0
findiff                                 0.10.0
FixedEffectModel                        0.0.5
FlagEmbedding                           1.2.10
FLAML                                   2.1.2
Flask                                   3.0.3
flatbuffers                             24.3.25
fonttools                               4.53.0
formulaic                               1.0.1
fqdn                                    1.5.1
frozendict                              2.4.4
frozenlist                              1.4.1
fs                                      2.4.16
fsspec                                  2023.10.0
fugue                                   0.9.0
functime                                0.9.5
future                                  1.0.0
fuzzy-c-means                           1.7.2
gast                                    0.5.4
gdown                                   5.2.0
gensim                                  4.3.2
gevent                                  24.2.1
gitdb                                   4.0.11
GitPython                               3.1.43
gluonts                                 0.14.3
google-api-core                         2.19.0
google-auth                             2.29.0
google-pasta                            0.2.0
googleapis-common-protos                1.63.1
gpflow                                  2.9.1
gplearn                                 0.4.2
gpytorch                                1.11
graphene                                3.3
graphql-core                            3.2.3
graphql-relay                           3.2.0
graphviz                                0.20.1
grpcio                                  1.64.1
gunicorn                                21.2.0
gym                                     0.26.2
gym-notices                             0.0.8
gymnasium                               0.28.1
h11                                     0.14.0
h2o                                     3.46.0.1
h5netcdf                                1.3.0
h5py                                    3.11.0
hmmlearn                                0.3.2
holidays                                0.50
holoviews                               1.18.3
homebase                                1.0.1
hopcroftkarp                            1.2.5
html5lib                                1.1
httpcore                                1.0.5
httpstan                                4.12.0
httpx                                   0.27.0
huggingface-hub                         0.23.2
humanfriendly                           10.0
hurst                                   0.0.5
hvplot                                  0.9.2
hydra-core                              1.3.0
hyperopt                                0.2.7
ibm-cloud-sdk-core                      3.20.1
ibm-platform-services                   0.53.7
iisignature                             0.24
ijson                                   3.2.3
imageio                                 2.34.1
imbalanced-learn                        0.12.0
immutabledict                           4.2.0
iniconfig                               2.0.0
injector                                0.21.0
interface-meta                          1.3.0
interpret                               0.5.1
interpret-core                          0.5.1
ipykernel                               6.29.4
ipython                                 8.25.0
ipywidgets                              8.1.2
isoduration                             20.11.0
itsdangerous                            2.2.0
jax                                     0.4.25
jax-jumpy                               1.0.0
jaxlib                                  0.4.25
jaxtyping                               0.2.29
jedi                                    0.19.1
jmespath                                0.10.0
joblib                                  1.3.2
json5                                   0.9.25
jsonpatch                               1.33
jsonpath-ng                             1.6.1
jsonpointer                             2.1
jupyter                                 1.0.0
jupyter-console                         6.6.3
jupyter-events                          0.10.0
jupyter-lsp                             2.2.5
jupyter-resource-usage                  1.0.2
jupyter_ai                              2.12.0
jupyter_ai_magics                       2.16.0
jupyter_bokeh                           4.0.0
jupyter_client                          8.6.2
jupyter_core                            5.7.2
jupyter_server                          2.14.1
jupyter_server_terminals                0.5.3
jupyterlab                              4.1.5
jupyterlab_pygments                     0.3.0
jupyterlab_server                       2.27.2
jupyterlab_widgets                      3.0.11
kagglehub                               0.2.5
kaleido                                 0.2.1
keras                                   3.3.3
keras-core                              0.1.7
keras-nlp                               0.12.1
keras-rl                                0.4.2
keras-tcn                               3.5.0
keras-tuner                             1.4.7
kiwisolver                              1.4.5
kmapper                                 2.0.1
korean-lunar-calendar                   0.3.1
kt-legacy                               1.0.5
langchain                               0.1.12
langchain-community                     0.0.38
langchain-core                          0.1.52
langchain-text-splitters                0.0.2
langcodes                               3.4.0
langsmith                               0.1.67
language_data                           1.2.0
lark                                    1.1.9
lazy_loader                             0.4
lazypredict-nightly                     0.3.0
libclang                                18.1.1
lifelines                               0.28.0
lightgbm                                4.3.0
lightning                               2.1.4
lightning-utilities                     0.11.2
lime                                    0.2.0.1
line-profiler                           4.1.2
linear-operator                         0.5.1
linkify-it-py                           2.0.3
livelossplot                            0.5.5
llama-index                             0.10.19
llama-index-agent-openai                0.1.7
llama-index-cli                         0.1.12
llama-index-core                        0.10.43
llama-index-embeddings-openai           0.1.10
llama-index-indices-managed-llama-cloud 0.1.6
llama-index-legacy                      0.9.48
llama-index-llms-openai                 0.1.22
llama-index-multi-modal-llms-openai     0.1.6
llama-index-program-openai              0.1.6
llama-index-question-gen-openai         0.1.3
llama-index-readers-file                0.1.23
llama-index-readers-llama-parse         0.1.4
llama-parse                             0.4.4
llamaindex-py-client                    0.1.19
llvmlite                                0.42.0
locket                                  1.0.0
logical-unification                     0.4.6
lxml                                    5.1.0
lz4                                     4.3.3
mamba-ssm                               1.2.0.post1
MAPIE                                   0.8.3
marisa-trie                             1.1.1
Markdown                                3.6
markdown-it-py                          3.0.0
marshmallow                             3.21.2
matplotlib                              3.7.5
matplotlib-inline                       0.1.7
mdit-py-plugins                         0.4.1
mdurl                                   0.1.2
mgarch                                  0.3.0
miniKanren                              1.0.3
minorminer                              0.2.13
mistune                                 3.0.2
ml-dtypes                               0.3.2
mlflow                                  2.11.1
mlforecast                              0.10.0
mljar-supervised                        1.1.6
mlxtend                                 0.23.1
mmh3                                    2.5.1
model-index                             0.1.11
modin                                   0.26.1
mplfinance                              0.12.10b0
mpmath                                  1.3.0
msgpack                                 1.0.8
multidict                               6.0.5
multipledispatch                        1.0.0
multiprocess                            0.70.16
multitasking                            0.0.11
murmurhash                              1.0.10
mypy-extensions                         1.0.0
namex                                   0.0.8
nbclient                                0.10.0
nbconvert                               7.16.4
nbformat                                5.10.4
ndindex                                 1.8
nest-asyncio                            1.6.0
networkx                                3.3
neural-tangents                         0.6.5
neuralprophet                           0.8.0
nfoursid                                1.0.1
ngboost                                 0.5.1
ninja                                   1.11.1.1
nlpaug                                  1.1.11
nltk                                    3.8.1
nolds                                   0.5.2
nose                                    1.3.7
notebook                                7.1.3
notebook_shim                           0.2.4
nptyping                                2.4.1
numba                                   0.59.0
numerapi                                2.18.0
numexpr                                 2.10.0
numpy                                   1.26.4
nvidia-cublas-cu12                      12.5.2.13
nvidia-cuda-cupti-cu12                  12.1.105
nvidia-cuda-nvrtc-cu12                  12.1.105
nvidia-cuda-runtime-cu12                12.1.105
nvidia-cudnn-cu12                       8.9.2.26
nvidia-cufft-cu12                       11.0.2.54
nvidia-curand-cu12                      10.3.2.106
nvidia-cusolver-cu12                    11.4.5.107
nvidia-cusparse-cu12                    12.1.0.106
nvidia-ml-py3                           7.352.0
nvidia-nccl-cu12                        2.18.1
nvidia-nvjitlink-cu12                   12.5.40
nvidia-nvtx-cu12                        12.1.105
omegaconf                               2.2.3
onnx                                    1.16.1
onnxruntime                             1.18.0
openai                                  1.30.4
opencensus                              0.11.4
opencensus-context                      0.1.3
opencv-contrib-python-headless          4.9.0.80
opencv-python                           4.10.0.82
opendatalab                             0.0.10
openmim                                 0.3.9
openpyxl                                3.1.2
openxlab                                0.1.0
opt-einsum                              3.3.0
optimum                                 1.18.1
optree                                  0.11.0
optuna                                  3.5.0
ordered-set                             4.1.0
orjson                                  3.10.3
ortools                                 9.9.3963
osqp                                    0.6.7
oss2                                    2.17.0
overrides                               7.7.0
packaging                               24.0
pandas                                  2.1.4
pandas-flavor                           0.6.0
pandas-ta                               0.3.14b0
pandas_market_calendars                 4.4.0
pandocfilters                           1.5.1
panel                                   1.3.8
param                                   2.1.0
parso                                   0.8.4
partd                                   1.4.2
pastel                                  0.2.1
pathos                                  0.3.2
patsy                                   0.5.6
pbr                                     6.0.0
pdf2image                               1.17.0
peewee                                  3.17.3
peft                                    0.11.1
penaltymodel                            1.1.0
PennyLane                               0.35.1
PennyLane-qiskit                        0.35.1
PennyLane_Lightning                     0.35.1
persim                                  0.3.5
pexpect                                 4.9.0
pgmpy                                   0.1.25
pillow                                  10.3.0
pingouin                                0.5.4
plotly                                  5.20.0
plotly-resampler                        0.10.0
plucky                                  0.4.3
pluggy                                  1.5.0
ply                                     3.11
pmdarima                                2.0.4
polars                                  0.20.15
pomegranate                             1.0.4
POT                                     0.9.3
pox                                     0.3.4
ppft                                    1.7.6.8
pprofile                                2.1.0
preshed                                 3.0.9
prompt_toolkit                          3.0.45
prophet                                 1.1.5
proto-plus                              1.23.0
protobuf                                4.25.3
ptyprocess                              0.7.0
PuLP                                    2.8.0
pure-eval                               0.2.2
py-cpuinfo                              9.0.0
py-heat                                 0.0.6
py-heat-magic                           0.0.2
py-lets-be-rational                     1.0.1
py-spy                                  0.3.14
py-vollib                               1.0.1
py4j                                    0.10.9.7
pyaml                                   24.4.0
pyarrow                                 15.0.1
pyarrow-hotfix                          0.6
pyasn1                                  0.6.0
pyasn1_modules                          0.4.0
pybind11                                2.12.0
pycaret                                 3.3.2
pycparser                               2.20
pycryptodome                            3.20.0
pydantic                                2.7.3
pydantic_core                           2.18.4
pydmd                                   1.0.0
pyerfa                                  2.0.1.4
pyfolio-reloaded                        0.9.5
Pygments                                2.18.0
pykalman                                0.9.7
pylev                                   1.4.0
pyluach                                 2.2.0
pymannkendall                           1.4.3
pymc                                    5.10.4
pymdptoolbox                            4.0b3
pynndescent                             0.5.12
pyod                                    2.0.0
Pyomo                                   6.7.1
pyparsing                               3.1.2
pypdf                                   4.2.0
pyportfolioopt                          1.5.5
pyre-extensions                         0.0.30
pyro-api                                0.1.2
pyro-ppl                                1.9.0
pysimdjson                              5.0.2
pyspnego                                0.10.2
pystan                                  3.9.0
pytensor                                2.18.6
pytesseract                             0.3.10
pytest                                  8.2.1
python-dotenv                           1.0.0
python-statemachine                     2.1.2
pytorch-ignite                          0.4.13
pytorch-lightning                       2.1.4
pytorch-metric-learning                 2.3.0
pytorch-tabnet                          4.1.0
pytz                                    2023.4
pyvinecopulib                           0.6.5
pyviz_comms                             3.0.2
PyWavelets                              1.5.0
PyYAML                                  6.0.1
pyzmq                                   26.0.3
qdldl                                   0.1.7.post2
qiskit                                  1.0.2
qiskit-aer                              0.14.2
qiskit-ibm-provider                     0.11.0
qiskit-ibm-runtime                      0.20.0
qtconsole                               5.5.2
QtPy                                    2.4.1
quadprog                                0.1.12
quantconnect-stubs                      16467
quantecon                               0.7.2
QuantLib                                1.33
QuantStats                              0.0.62
querystring-parser                      1.2.4
rauth                                   0.7.3
ray                                     2.10.0
Rbeast                                  0.1.19
rectangle-packer                        2.0.2
regex                                   2024.5.15
requests                                2.28.2
requests-ntlm                           1.2.0
requests-oauthlib                       1.3.1
retrying                                1.3.4
rfc3339-validator                       0.1.4
rfc3986-validator                       0.1.1
rich                                    13.4.2
ripser                                  0.6.8
Riskfolio-Lib                           6.0.0
riskparityportfolio                     0.5.1
river                                   0.21.0
rsa                                     4.9
ruptures                                1.1.9
rustworkx                               0.14.2
s3transfer                              0.10.1
safetensors                             0.4.3
SALib                                   1.5.0
schemdraw                               0.15
scikeras                                0.13.0
scikit-base                             0.7.8
scikit-image                            0.20.0
scikit-learn                            1.4.0
scikit-learn-extra                      0.3.0
scikit-optimize                         0.10.0
scikit-plot                             0.3.7
scikit-tda                              1.0.0
scipy                                   1.11.4
scs                                     3.2.4.post2
sdeint                                  0.3.0
seaborn                                 0.13.2
semantic-version                        2.10.0
Send2Trash                              1.8.3
sentence-transformers                   3.0.0
sentencepiece                           0.2.0
seqeval                                 1.2.2
setuptools-scm                          8.1.0
shap                                    0.45.0
Shimmy                                  1.3.0
simplejson                              3.19.2
simpy                                   4.1.1
sklearn-json                            0.1.0
sktime                                  0.26.0
slicer                                  0.0.7
smart-open                              6.4.0
smmap                                   5.0.1
sniffio                                 1.3.1
sortedcontainers                        2.4.0
soupsieve                               2.5
spacy                                   3.7.4
spacy-legacy                            3.0.12
spacy-loggers                           1.0.5
sqlparse                                0.5.0
srsly                                   2.4.8
stable_baselines3                       2.3.2
stack-data                              0.6.3
stanio                                  0.3.0
statsforecast                           1.4.0
statsmodels                             0.14.1
stevedore                               5.2.0
stochastic                              0.6.0
stockstats                              0.6.2
stopit                                  1.1.2
striprtf                                0.0.26
stumpy                                  1.12.0
symengine                               0.11.0
sympy                                   1.12.1
ta                                      0.11.0
TA-Lib                                  0.4.28
tables                                  3.9.2
tabulate                                0.8.10
tadasets                                0.2.1
tbats                                   1.1.3
tblib                                   3.0.0
tenacity                                8.3.0
tensorboard                             2.16.2
tensorboard-data-server                 0.7.2
tensorboardX                            2.6.2.2
tensorflow                              2.16.1
tensorflow-addons                       0.23.0
tensorflow-io-gcs-filesystem            0.37.0
tensorflow-probability                  0.24.0
tensorflow-text                         2.16.1
tensorflow_decision_forests             1.9.0
tensorly                                0.8.1
tensorrt                                8.6.1.post1
tensorrt-bindings                       8.6.1
tensorrt-libs                           8.6.1
tensortrade                             1.0.3
termcolor                               2.4.0
terminado                               0.18.1
text-unidecode                          1.3
tf2jax                                  0.3.6
tf_keras                                2.16.0
thinc                                   8.2.3
threadpoolctl                           3.5.0
thundergbm                              0.3.17
tifffile                                2024.5.22
tiktoken                                0.7.0
timm                                    0.9.16
tinycss2                                1.3.0
tokenizers                              0.15.2
toml                                    0.10.2
toolz                                   0.12.1
torch                                   2.1.2
torch-cluster                           1.6.3
torch-scatter                           2.1.2
torch-sparse                            0.6.18
torch-spline-conv                       1.2.2
torch_geometric                         2.5.1
torchdata                               0.7.1
torchmetrics                            1.2.1
torchvision                             0.16.2
TPOT                                    0.12.2
tqdm                                    4.65.2
transformers                            4.38.2
triad                                   0.9.6
triton                                  2.1.0
tsdownsample                            0.1.3
tsfresh                                 0.20.2
tslearn                                 0.6.3
tweepy                                  4.14.0
typeguard                               2.13.3
typer                                   0.9.4
typer-config                            1.4.0
types-python-dateutil                   2.9.0.20240316
typing-inspect                          0.9.0
tzdata                                  2024.1
uc-micro-py                             1.0.3
umap-learn                              0.5.5
update-checker                          0.18.0
uri-template                            1.3.0
urllib3                                 1.26.18
utilsforecast                           0.0.10
virtualenv                              20.26.2
wasabi                                  1.1.3
wcwidth                                 0.2.13
weasel                                  0.3.4
webargs                                 8.4.0
webcolors                               1.13
webencodings                            0.5.1
websocket-client                        1.8.0
websockets                              12.0
Werkzeug                                3.0.1
widgetsnbextension                      4.0.11
window_ops                              0.0.15
woodwork                                0.31.0
wordcloud                               1.9.3
wrapt                                   1.16.0
wurlitzer                               3.1.0
x-transformers                          1.30.4
xarray                                  2024.2.0
xarray-einstats                         0.7.0
xgboost                                 2.0.3
xlrd                                    2.0.1
XlsxWriter                              3.2.0
xxhash                                  3.4.1
xyzservices                             2024.4.0
yarl                                    1.9.4
yellowbrick                             1.5
yfinance                                0.2.40
zict                                    3.0.0
zope.event                              5.0
zope.interface                          6.4.post2

Add New Libraries

To request a new library, contact us . We will add the library to the queue for review and deployment. Since the libraries run on our servers, we need to ensure they are secure and won't cause harm. The process of adding new libraries takes 2-4 weeks to complete. View the list of libraries currently under review on the Issues list of the Lean GitHub repository .

Project Libraries

Project libraries are QuantConnect projects you can merge into your project to avoid duplicating code files. If you have tools that you use across several projects, create a library.

The process to create a library depends on if you use the Cloud Platform , Local Platform , or CLI .

 

Key Concepts

Glossary

Introduction

This page defines terms in QuantConnect products and documentation.

alpha

The quantity of an algorithm's returns that aren't explained by its underlying benchmark.

annual standard deviation

A staticial measure that describes the dispersion of annual returns relative to the mean annual return. It's the square root of the annual variance.

annual variance

A staticial measure that describes the dispersion of annual returns relative to the mean annual return.

average loss

The average rate of return for unprofitable trades.

average win

The average rate of return for profitable trades.

beta

The scale and direction of an algorithm's returns relative to movements in the underlying benchmark.

capacity

The maximum amount of money an algorithm can trade before its performance degrades from market impact.

compounding annual return

The annual percentage return that would be required to grow a portfolio from its starting value to its ending value.

day trade

Buying and selling the same asset within one trading day.

drawdown

The largest peak to trough decline in an algorithm's equity curve.

equity

The total portfolio value if all of the holdings were sold at current market rates.

expectancy

The expected return per trade.

holdings

The absolute sum of the items in the portfolio.

information ratio

The amount of excess return from the risk-free rate per unit of systematic risk.

intrinsic value

(Call Option) The price of an asset minus the strike price if the price is above the strike price, otherwise zero.

(Put Option) The strike price minus the price of an asset if the price is below the strike price, otherwise zero.

look-ahead bias

The practice of making decisions using information that would not be available until some time in the future.

loss rate

The proportion of trades that were not profitable.

lowest capacity asset

The asset an algorithm traded that has the lowest capacity.

net profit

(Percent) The rate of return across the entire trading period.

(Dollar-value) The dollar-value return across the entire trading period.

out-of-the-money amount

(Call Option) The strike price minus the price of an asset if the price is below the strike price, otherwise zero.

(Put Option) The price of an asset minus the strike price if the price is above the strike price, otherwise zero.

payoff

The profit or loss that an Option buyer or seller makes from a trade.

pattern day trader

A trader who executes four or more day trades in the US Equity market within five business days.

Probabilistic Sharpe ratio

The probability that the estimated Sharpe ratio of an algorithm is greater than a benchmark (1).

profit-loss ratio

The ratio of the average win rate to the average loss rate.

return

The rate of return across the entire trading period.

risk-free interest rate

The interest rate an investor can expect to earn on an investment that carries zero risk such as the interest paid on a 10-year highly rated government treasury note

Sharpe ratio

A measure of the risk-adjusted return, developed by William Sharpe.

Sortino ratio

A measure of the risk-adjusted return, developed by Frank Sortino. It only penalizes returns falling below a user-specified target or required rate of return.

total fees

The total quantity of fees paid for all the transactions.

total net profit

The rate of return across the entire trading period.

total trades

The number of orders that were filled or partially filled.

tracking error

A measure of how closely a portfolio follows the index to which it is benchmarked. A tracking error of 0 is a perfect match.

Treynor ratio

A measurement of the returns earned in an algorithm in excess of the risk-free rate per unit of benchmark risk, developed by Jack Treynor.

unrealized

The amount of profit a portfolio would capture if it liquidated all open positions and paid the fees for transacting and crossing the spread.

volume

The total value of assets traded for all of an algorithm's transactions.

win rate

The proportion of trades that were profitable after transaction fees.

 

Initialization

Introduction

The Initialize initialize method is the entry point of your algorithm where you define a series of settings, including security subscriptions, starting cash balances, and warm-up periods. LEAN only calls the Initialize initialize method one time, at the start of your algorithm.

Set Dates

To set the date range of backtests, call the SetStartDate set_start_date and SetEndDate set_end_date methods. The dates you provide are based in the algorithm time zone. By default, the end date is yesterday, one millisecond before midnight. In live trading, LEAN ignores the start and end dates.

SetStartDate(2013, 1, 5);                  // Set start date to January 5, 2013
SetEndDate(2015, 1, 5);                    // Set end date to January 5, 2015
SetEndDate(DateTime.Now.Date.AddDays(-7)); // Set end date to last week
self.set_start_date(2013, 1, 5)                  # Set start date to January 5, 2013
self.set_end_date(2015, 1, 5)                    # Set end date to January 5, 2015
self.set_end_date(datetime.now() - timedelta(7)) # Set end date to last week

Set Account Currency

The algorithm equity curve, benchmark, and performance statistics are denominated in the account currency. To set the account currency and your starting cash, call the SetAccountCurrency set_account_currency method. By default, the account currency is USD and your starting cash is $100,000. If you call the SetAccountCurrency set_account_currency method, you must call it before you call the SetCash set_cash method or add data . If you call the SetAccountCurrency set_account_currency method more than once, only the first call takes effect.

SetAccountCurrency("BTC"); // Set account currency to Bitcoin and its quantity to 100,000 BTC
SetAccountCurrency("INR"); // Set account currency to Indian Rupees and its quantity to 100,000 INR
SetAccountCurrency("BTC", 10);  // Set account currency to Bitcoin and its quantity to 10 BTC
self.set_account_currency("BTC") # Set account currency to Bitcoin and its quantity to 100,000 BTC
self.set_account_currency("INR") # Set account currency to Indian Rupees and its quantity to 100,000 INR
self.set_account_currency("BTC", 10);  // Set account currency to Bitcoin and its quantity to 10 BTC

Set Cash

To set your starting cash in backtests, call the SetCash set_cash method. By default, your starting cash is $100,000 USD. In live trading, LEAN ignores the SetCash set_cash method and uses the cash balances in your brokerage account instead.

SetCash(100000);       // Set the quantity of the account currency to 100,000
SetCash("BTC", 10);    // Set the Bitcoin quantity to 10
SetCash("EUR", 10000); // Set the EUR quantity to 10,000
self.set_cash(100000)       # Set the quantity of the account currency to 100,000
self.set_cash("BTC", 10)    # Set the Bitcoin quantity to 10
self.set_cash("EUR", 10000) # Set the EUR quantity to 10,000

Set Brokerage and Cash Model

We model your algorithm with margin modeling by default, but you can select a cash account type. Cash accounts don't allow leveraged trading, whereas Margin accounts can support leverage on your account value. To set your brokerage and account type, call the SetBrokerageModel set_brokerage_model method. For more information about each brokerage and the account types they support, see the brokerage integration documentation. For more information about the reality models that the brokerage models set, see Supported Models .

SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Margin);
self.set_brokerage_model(BrokerageName.INTERACTIVE_BROKERS_BROKERAGE, AccountType.CASH)

The AccountType enumeration has the following members:

Set Universe Settings

The universe settings of your algorithm configure some properties of the universe constituents. The following table describes the properties of the UniverseSettings object:

Property: Asynchronous asynchronous

Should the universe selection run asynchronously to boost speed?

Data Type: bool | Default Value: false False

Property: ExtendedMarketHours extended_market_hours

Should assets also feed extended market hours? You only receive extended market hours data if you create the subscription with an intraday resolution. If you create the subscription with daily resolution, the daily bars only reflect the regular trading hours.

Data Type: bool | Default Value: false False

Property: FillForward fill_forward

Should asset data fill forward?

Data Type: bool | Default Value: true True

Property: MinimumTimeInUniverse minimum_time_in_universe

What's the minimum time assets should be in the universe?

Data Type: TimeSpan timedelta | Default Value: TimeSpan.FromDays(1) timedelta(1)

Property: Resolution resolution

What resolution should assets use?

Data Type: Resolution | Default Value: Resolution.Minute Resolution.MINUTE

Property: ContractDepthOffset contract_depth_offset

What offset from the current front month should be used for continuous Future contracts ? 0 uses the front month and 1 uses the back month contract. This setting is only available for Future assets.

Data Type: int | Default Value: 0

Property: DataMappingMode data_mapping_mode

How should continuous Future contracts be mapped? This setting is only available for Future assets.

Data Type: DataMappingMode | Default Value: DataMappingMode.OpenInterest

Property: DataNormalizationMode data_normalization_mode

How should historical prices be adjusted? This setting is only available for Equity and Futures assets.

Data Type: DataNormalizationMode | Default Value: DataNormalizationMode.Adjusted DataNormalizationMode.ADJUSTED

Property: Leverage leverage

What leverage should assets use in the universe? This setting is not available for derivative assets.

Data Type: decimal float | Default Value: Security.NullLeverage Security.NULL_LEVERAGE

To set the UniverseSettings universe_settings , update the preceding properties in the Initialize initialize method before you add the universe. These settings are globals, so they apply to all universes you create.

// Request second resolution data. This will be slow!
UniverseSettings.Resolution = Resolution.Second;
AddUniverse(Universe.DollarVolume.Top(50));
# Request second resolution data. This will be slow!
self.universe_settings.resolution = Resolution.SECOND
self.add_universe(self.universe.dollar_volume.top(50))

For more information about universe settings, see the related documentation for classic and framework algorithms.

Set Security Initializer

Instead of configuring global universe settings, you can individually configure the settings of each security in the universe with a security initializer. Security initializers let you apply any security-level reality model or special data requests on a per-security basis. To set the security initializer, in the Initialize initialize method, call the SetSecurityInitializer set_security_initializer method and then define the security initializer.

//In Initialize
SetSecurityInitializer(CustomSecurityInitializer);

private void CustomSecurityInitializer(Security security)
{
    // Disable trading fees
    security.SetFeeModel(new ConstantFeeModel(0, "USD"));
}
#In Initialize
self.set_security_initializer(self._custom_security_initializer)

def _custom_security_initializer(self, security: Security) -> None:
    # Disable trading fees
    security.set_fee_model(ConstantFeeModel(0, "USD"))

For simple requests, you can use the functional implementation of the security initializer. This style lets you configure the security object with one line of code.

SetSecurityInitializer(security => security.SetFeeModel(new ConstantFeeModel(0, "USD")));
self.set_security_initializer(lambda security: security.set_fee_model(ConstantFeeModel(0, "USD")))

In some cases, you may want to trade a security in the same time loop that you create the security subscription. To avoid errors, use a security initializer to set the market price of each security to the last known price. The GetLastKnownPrices get_last_known_prices method seeds the security price by gathering the security data over the last 3 days. If there is no data during this period, the security price remains at 0.

var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
SetSecurityInitializer(security => seeder.SeedSecurity(security));
seeder = FuncSecuritySeeder(self.get_last_known_prices)
self.set_security_initializer(lambda security: seeder.seed_security(security))

If you call the SetSecurityInitializer set_security_initializer method, it overwrites the default security initializer. The default security initializer uses the security-level reality models of the brokerage model to set the following reality models of each security:

The default security initializer also sets the leverage of each security and intializes each security with a seeder function. To extend upon the default security initializer instead of overwriting it, create a custom BrokerageModelSecurityInitializer .

// In Initialize
SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));

// Outside of the algorithm class
class MySecurityInitializer : BrokerageModelSecurityInitializer
{
    public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
        : base(brokerageModel, securitySeeder) {}    
    
    public override void Initialize(Security security)
    {
        // First, call the superclass definition
        // This method sets the reality models of each security using the default reality models of the brokerage model
        base.Initialize(security);

        // Next, overwrite some of the reality models        
        security.SetFeeModel(new ConstantFeeModel(0, "USD"));    
    }
}
# In Initialize
self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))

# Outside of the algorithm class
class MySecurityInitializer(BrokerageModelSecurityInitializer):

    def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
        super().__init__(brokerage_model, security_seeder)
    
    def initialize(self, security: Security) -> None:
        # First, call the superclass definition
        # This method sets the reality models of each security using the default reality models of the brokerage model
        super().initialize(security)

        # Next, overwrite some of the reality models        
        security.set_fee_model(ConstantFeeModel(0, "USD"))

To set a seeder function without overwriting the reality models of the brokerage, use the standard BrokerageModelSecurityInitializer .

var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, seeder));
seeder = FuncSecuritySeeder(self.get_last_known_prices)
self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, seeder))

Add Data

You can subscribe to asset, fundamental, alternative, and custom data. The Dataset Market provides 400TB of data that you can easily import into your algorithms.

Asset Data

To subscribe to asset data, call one of the asset subscription methods like AddEquity add_equity or AddForex add_forex . Each asset class has its own method to create subscriptions. For more information about how to create subscriptions for each asset class, see Asset Classes .

AddEquity("AAPL"); // Add Apple 1 minute bars (minute by default)
AddForex("EURUSD", Resolution.Second); // Add EURUSD 1 second bars
self.add_equity("SPY")  # Add Apple 1 minute bars (minute by default)
self.add_forex("EURUSD", Resolution.SECOND) # Add EURUSD 1 second bars

In live trading, you define the securities you want, but LEAN also gets the securities in your live portfolio and sets their resolution to the lowest resolution of the subscriptions you made. For example, if you create subscriptions in your algorithm for securities with Second, Minute, and Hour resolutions, the assets in your live portfolio are given a resolution of Second.

Alternative Data

To add alternative datasets to your algorithms, call the AddData add_data method. For full examples, in the Datasets chapter, select a dataset and see the Requesting Data section.

Custom Data

To add custom data to your algorithms, call the AddData add_data method. For more information about custom data, see Importing Data .

Limitations

There is no official limit to how much data you can add to your algorithms, but there are practical resource limitations. Each security subscription requires about 5MB of RAM, so larger machines let you run algorithms with bigger universes. For more information about our cloud nodes, see Resources .

Set Indicators and Consolidators

You can create and warm-up indicators in the Initialize initialize method.

private Symbol _symbol;
private SimpleMovingAverage _sma;

_symbol = AddEquity("SPY").Symbol;
_sma = SMA(_symbol, 20);
WarmUpIndicator(_symbol, _sma);
self._symbol = self.add_equity("SPY").symbol
self._sma = self.sma(self._symbol, 20)
self.warm_up_indicator(self._symbol, self._sma)

Set Algorithm Settings

The following table describes the AlgorithmSettings properties:

Property: FreePortfolioValue free_portfolio_value

The buying power buffer value.

Data Type: decimal float | Default Value: 250 m

Property: FreePortfolioValuePercentage free_portfolio_value_percentage

The buying power buffer percentage value.

Data Type: decimal float | Default Value: 0.0025 m

Property: LiquidateEnabled liquidate_enabled

A flag to enable and disable the Liquidate liquidate method.

Data Type: bool | Default Value: true True

Property: MaxAbsolutePortfolioTargetPercentage max_absolute_portfolio_target_percentage

The absolute maximum valid total portfolio value target percentage.

Data Type: decimal float | Default Value: 1000000000 m

Property: MinAbsolutePortfolioTargetPercentage min_absolute_portfolio_target_percentage

The absolute minimum valid total portfolio value target percentage.

Data Type: decimal float | Default Value: 0.0000000001 m

Property: MinimumOrderMarginPortfolioPercentage minimum_order_margin_portfolio_percentage

The minimum order margin portfolio percentage to ignore bad orders and orders with small sizes.

Data Type: decimal float | Default Value: 0.001 m

Property: RebalancePortfolioOnInsightChanges rebalance_portfolio_on_insight_changes

Rebalance the portfolio when you emit new insights or when insights expire.

Data Type: bool/NoneType | Default Value: true True

Property: RebalancePortfolioOnSecurityChanges rebalance_portfolio_on_security_changes

Rebalance the portfolio when your universe changes.

Data Type: bool/NoneType | Default Value: true True

Property: StalePriceTimeSpan stale_price_time_span

The minimum time span elapsed to consider a market fill price as stale

Data Type: TimeSpan timedelta | Default Value: TimeSpan.FromHours(1) timedelta(hours=1)

Property: TradingDaysPerYear trading_days_per_year

Number of trading days per year for this algorithm's portfolio statistics .

Data Type: integer int | Default Value: 252

Property: WarmUpResolution warm_up_resolution

The resolution to use during the warm-up period

Data Type: Resolution/NoneType | Default Value: null None

To change the Settings settings , update some of the preceding properties.

Settings.RebalancePortfolioOnSecurityChanges = false;
Settings.TradingDaysPerYear = 365;
self.settings.rebalance_portfolio_on_security_changes = False
self.settings.trading_days_per_year = 365

To successfully update the FreePortfolioValue free_portfolio_value , you must update it after the Initialize initialize method.

Set Benchmark

The benchmark performance is input to calculate several statistics on your algorithm, including alpha and beta . To set a benchmark for your algorithm, call the SetBenchmark set_benchmark method. You can set the benchmark to a security, a constant value, or a value from a custom data source . If you don't set a brokerage model , the default benchmark is SPY. If you set a brokerage model, the model defines the default benchmark.

// Set the benchmark to IBM
SetBenchmark("IBM");

// Set the benchmark to a constant value of 0
SetBenchmark(x => 0);

// Set the benchmark to a value from a custom data source
var symbol = AddData<CustomData>("CustomData", Resolution.Hour).Symbol;
SetBenchmark(symbol);
# Set the benchmark to IBM
self.set_benchmark("IBM")

# Set the benchmark to a constant value of 0
self.set_benchmark(lambda x: 0)

# Set the benchmark to a value from a custom data source
symbol = self.add_data(CustomData, "CustomData", Resolution.HOUR).symbol
self.set_benchmark(symbol)

If you pass a ticker to the SetBenchmark set_benchmark method, LEAN checks if you have a subscription for it. If you have a subscription for it, LEAN uses the security subscription. If you don't have a subscription for it, LEAN creates a US Equity subscription with the ticker. Since the ticker you pass may not reference a US Equity, we recommend you subscribe to the benchmark security before you call the SetBenchmark set_benchmark method.

Set Time Zone

LEAN supports international trading across multiple time zones and markets, so it needs a reference time zone for the algorithm to set the Time time . The default time zone is Eastern Time (ET), which is UTC-4 in summer and UTC-5 in winter. To set a different time zone, call the SetTimeZone set_time_zone method. This method accepts either a string following the IANA Time Zone database convention or a NodaTime .DateTimeZone object. If you pass a string, the method converts it to a NodaTime.DateTimeZone object. The TimeZones class provides the following helper attributes to create NodaTime.DateTimeZone objects:

SetTimeZone("Europe/London");
SetTimeZone(NodaTime.DateTimeZone.Utc);
SetTimeZone(TimeZones.Chicago);
self.set_time_zone("Europe/London")
self.set_time_zone(TimeZones.CHICAGO)

The algorithm time zone may be different from the data time zone . If the time zones are different, it might appear like there is a lag between the algorithm time and the first bar of a history request, but this is just the difference in time zone. All the data is internally synchronized in Coordinated Universal Time (UTC) and arrives in the same Slice object. A slice is a sliver of time with all the data available for this moment.

To keep trades easy to compare between asset classes, we mark all orders in UTC time.

Set Warm Up Period

You may need some historical data at the start of your algorithm to prime technical indicators or populate historical data arrays. The warm-up period pumps data into your algorithm from before the start date. To set a warm-up period, call the SetWarmUp set_warm_up method. The warm-up feature uses the subscriptions you add in Initialize initialize to gather the historical data that warms up the algorithm. If you don't create security subscriptions in the Initialize initialize method, the warm-up won't occur.

// Wind time back 7 days from the start date
SetWarmUp(TimeSpan.FromDays(7));

// Feed in 100 trading days worth of data before the start date
SetWarmUp(100, Resolution.Daily);

// If you don't provide a resolution argument, it uses the lowest resolution in your subscriptions
SetWarmUp(100);
# Wind time back 7 days from the start date
self.set_warm_up(timedelta(7))

# Feed in 100 trading days worth of data before the start date
self.set_warm_up(100, Resolution.DAILY)

# If you don't provide a resolution argument, it uses the lowest resolution in your subscriptions
self.set_warm_up(100)

Set Name and Tags

You can categorize your backtest with a name and tags. To set the algorithm Name name , call the SetName set_name method.

SetName("Backtest Name");
self.set_name("Backtest Name")

The SetName set_name method overwrites the names of backtests of an optimization , which contains the parameter values. To keep these values, create a name that includes them.

var fastPeriod = GetParameter("fast_period", 100);
var midPeriod = GetParameter("mid_period", 200);
var slowPeriod = GetParameter("slow_period", 300);
SetName($"Backtest Name ({fastPeriod},{midPeriod},{slowPeriod})");
fast_period = self.get_parameter("fast_period", 100);
mid_period = self.get_parameter("mid_period", 200);
slow_period = self.get_parameter("slow_period", 300);
self.set_name(f"Backtest Name ({fast_period},{mid_period},{slow_period})");

To add tags to you algorithm, call the AddTag add_tag method.

AddTag("Long Only");
AddTag("Momentum");     
    
self.add_tag("Long Only")
self.add_tag("Momentum")

Your algorithm can add 20 tags. The name and each tag can have up to 200 characters or else they are truncated.

Post Initialization

After the Initialize initialize method, the PostInitialize post_initialize method performs post-initialization routines, so don't override it. To be notified when the algorithm is ready to begin trading, define an OnWarmupFinished on_warmup_finished method. This method executes even if you don't set a warm-up period.

public override void OnWarmupFinished()
{
    Log("Algorithm Ready");
}
def on_warmup_finished(self) -> None:
    self.log("Algorithm Ready")

Examples

Demonstration Algorithms
BasicTemplateAlgorithm.py Python BasicTemplateCryptoAlgorithm.py Python BasicTemplateForexAlgorithm.py Python BasicTemplateFuturesAlgorithm.py Python BasicTemplateOptionsAlgorithm.py Python BasicTemplateAlgorithm.cs C# BasicTemplateCryptoAlgorithm.cs C# BasicTemplateForexAlgorithm.cs C# BasicTemplateFuturesAlgorithm.cs C# BasicTemplateOptionsAlgorithm.cs C#

 

Securities

Securities

Key Concepts

Introduction

A security is an individual financial asset that you might trade on an exchange. LEAN models these unique assets with a Security object, which the AddEquity add_equity , AddCrypto add_crypto , and similar methods return. The Securities securities property of the QCAlgorithm class is a dictionary where the keys are Symbol objects and the values are Security objects. The Securities securities dictionary contains all of the securities that have been in the algorithm during its lifetime.

Quote Currency

The quote currency is the currency you must give the seller to buy an asset. For currency trades, the quote currency is the currency ticker on the right side of the currency pair. For other types of assets, the quote currency is usually USD, but the quote currency for India Equities is INR. To get the quote currency of a Security , use the QuoteCurrency quote_currency property.

var aaplQuoteCurrency = Securities["AAPL"].QuoteCurrency; // USD
var btcusdtQuoteCurrency = Securities["BTCUSDT"].QuoteCurrency; // USDT
aapl_quote_currency = self.securities["AAPL"].quote_currency # USD
btcusdt_quote_currency = self.securities["BTCUSDT"].quote_currency # USDT

The QuoteCurrency quote_currency is a Cash object, which have the following properties:

You can use the ConversionRate conversion_rate property to calculate the value of the minimum price movement in the account currency

var cfd = Securities["SG30SGD"];
var quoteCurrency = cfd.QuoteCurrency; // SGD
var contractMutiplier = cfd.SymbolProperties.ContractMultiplier;
var minimumPriceVariation = cfd.SymbolProperties.MinimumPriceVariation;

// Value of a pip in account currency
var pip = minimumPriceVariation * contractMutiplier * quoteCurrency.ConversionRate;
cfd = self.securities["SG30SGD"]
quote_currency = cfd.quote_currency # SGD
contract_mutiplier = cfd.symbol_properties.contract_multiplier
minimum_price_variation = cfd.symbol_properties.minimum_price_variation

# Value of a pip in account currency
pip = minimum_price_variation * contract_mutiplier * quote_currency.conversion_rate

Security Listing

The Exchange exchange property of a Security object contains information about the exchange that lists the security.

var exchange = Securities["SPY"].Exchange;
exchange = self.securities["SPY"].exchange

Security Market

The Market enumeration has the following members:

LEAN groups all of the US Equity exchanges under Market.USA . In live mode, the brokerage routes the orders to the exchange that provides the best price.

Active Securities

The ActiveSecurities active_securities property of the algorithm class contains all of the assets currently in your algorithm. It is a dictionary where the key is a Symbol and the value is a Security . When you remove an asset from a universe, LEAN usually removes the security from the ActiveSecurities active_securities collection and removes the security subscription. However, it won't remove the security in any of the following situations:

When LEAN removes the security, the Security object remains in the Securities securities collection for record-keeping purposes, like tracking fees and trading volume.

To improve iteration speed, LEAN removes delisted securities from the Securities securities primary collection. To access all the securities, iterate the Securities.Total securities.total property.

foreach (var security in Securities.Total)
{ 

}

// Exclude delisted securities
foreach (var security in Securities.Values)
{ 

}
for security in self.securities.total:
    pass

# Exclude delisted securities
for security in self.securities.values():
    pass

To get only the assets that are currently in the universe, see Selected Securities .

Tradable Status

The IsTradable is_tradable property shows whether you can trade a security. The property value is true when the security is in the universe, even if the data starts at a later day. Indices, canonical Option securities, and continuous Futures contracts are not tradable. In live mode, custom data objects are also not tradable, even if the custom data represents a tradable asset.

var tradable = Securities["SPY"].IsTradable;
tradable = self.securities["SPY"].is_tradable

Fundamental Data

To get fundamental data for a Security in your algorithm, use its Fundamentals fundamentals property. The fundamental data represent the company's fundamentals for the current algorithm time.

var fundamentals = Securities[_symbol].Fundamentals;
fundamentals = self.securities[self._symbol].fundamentals

Some assets don't have fundamentals (for example, ETFs) and the Morningstar dataset doesn't provide fundamentals for all US Equities. To check if fundamental data is available for an asset, use the HasFundamentalData has_fundamental_data property.

var hasFundamentalData = Securities[_symbol].Fundamentals.HasFundamentalData;
has_fundamental_data = self.securities[self._symbol].fundamentals.has_fundamental_data

For more information about fundamental data, see Corporate Fundamentals .

Linked Custom Data

Linked custom data is custom data that's linked to individual assets. In contrast, unlinked data is not linked to specific assets. An example of an unlinked dataset is the US Regulatory Alerts dataset. LEAN passes custom data objects to the OnData on_data method. For more information about custom data, see Custom Securities .

Security Types

LEAN uses the SecurityType enumeration as a synonym for asset classes. The SecurityType enumeration has the following members:

The Base type is for non-financial assets like custom and alternative data objects.

 

Securities

Properties

Introduction

Security objects contain the models and properties of an asset.

Security Properties

Security objects have the following properties:

Custom Security Properties

You can add properties attributes to the Security object. For example, you can add an exponential moving average .

dynamic equity = AddEquity("SPY");
equity.ema = EMA(equity.Symbol, 10, Resolution.Daily);
equity = self.add_equity("SPY")
equity.ema = self.ema(equity.symbol, 10, Resolution.DAILY)

This feature is helpful because you can get the Security object from the Securities securities object.

var ema = (Securities["SPY"] as dynamic).ema.Current.Value;
ema = self.securities["SPY"].ema.current.value

Reality Models

Security objects contain references to the security level reality models . To customize the behavior of each security, configure its reality models.

Symbol Properties

The SymbolProperties symbol_properties property of a Security contains properties for a specific security. SymbolProperties objects have the following properties:

To create a SymbolProperties object, call the constructor.

var symbolProperties = new SymbolProperties(description, quoteCurrency, contractMultiplier, minimumPriceVariation, lotSize, marketTicker);
symbol_properties = SymbolProperties(description, quoteCurrency, contractMultiplier, minimumPriceVariation, lotSize, marketTicker)

The following table describes the arguments of the SymbolProperties constructor:

Argument Data Type Description Default Value
description string str The description of the security.
quoteCurrency quote_currency string str The quote currency of the security.
contractMultiplier contract_multiplier decimal float The contract multiplier for the security.
minimumPriceVariation minimum_price_variation decimal float The minimum price variation (tick size) for the security.
lotSize lot_size decimal float The lot size (lot size of the order) for the security.
marketTicker market_ticker string str The market ticker.
minimumOrderSize minimum_order_size decimal? float/NoneType The minimum order size allowed. None null
priceMagnifier price_magnifier decimal float This property allows normalizing live asset prices to US Dollars for Lean consumption. In some exchanges, for some securities, data is expressed in cents like corn Futures ('ZC'). 1

 

Securities

Exchange

Introduction

The Exchange property of a Security object contains information about the exchange that lists the security.

Properties

The Exchange exchange property of a Security object returns an SecurityExchange object, which has the following attributes:

Hours

To get the exchange hours, use the Exchange.Hours exchange.hours property on a Security object.

var securityExchangeHours = Securities["SPY"].Exchange.Hours;
security_exchange_hours = self.securities["SPY"].exchange.hours

The preceding code snippet returns a SecurityExchangeHours object, which has the following attributes:

To check if the exchange is open at a specific time, call the IsOpen is_open method.

// Check if the exchange is open at a specific time
var isOpenNow = securityExchangeHours.IsOpen(Time, extendedMarketHours: false);

// Check if the exchange is open at any point in time over a specific interval
var isOpen = securityExchangeHours.IsOpen(Time, Time.AddDays(1), extendedMarketHours: false);
# Check if the exchange is open at a specific time
is_open_now = security_exchange_hours.is_open(self.time, extended_market_hours=False)

# Check if the exchange is open at any point in time over a specific interval
is_open = security_exchange_hours.is_open(self.time, self.time + timedelta(days=1), extended_market_hours=False)

To check if the exchange is open on a specific date, call the IsDateOpen is_date_open method.

var isOpen = securityExchangeHours.IsDateOpen(Time);
is_open = security_exchange_hours.is_date_open(self.time)

To get the next market open time, call the GetNextMarketOpen get_next_market_open method.

var marketOpenTime = securityExchangeHours.GetNextMarketOpen(Time, extendedMarketHours: false);
market_open_time = security_exchange_hours.get_next_market_open(self.time, extended_market_hours=False)

To get the next market close time, call the GetNextMarketClose get_next_market_close method.

var marketCloseTime = securityExchangeHours.GetNextMarketClose(Time, extendedMarketHours: false);
market_close_time = security_exchange_hours.get_next_market_close(self.time, extended_market_hours=False)

To get the previous trading day, call the GetPreviousTradingDay get_previous_trading_day method.

var day = securityExchangeHours.GetPreviousTradingDay(Time);
day = security_exchange_hours.get_previous_trading_day(self.time)

To get the next trading day, call the GetNextTradingDay get_next_trading_day method.

var day = securityExchangeHours.GetNextTradingDay(Time);
day = security_exchange_hours.get_next_trading_day(self.time)

Extended Market Hours

By default, your security subscriptions only cover regular trading hours. To subscribe to pre and post-market trading hours for a specific asset, enable the extendedMarketHours extended_market_hours argument when you create the security subscription.

AddEquity("SPY", extendedMarketHours: true);
self.add_equity("SPY", extended_market_hours=True)

You only receive extended market hours data if you create the subscription with minute, second, or tick resolution. If you create the subscription with daily or hourly resolution, the bars only reflect the regular trading hours.

24 Hour Markets

The Crypto market trades 24/7, but other asset classes only trade during part of the week. Each market has an official trading schedule, but it can be impacted by daylight savings, holidays, and trading halts.

 

Securities

Requesting Data

Introduction

If you create a data subscription, your algorithm receives data updates for that security or custom data source.

Characteristics

We thoroughly vet datasets before we add them to the Data Market. The datasets in the Data Market are well-defined with robust ticker and Symbol links to ensure tickers are properly tracked through time. The datasets are consistently delivered on time and most of them are ready for live trading. All the datasets have at least one year of historical data and are free of survivorship bias.

Resolutions

Resolution is the duration of time that's used to sample a data source. The Resolution enumeration has the following members:

The default resolution for market data is Minute MINUTE . To set the resolution for a security, pass the resolution argument when you create the security subscription.

AddEquity("SPY", Resolution.Daily);
self.add_equity("SPY", Resolution.DAILY)

To set the resolution for all securities, set the Resolution universe setting before you create security subscriptions.

UniverseSettings.Resolution = Resolution.Daily;
self.universe_settings.resolution = Resolution.DAILY

To see which resolutions of data are available for a dataset, see the dataset listing in the Data Market . To create custom resolution periods, see Consolidating Data .

Data density describes the frequency of entries in a dataset. Datasets at the tick resolution have dense data density. All other resolutions usually have regular data density. If a non-tick resolution dataset doesn't have an entry at each sampling, it has sparse density.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

AddEquity("SPY", fillForward: false);
self.add_equity("SPY", fill_forward=False)

Extended Market Hours

By default, your security subscriptions only cover regular trading hours. To subscribe to pre and post-market trading hours for a specific asset, enable the extendedMarketHours extended_market_hours argument when you create the security subscription.

AddEquity("SPY", extendedMarketHours: true);
self.add_equity("SPY", extended_market_hours=True)

You only receive extended market hours data if you create the subscription with minute, second, or tick resolution. If you create the subscription with daily or hourly resolution, the bars only reflect the regular trading hours.

Remove Subscriptions

To remove a security subscription, call the RemoveSecurity remove_security method.

RemoveSecurity(_symbol);
self.remove_security(self._symbol)

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings.

Markets

The datasets integrated into the Dataset Market cover many markets. The Market enumeration has the following members:

LEAN can usually determine the correct market based on the ticker you provide when you create the security subscription. To manually set the market for a security, pass a market argument when you create the security subscription.

AddEquity("SPY", market: Market.USA);
self.add_equity("SPY", market=Market.USA)

 

Securities

Handling Data

Introduction

LEAN packages the data for your subscriptions in a Slice object and passes it to the OnData on_data method of your algorithm. To avoid look-ahead bias , LEAN only provides the data that's available at the current time in your algorithm. This processing style ensures that your algorithm backtests in the same manner that it trades live. Your algorithm uses the data to make trading decisions and LEAN uses the data to update your positions, track your portfolio value, and simulate orders.

Security Cache

To get the most recent data for a security, call the GetLastData get_last_data method on the Security object.

var data = Securities["SPY"].GetLastData();
data = self.securities["SPY"].get_last_data()

Timeslice

The Slice that LEAN passes to the OnData on_data method represents all of the data for your subscriptions at a single point in time. The Slice object contains data like Tick TICK objects, TradeBar objects, QuoteBar objects, corporate actions , and chains for Option and Future contracts. You can use the data in the Slice to make trading decisions.

To access data in the Slice , index it with the security Symbol . If you use the security ticker instead of the Symbol , LEAN automatically finds the Symbol .

public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_symbol))
    {
        var myData = slice[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self._symbol):
        my_data = slice[self._symbol]

The following table shows the Slice property to index based on the data format you want:

Data Format Slice Property
TradeBar Bars bars
QuoteBar QuoteBars quote_bars
Tick Ticks ticks
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_symbol))
    {
        var bar = slice.Bars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self._symbol):
        bar = slice.bars[self._symbol]

If you just index the Slice instead of the preceding properties, it returns the correct object. If your data subscription provides QuoteBar objects and you index the Slice with the security Symbol , it returns the QuoteBar .

Slice objects have the following properties:

For more information about the Slice class, see Timeslices .

Corporate Actions

The Slice that LEAN passes to the OnData on_data method may contain corporate action data for the Equities in your algorithm. Instead of adding logic to your OnData on_data defintion to respond to corporate actions (for example, resetting indicators ), you can isolate the logic in one of the following event handlers.

Splits

The OnSplits on_splits event handler provides information on stock splits.

public override void OnSplits(Splits splits)
{
    foreach (var kvp in splits)
    {
        var symbol = kvp.Key;
        var split = kvp.Value;
    }
}
def on_splits(self, splits: Splits) -> None:
    for symbol, split in splits.items():
        pass

Dividends

The OnDividends on_dividends event handler provides information on dividend payments.

public override void OnDividends(Dividends dividends)
{
    foreach (var kvp in dividends)
    {
        var symbol = kvp.Key;
        var dividend = kvp.Value;
    }
}
def on_dividends(self, dividends: Dividends) -> None:
    for symbol, dividend in dividends.items():
        pass

Symbol Changes

The OnSymbolChangedEvents on_symbol_changed_events event handler provides information on ticker changes.

public override void OnSymbolChangedEvents(SymbolChangedEvents symbolChangedEvents)
{
    foreach (var kvp in symbolChangedEvents)
    {
        var symbol = kvp.Key;
        var symbolChangedEvent = kvp.Value;
    }
}
def on_symbol_changed_events(self, symbol_changed_events: SymbolChangedEvents) -> None:
    for symbol, symbol_changed_event in symbol_changed_events.items():
        pass

Delistings

The OnDelistings on_delistings event handler provides information on asset delistings.

public override void OnDelistings(Delistings delistings)
{
    foreach (var kvp in delistings)
    {
        var symbol = kvp.Key;
        var delisting = kvp.Value;
    }
}
def on_delistings(self, delistings: Delistings) -> None:
    for symbol, delisting in delistings.items():
        pass

 

Securities

Filtering Data

Introduction

Unfiltered raw data can be faulty for a number of reasons, including invalid data entry. Moreover, high-frequency traders can deploy bait-and-switch strategies by submitting bait orders to deceive other market participants, making raw data noisy and untradeable. To avoid messing up with our trading logic and model training, you can filter out suspicious raw data with a data filter.

Set Models

To set a data filter for a security, call the SetDataFilter set_data_filter property on the Security object.

// In Initialize
var spy = AddEquity("SPY");
spy.SetDataFilter(new SecurityDataFilter());
# In Initialize
spy = self.add_equity("SPY")
spy.set_data_filter(SecurityDataFilter())

You can also set the data filter model in a security initializer . If your algorithm has a universe, use the security initializer technique. In order to initialize single security subscriptions with the security initializer, call SetSecurityInitializer set_security_initializer before you create the subscriptions.

// In Initialize
SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));

// Outside of the algorithm class
class MySecurityInitializer : BrokerageModelSecurityInitializer
{
    public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
        : base(brokerageModel, securitySeeder) {}    
    
    public override void Initialize(Security security)
    {
        // First, call the superclass definition
        // This method sets the reality models of each security using the default reality models of the brokerage model
        base.Initialize(security);

        // Next, overwrite some of the reality models        
        security.SetDataFilter(new SecurityDataFilter());    
    }
}
# In Initialize
self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))

# Outside of the algorithm class
class MySecurityInitializer(BrokerageModelSecurityInitializer):

    def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
        super().__init__(brokerage_model, security_seeder)
    
    def initialize(self, security: Security) -> None:
        # First, call the superclass definition
        # This method sets the reality models of each security using the default reality models of the brokerage model
        super().initialize(security)

        # Next, overwrite some of the reality models        
        security.set_data_filter(SecurityDataFilter())

Default Behavior

The following table shows the default data filter for each security type:

Security Type Default Filter
Equity EquityDataFilter
Option OptionDataFilter
Forex ForexDataFilter
Index IndexDataFilter
Cfd CfdDataFilter
Others SecurityDataFilter

None of the preceding filters filter out any data.

Model Structure

Data filtering models should implement the ISecurityDataFilter interface. Extensions of the ISecurityDataFilter interface must implement the Filter method, which receives Security and BaseData objects and then returns a boolean object that represents if the data point should be filtered out.

Data filtering models must implement a filter method, which receives Security and BaseData objects and then returns a boolean object that represents if the data point should be filtered out.

public class MyDataFilter : ISecurityDataFilter
{
    public override bool Filter(Security vehicle, BaseData data)
    {
        return true;
    }
}
class MyDataFilter(SecurityDataFilter):
    def filter(self, vehicle: Security, data: BaseData) -> bool:
        return True

Examples

Demonstration Algorithms
CustomSecurityDataFilterRegressionAlgorithm.py Python TickDataFilteringAlgorithm.py Python CustomSecurityDataFilterRegressionAlgorithm.cs C# TickDataFilteringAlgorithm.cs C#

 

Securities

Asset Classes

You can trade any of the following asset classes. Click one to learn more.

See Also

Universes
Importing Data

 

Asset Classes

US Equity

US Equities represent partial ownership in a US corporation.

See Also

BasicTemplateAlgorithm.py
BasicTemplateAlgorithm.cs

 

US Equity

Requesting Data

Introduction

Request US Equity data in your algorithm to receive a feed of asset prices in the OnData on_data method. For more information about the specific dataset we use for backtests, see the US Equities dataset listing . To trade US Equities live, you can use the QuantConnect data provider or one of the brokerage data providers .

Create Subscriptions

To create an Equity subscription, in the Initialize initialize method, call the AddEquity add_equity method. The AddEquity add_equity method returns an Equity object, which contains a Symbol symbol property. Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

_symbol = AddEquity("SPY").Symbol;
self._symbol = self.add_equity("SPY").symbol

The AddEquity add_equity method creates a subscription for a single Equity asset and adds it to your user-defined universe. To create a dynamic universe of Equities, add an Equity universe or an Equity Universe Selection model .

To view the supported assets in the US Equities dataset, see the Data Explorer .

Resolutions

The following table shows the available resolutions and data formats for Equity subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK green check green check
Second SECOND green check green check
Minute MINUTE green check green check
Hour HOUR green check
Daily DAILY green check

The default resolution for Equity subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddEquity add_equity method.

_symbol = AddEquity("SPY", Resolution.Daily).Symbol;
self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

To create custom resolution periods, see Consolidating Data .

Asset Primary Exchange

When a stock like Apple is listed, it’s listed on Nasdaq. The open auction tick on Nasdaq is the price that’s used as the official open of the day. NYSE, BATS, and other exchanges also have opening auctions, but the only official opening price for Apple is the opening auction on the exchange where it was listed.

Supported Markets

LEAN groups all of the US Equity exchanges under Market.USA . In live mode, the brokerage routes the orders to the exchange that provides the best price.

To set the market for a security, pass a market argument to the AddEquity add_equity method.

_symbol = AddEquity("SPY", market: Market.USA).Symbol;
self._symbol = self.add_equity("SPY", market=Market.USA).symbol

The brokerage models have a default market for each asset class. If you set a brokerage model, you may not need to specify the market to use.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

AddEquity("SPY", fillForward: false);
self.add_equity("SPY", fill_forward=False)

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. In backtests, the default leverage for margin accounts is 2x leverage and leverage is not available for cash accounts. To change the amount of leverage you can use for a security, pass a leverage argument to the AddEquity add_equity method.

_symbol = AddEquity("SPY", leverage: 3).Symbol;
self._symbol = self.add_equity("SPY", leverage=3).symbol

In live trading, the brokerage determines how much leverage you may use. For more information about the leverage they provide, see Brokerages .

Extended Market Hours

By default, your security subscriptions only cover regular trading hours. To subscribe to pre and post-market trading hours for a specific asset, enable the extendedMarketHours extended_market_hours argument when you create the security subscription.

AddEquity("SPY", extendedMarketHours: true);
self.add_equity("SPY", extended_market_hours=True)

You only receive extended market hours data if you create the subscription with minute, second, or tick resolution. If you create the subscription with daily or hourly resolution, the bars only reflect the regular trading hours.

To view the schedule of regular and extended market hours, see Market Hours .

Data Normalization

The data normalization mode defines how historical data is adjusted for corporate actions . The data normalization mode affects the data that LEAN passes to OnData on_data and the data from history requests . By default, LEAN adjusts US Equity data for splits and dividends to produce a smooth price curve, but the following data normalization modes are available for Equity subscriptions:

If you use Adjusted ADJUSTED , SplitAdjusted SPLIT_ADJUSTED , or TotalReturn TOTAL_RETURN , we use the entire split and dividend history to adjust historical prices. This process ensures you get the same adjusted prices, regardless of the backtest end date. The ScaledRaw SCALED_RAW data normalization is only for history requests . When you use ScaledRaw SCALED_RAW , we use the split and dividend history before the algorithm's current time to adjust historical prices. The ScaledRaw SCALED_RAW data normalization model enables you to warm up indicators with adjusted data when you subscribe to Raw RAW security data.

To set the data normalization mode for a security, pass a dataNormalizationMode data_normalization_mode argument to the AddEquity add_equity method.

_symbol = AddEquity("SPY", dataNormalizationMode: DataNormalizationMode.Raw).Symbol;
self._symbol = self.add_equity("SPY", data_normalization_mode=DataNormalizationMode.RAW).symbol

Properties

The AddEquity add_equity method returns an Equity object, which have the following properties:

 

US Equity

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a TradeBar argument, it only receives TradeBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the TradeBars DataDictionary is made up of TradeBar objects. To access individual data points in the dictionary, you can index the dictionary with the security ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for US Equity data, see Resolutions .

Trades

TradeBar objects are price bars that consolidate individual trades from the exchanges. They contain the open, high, low, close, and volume of trading activity over a period of time.

Tradebar decomposition

TradeBar objects have the following properties:

To get the TradeBar objects in the Slice , index the Slice or index the Bars bars property of the Slice with the security Symbol symbol . If the security doesn't actively trade or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    trade_bar = slice.bars.get(self._symbol)   # None if not found

You can also iterate through the TradeBars dictionary. The keys of the dictionary are the Symbol objects and the values are the TradeBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        var closePrice = tradeBar.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        close_price = trade_bar.close

We adjust the daily open and close price of bars to reflect the official auction prices .

Quotes

QuoteBar objects are bars that consolidate NBBO quotes from the exchanges. They contain the open, high, low, and close prices of the bid and ask. The Open open , High high , Low low , and Close close properties of the QuoteBar object are the mean of the respective bid and ask prices. If the bid or ask portion of the QuoteBar has no data, the Open open , High high , Low low , and Close close properties of the QuoteBar copy the values of either the Bid bid or Ask ask instead of taking their mean.

Quotebar decomposition

QuoteBar objects have the following properties:

To get the QuoteBar objects in the Slice , index the QuoteBars property of the Slice with the security Symbol symbol . If the security doesn't actively get quotes or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    quote_bar = slice.quote_bars.get(self._symbol)   # None if not found

You can also iterate through the QuoteBars dictionary. The keys of the dictionary are the Symbol objects and the values are the QuoteBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        var askPrice = quoteBar.Ask.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        ask_price = quote_bar.ask.close

QuoteBar objects let LEAN incorporate spread costs into your simulated trade fills to make backtest results more realistic.

Ticks

Tick objects represent a single trade or quote at a moment in time. A trade tick is a record of a transaction for the security. A quote tick is an offer to buy or sell the security at a specific price. Tick objects have the following properties:

Trade ticks have a non-zero value for the Quantity quantity and Price price properties, but they have a zero value for the BidPrice bid_price , BidSize bid_size , AskPrice ask_price , and AskSize ask_size properties. Quote ticks have non-zero values for BidPrice bid_price and BidSize bid_size properties or have non-zero values for AskPrice ask_price and AskSize ask_size properties. To check if a tick is a trade or a quote, use the TickType ticktype property.

In backtests, LEAN groups ticks into one millisecond buckets. In live trading, LEAN groups ticks into ~70-millisecond buckets. To get the Tick objects in the Slice , index the Ticks property of the Slice with a Symbol symbol . If the security doesn't actively trade or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    ticks = slice.ticks.get(self._symbol, [])   # Empty if not found
    for tick in ticks:
        price = tick.price

You can also iterate through the Ticks dictionary. The keys of the dictionary are the Symbol objects and the values are the List<Tick> list[Tick] objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            price = tick.price

Tick data is raw and unfiltered, so it can contain bad ticks that skew your trade results. For example, some ticks come from dark pools, which aren't tradable. We recommend you only use tick data if you understand the risks and are able to perform your own online tick filtering.

If we detect a tick that may be suspicious , we set its Suspicious suspicious flag to true.

Other Data Formats

For more information about data formats available for US Equities, see Corporate Actions .

 

US Equity

Corporate Actions

Introduction

US Equity subscriptions provide notifications for splits, dividends, symbol changes, and delistings.

Splits

When a company does a stock split, the number of shares each shareholder owns increases and the price of each share decreases. When a company does a reverse stock split, the number of shares each shareholder owns decreases and the price of each share increases. A company may perform a stock split or a reverse stock split to adjust the price of their stock so that more investors trade it and the liquidity increases.

When a stock split or reverse stock split occurs for an Equity in your algorithm, LEAN sends a Split object to the OnData on_data method. Split objects have the following properties:

You receive Split objects when a split is in the near future and when it occurs. To know if the split occurs in the near future or now, check the Type type property.

If you backtest without the Raw RAW data normalization mode , the splits are factored into the price and volume. If you backtest with the Raw RAW data normalization mode or trade live, when a split occurs, LEAN automatically adjusts your positions based on the SplitFactor split_factor . If the post-split quantity isn't a valid lot size , LEAN credits the remaining value to your cashbook in your account currency. If you have indicators in your algorithm, reset and warm-up your indicators with ScaledRaw data when splits occur so that the data in your indicators account for the price adjustments that the splits cause.

To get the Split objects, index the Splits splits object with the security Symbol symbol . The Splits splits object may not contain data for your Symbol . To avoid issues, check if the Splits splits object contains data for your security before you index it with the security Symbol .

public override void OnData(Slice slice)
{
    if (slice.Splits.ContainsKey(_symbol))
    {
        var split = slice.Splits[_symbol];
    }
}

public override void OnSplits(Splits splits)
{
    if (splits.ContainsKey(_symbol))
    {
        var split = splits[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    split = slice.splits.get(self._symbol)
    if split:
        pass


def on_splits(self, splits: Splits) -> None:
    split = splits.get(self._symbol)
    if split:
        pass

You can also iterate through the Splits splits dictionary. The keys of the dictionary are the Symbol objects and the values are the Split objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Splits)
    {
        var symbol = kvp.Key;
        var split = kvp.Value;
    }
}

public override void OnSplits(Splits splits)
{
    foreach (var kvp in splits)
    {
        var symbol = kvp.Key;
        var split = kvp.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, split in slice.splits.items():
        pass

def on_splits(self, splits: Splits) -> None:
    for symbol, split in splits.items():
        pass

LEAN stores the data for stock splits in factor files. To view some example factor files, see the LEAN GitHub repository . In backtests, your algorithm receives Split objects at midnight. In live trading, your algorithm receives Split objects when the factor files are ready.

If you hold an Option contract for an underlying Equity when a split occurs, LEAN closes your Option contract position.

If a split event occurs before your order is filled, the unfilled portion of the order is adjusted automatically, where its quantity is multiplied by the split factor and the limit/stop/trigger price (if any) is divided by the split factor.

Dividends

A dividend is a payment that a company gives to shareholders to distribute profits. When a dividend payment occurs for an Equity in your algorithm, LEAN sends a Dividend object to the OnData on_data method. Dividend objects have the following properties:

If you backtest with the Adjusted ADJUSTED or TotalReturn TOTAL_RETURN data normalization mode, the dividends are factored into the price. If you backtest with the other data normalization modes or trade live, when a dividend payment occurs, LEAN automatically adds the payment amount to your cashbook. If you have indicators in your algorithm, reset and warm-up your indicators with ScaledRaw data when dividend payments occur so that the data in your indicators account for the price adjustments that the dividend causes.

To get the Dividend objects, index the Dividends dividends object with the security Symbol symbol . The Dividends dividends object may not contain data for your Symbol symbol . To avoid issues, check if the Dividends dividends object contains data for your security before you index it with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Dividends.ContainsKey(_symbol))
    {
        var dividend = slice.Dividends[_symbol];
    }
}

public override void OnDividends(Dividends dividends)
{
    if (dividends.ContainsKey(_symbol))
    {
        var dividend = dividends[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    dividend = slice.dividends.get(self._symbol)
    if dividend:
        pass

def on_dividends(self, dividends: Dividends) -> None:
    dividend = dividends.get(self._symbol)
    if dividend:
        pass

You can also iterate through the Dividends dividends dictionary. The keys of the dictionary are the Symbol objects and the values are the Dividend objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Dividends)
    {
        var symbol = kvp.Key;
        var dividend = kvp.Value;
    }
}

public override void OnDividends(Dividends dividends)
{
    foreach (var kvp in dividends)
    {
        var symbol = kvp.Key;
        var dividend = kvp.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, dividend in slice.dividends.items():
        pass

def on_dividends(self, dividends: Dividends) -> None:
    for symbol, dividend in dividends.items():
        pass

For a full example, see the DividendAlgorithm DividendAlgorithm in the LEAN GitHub repository.

Symbol Changes

The benefit of the Symbol class is that it always maps to the same security, regardless of their trading ticker. When a company changes its trading ticker, LEAN sends a SymbolChangedEvent to the OnData on_data method. SymbolChangedEvent objects have the following properties:

To get the SymbolChangedEvent objects, index the SymbolChangedEvents symbol_changed_events object with the security Symbol symbol . The SymbolChangedEvents symbol_changed_events object may not contain data for your Symbol symbol . To avoid issues, check if the SymbolChangedEvents symbol_changed_events object contains data for your security before you index it with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.SymbolChangedEvents.ContainsKey(_symbol))
    {
        var symbolChangedEvent = slice.SymbolChangedEvents[_symbol];
    }
}

public override void OnSymbolChangedEvents(SymbolChangedEvents symbolChangedEvents)
{
    if (symbolChangedEvents.ContainsKey(_symbol))
    {
        var symbolChangedEvent = symbolChangedEvents[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    symbol_changed_event = slice.symbol_changed_events.get(self._symbol)
    if symbol_changed_event:
        pass

def on_symbol_changed_events(self, symbol_changed_events: SymbolChangedEvents) -> None:
    symbol_changed_event = symbol_changed_events.get(self._symbol)
    if symbol_changed_event:
        pass

You can also iterate through the SymbolChangedEvents symbol_changed_events dictionary. The keys of the dictionary are the Symbol objects and the values are the SymbolChangedEvent objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.SymbolChangedEvents)
    {
        var symbol = kvp.Key;
        var symbolChangedEvent = kvp.Value;
    }
}

public override void OnSymbolChangedEvents(SymbolChangedEvents symbolChangedEvents)
{
    foreach (var kvp in symbolChangedEvents)
    {
        var symbol = kvp.Key;
        var symbolChangedEvent = kvp.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, symbol_changed_event in slice.symbol_changed_events.items():
        pass


def on_symbol_changed_events(self, symbol_changed_events: SymbolChangedEvents) -> None:
    for symbol, symbol_changed_event in symbol_changed_events.items():
        pass

If you have an open order for a security when they change their ticker, LEAN cancels your order. To keep your order, in the OnOrderEvent on_order_event method, get the quantity and Symbol of the cancelled order and submit a new order.

public override void OnOrderEvent(OrderEvent orderEvent)
{
    if (orderEvent.Status == OrderStatus.Canceled)
    {
        var ticket = Transactions.GetOrderTicket(orderEvent.OrderId);
        if (ticket.Tag.Contains("symbol changed event"))
        {
            Transactions.AddOrder(ticket.SubmitRequest);
        }
    } 
}
def on_order_event(self, order_event: OrderEvent) -> None:
    if order_event.status == OrderStatus.CANCELED:
        ticket = self.transactions.get_order_ticket(order_event.order_id)
        if "symbol changed event" in ticket.tag:
            self.transactions.add_order(ticket.submit_request)

LEAN stores the data for ticker changes in map files. To view some example map files, see the LEAN GitHub repository .

Delistings

When a company is delisting from an exchange, LEAN sends a Delisting object to the OnData on_data method. Delisting objects have the following properties:

You receive Delisting objects when a delisting is in the near future and when it occurs. To know if the delisting occurs in the near future or now, check the Type property.

To get the Delisting objects, index the Delistings delistings object with the security Symbol symbol . The Delistings delistings objects may not contain data for your Symbol symbol . To avoid issues, check if the Delistings delistings object contains data for your security before you index it with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Delistings.ContainsKey(_symbol))
    {
        var delisting = slice.Delistings[_symbol];
    }
}

public override void OnDelistings(Delistings delistings)
{
    if (delistings.ContainsKey(_symbol))
    {
        var delisting = delistings[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    delisting = slice.delistings.get(self._symbol)
    if delisting:
        pass

def on_delistings(self, delistings: Delistings) -> None:
    delisting = delistings.get(self._symbol)
    if delisting:
        pass

You can also iterate through the Delistings delistings dictionary. The keys of the dictionary are the Symbol objects and the values are the Delisting objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Delistings)
    {
        var symbol = kvp.Key;
        var delisting = kvp.Value;
    }
}

public override void OnDelistings(Delistings delistings)
{
    foreach (var kvp in delistings)
    {
        var symbol = kvp.Key;
        var delisting = kvp.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, delisting in slice.Delistings.items():
        pass

def on_delistings(self, delistings: Delistings) -> None:
    for symbol, delisting in delistings.items():
        pass

The delist warning occurs on the final trading day of the stock to give you time to gracefully exit out of positions before LEAN automatically liquidates them.

if (delisting.Type == DelistingType.Warning)
{
    // Liquidate with MarketOnOpenOrder on delisting warning
    var quantity = Portfolio[symbol].Quantity;
    if (quantity != 0)
    {
        MarketOnOpenOrder(symbol, -quantity);
    }
}
if delisting.type == DelistingType.WARNING:
    # Liquidate with MarketOnOpenOrder on delisting warning
    quantity = self.portfolio[symbol].quantity
    if quantity != 0:
        self.market_on_open_order(symbol, -quantity)

The OnSecuritiesChanged on_securities_changed event notifies the algorithm when delisted assets are removed from the universe.

To improve iteration speed, LEAN removes delisted securities from the Securities securities primary collection. To access all the securities, iterate the Securities.Total securities.total property.

foreach (var security in Securities.Total)
{ 

}

// Exclude delisted securities
foreach (var security in Securities.Values)
{ 

}
for security in self.securities.total:
    pass

# Exclude delisted securities
for security in self.securities.values():
    pass

For a full example, see the DelistingEventsAlgorithm DelistingEventsAlgorithm in the LEAN GitHub repository.

Live Trading Considerations

In backtesting, corporate actions occurs at midnight Eastern Time (ET). In live trading, the live data for corporate actions arrives at 6/7 AM ET, so that's when they occur.

 

US Equity

Corporate Fundamentals

Introduction

Corporate fundamental data contains all the information on the underlying company of an Equity asset and the information in their financial statements. Since corporate data contains information not found in price and alternative data, adding corporate data to your trading strategies provides you with more information so you can make more informed trading decisions. Corporate fundamental data is available through the US Fundamental Data from Morningstar .

Direct Access

To get fundamental data for Equities in your algorithm, use the Fundamentals fundamentals property of the Equity objects. The fundamental data represent the company's fundamentals for the current algorithm time.

var fundamentals = Securities[_symbol].Fundamentals;
fundamentals = self.securities[self._symbol].fundamentals

To get fundamental data for Equities, regardless of whether or not you have subscribed to them in your algorithm, call the Fundamentals fundamentals method. If you pass one Symbol , the method returns a Fundamental object. If you pass a list of Symbol objects, the method returns a list of Fundamental objects. The fundamental data represents the corporate fundamentals for the current algorithm time.

// Single asset 
var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);
var ibmFundamental = Fundamentals(ibm);

// Multiple assets
var nb = QuantConnect.Symbol.Create("NB", SecurityType.Equity, Market.USA);
var fundamentals = Fundamentals(new List<Symbol>{ nb, ibm }).ToList();
# Single asset
ibm = QuantConnect.symbol.create("IBM", SecurityType.EQUITY, Market.USA)
ibm_fundamental = self.fundamentals(ibm)

# Multiple assets
nb = QuantConnect.symbol.create("NB", SecurityType.EQUITY, Market.USA)
fundamentals = self.fundamentals([ nb, ibm ])

Data Availability

Some assets don't have fundamentals (for example, ETFs) and the Morningstar dataset doesn't provide fundamentals for all US Equities. To check if fundamental data is available for an asset, use the HasFundamentalData has_fundamental_data property.

var hasFundamentalData = Securities[_symbol].Fundamentals.HasFundamentalData;
has_fundamental_data = self.securities[self._symbol].fundamentals.has_fundamental_data

Object References

If you save a reference to the Fundamentals fundamentals object or its properties, you can access the fundamental properties as they change over time.

_fundamentals = Securities[_symbol].Fundamentals;
var earningRatios = _fundamentals.EarningRatios;
self._fundamentals = self.securities[self._symbol].fundamentals
earning_ratios = self.fundamentals.earning_ratios

Universe Selection

You can access fundamental data in the selection function of your fundamental universe .

public class MyUniverseAlgorithm : QCAlgorithm {
    public override void Initialize() 
    {
        UniverseSettings.Asynchronous = true;
        AddUniverse(FundamentalFilterFunction);
    }
        
    private IEnumerable<Symbol> FundamentalFilterFunction(IEnumerable<Fundamental> fundamental) 
    {
         return (from f in fundamental
                where f.HasFundamentalData
                select f.Symbol);
    }
}
class MyUniverseAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self.add_universe(self._fundamental_function)
    
    def _fundamental_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
        return [c.symbol for c in fundamental if c.has_fundamental_data]

Historical Data

To get historical fundamental data, call the History history method. The return type depends on how you call the method.

var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);

// Fundamental objects
var fundamentalHistory = History<Fundamental>(ibm, TimeSpan.FromDays(30));

// Fundamentals objects for all US Equities (including delisted companies)
var fundamentalsHistory = History<Fundamentals>(TimeSpan.FromDays(30));

// Collection of Fundamental objects for all US Equities (including delisted companies)
var collectionHistory = History(_universe, 30, Resolution.Daily);
foreach (var fundamental in collectionHistory)
{
    // Cast to Fundamental is required
    var highestMarketCap = fundamental.OfType<Fundamental>().OrderByDescending(x => x.MarketCap).Take(5);
}
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)

# Multi-index DataFrame objects
df_history = self.history(Fundamental, ibm, timedelta(30))

# Fundamental objects
fundamental_history = self.history[Fundamental](ibm, timedelta(30))

# Fundamentals objects for all US Equities (including delisted companies)
fundamentals_history = self.history[Fundamentals](timedelta(30))

# Multi-index Series objects of list of Fundamental objects
series_history = self.history(self._universe, 30, Resolution.DAILY)
for (universe_symbol, time), fundamental in series_history.items():
    highest_market_cap = sorted(fundamental, key=lambda x: x.market_cap)[-5:]

For more information about historical fundamental data, see Equity Fundamental Data .

Data Updates

The US Fundamental dataset only provides the originally-reported figures. If there was a mistake in reporting a figure, the data value isn't fixed later. In live trading, new fundamental data is available to your algorithms at approximately 6/7 AM Eastern Time (ET) each day. The majority of the corporate data update occurs once per month, but the financial ratios update daily. If there is no new data for a period of time, the previous data is filled forward.

Properties

The US Fundamentals dataset provides Fundamental objects. To filter Fundamental objects, you can use the MorningstarSectorCode , MorningstarIndustryGroupCode , and MorningstarIndustryCode enumeration values.

Fundamentals Attributes

Fundamentals objects have the following attributes:

MorningstarSectorCode Enumeration

Sectors are large super categories of data. To access the sector of an Equity, use the MorningstarSectorCode morningstar_sector_code property.

filtered = fundamental.Where(x => x.AssetClassification.MorningstarSectorCode == MorningstarSectorCode.Technology);
filtered = [x for x in fundamental if x.asset_classification.morningstar_sector_code == MorningstarSectorCode.TECHNOLOGY]

The MorningstarSectorCode enumeration has the following members:

MorningstarIndustryGroupCode Enumeration

Industry groups are clusters of related industries which tie together. To access the industry group of an Equity, use the MorningstarIndustryGroupCode morningstar_industry_group_code property.

filtered = fundamental.Where(x => x.AssetClassification.MorningstarIndustryGroupCode == MorningstarIndustryGroupCode.ApplicationSoftware);
filtered = [x for x in fundamental if x.asset_classification.morningstar_industry_group_code == MorningstarIndustryGroupCode.APPLICATION_SOFTWARE]

The MorningstarIndustryGroupCode enumeration has the following members:

MorningstarIndustryCode Enumeration

Industries are the finest level of classification available and are the individual industries according to the Morningstar classification system. To access the industry group of an Equity, use the MorningstarIndustryCode morningstar_industry_code property:

filtered = fundamental.Where(x => x.AssetClassification.MorningstarIndustryCode == MorningstarIndustryCode.SoftwareApplication);
filtered = [x for x in fundamental if x.asset_classification.morningstar_industry_code == MorningstarIndustryCode.SOFTWARE_APPLICATION]

The MorningstarIndustryCode enumeration has the following members:

Exchange Id Values

Exchange Id is mapped to represent the exchange that lists the Equity. To access the exchange Id of an Equity, use the PrimaryExchangeID primary_exchange_id property.

filtered = fundamental.Where(x => x.CompanyReference.PrimaryExchangeID == "NAS");
filtered = [x for x in fundamental if x.company_reference.primary_exchange_id == "NAS"]

The exchanges are represented by the following string values:

String Representation Exchange
NYS New York Stock Exchange (NYSE)
NAS NASDAQ
ASE American Stock Exchange (AMEX)
TSE Tokyo Stock Exchange
AMS Amsterdam Internet Exchange
SGO Santiago Stock Exchange
XMAD Madrid Stock Exchange
ASX Australian Securities Exchange
BVMF B3 (stock exchange)
LON London Stock Exchange
TKS Istanbul Stock Exchange Settlement and Custody Bank
SHG Shanghai Exchange
LIM Lima Stock Exchange
FRA Frankfurt Stock Exchange
JSE Johannesburg Stock Exchange
MIL Milan Stock Exchange
TAE Tel Aviv Stock Exchange
STO Stockholm Stock Exchange
ETR Deutsche Boerse Xetra Core
PAR Paris Stock Exchange
BUE Buenos Aires Stock Exchange
KRX Korea Exchange
SWX SIX Swiss Exchange
PINX Pink Sheets (OTC)
CSE Canadian Securities Exchange
PHS Philippine Stock Exchange
MEX Mexican Stock Exchange
TAI Taiwan Stock Exchange
IDX Indonesia Stock Exchange
OSL Oslo Stock Exchange
BOG Colombia Stock Exchange
NSE National Stock Exchange of India
HEL Nasdaq Helsinki
MISX Moscow Exchange
HKG Hong Kong Stock Exchange
IST Istanbul Stock Exchange
BOM Bombay Stock Exchange
TSX Toronto Stock Exchange
BRU Brussels Stock Exchange
BATS BATS Global Markets
ARCX NYSE Arca
GREY Grey Market (OTC)
DUS Dusseldorf Stock Exchange
BER Berlin Stock Exchange
ROCO Taipei Exchange
CNQ Canadian Trading and Quotation System Inc.
BSP Bangko Sentral ng Pilipinas
NEOE NEO Exchange

 

US Equity

Shorting

Introduction

In a regular long position, you buy shares and then sell them later to close the trade. In a short position, you borrow shares, sell them, and then buy the shares back later to close the trade. Short positions let you profit when a security's price decreases while you have the position open, but there are risks involved. For example, you can get a margin call and you may incur borrowing costs.

Holdings Accounting

If you have an open long position, your portfolio has a positive quantity of shares for that security. In contrast, if you have an open short position, your portfolio has a negative quantity of shares for that security.

Short Availability

To short sell, you need to borrow the shares from another investor or your brokerage. The short availability is the number of shares available for you to borrow. If you don't model the short availability in backtests, you could have a strategy that performs well in backtesting but doesn't trade in live mode because the shares aren't available to borrow. If you assume your short orders are successful in backtests, your backtesting results likely won't represent the true performance of actually trading the strategy during the backtest period. To get the short availability in your algorithms, use the US Equities Short Availability dataset . For more information about this topic, see Short Availability .

Borrowing Costs

In live trading, you usually pay a fee to borrow shares that you use to open a short position. Part of the fee goes to the investor that provided you with the opportunity to short with their shares. The borrowing rate is set by your live brokerage. In backtests, LEAN doesn't currently model borrowing costs, but we have an open GitHub Issue to add the functionality. Subscribe to GitHub Issue #4563 to track the feature progress.

 

US Equity

Data Preparation

Introduction

The US Equities dataset provides price data for backtests and live trading.

Sourcing

The QuantConnect data provider consolidates US Equity market data across all of the exchanges. Over-the-Counter (OTC) trades are excluded. The data is powered by the Securities Information Processor (SIP), so it has 100% market coverage. In contrast, free platforms that display data feeds like the Better Alternative Trading System (BATS) only have about 6-7% market coverage .

We provide live splits, dividends, and corporate actions for US companies. We deliver them to your algorithm before the trading day starts.

Bar Building

We aggregate ticks to build bars.

The bar-building process can exclude ticks. If a tick is excluded, its volume is aggregated in the bar but its price is not aggregated in the bar. Ticks are excluded if any of the following statements are true:

In the preceding tables, Participant refers to the entities on page 19 of the Consolidated Tape System Multicast Output Binary Specification .

Suspicious Ticks

Tick price data is raw and unfiltered, so it can contain a lot of noise. If a tick is not tradable, we flag it as suspicious. This process makes the bars a more realistic representation of what you could execute in live trading. If you use tick data, avoid using suspicious ticks in your algorithms as informative data points. We recommend only using tick data if you understand the risks and are able to perform your own tick filtering. Ticks are flagged as suspicious in the following situations:

Market Auction Prices

The opening and closing price of the day is set by very specific opening and closing auction ticks. When a stock like Apple is listed, it’s listed on Nasdaq. The open auction tick on Nasdaq is the price that’s used as the official open of the day. NYSE, BATS, and other exchanges also have opening auctions, but the only official opening price for Apple is the opening auction on the exchange where it was listed.

We set the opening and closing prices of the first and last bars of the day to the official auction prices. This process is used for second, minute, hour, and daily bars for the 9:30 AM and 4:30 PM Eastern Time (ET) prices. In contrast, other platforms might not be using the correct opening and closing prices.

The official auction prices are usually emitted 2-30 seconds after the market open and close. We do our best to use the official opening and closing prices in the bars we build, but the delay can be so large that there isn't enough time to update the opening and closing price of the bar before it's injected into your algorithms. For example, if you subscribe to second resolution data, we wait until the end of the second for the opening price but most second resolution data won’t get the official opening price. If you subscribe to minute resolution data, we wait until the end of the minute for the opening auction price. Most of the time, you’ll get the actual opening auction price with minute resolution data, but there are always exceptions. Nasdaq and NYSE can have delays in publishing the opening auction price, but we don’t have control over those issues and we have to emit the data on time so that you get the bar you are expecting.

Live and Backtesting Differences

In live trading, bars are built using the exchange timestamps with microsecond accuracy. This microsecond-by-microsecond processing of the ticks can mean that the individual bars between live trading and backtesting can have slightly different ticks. As a result, it's possible for a tick to be counted in different bars between backtesting and live trading, which can lead to bars having slightly different open, high, low, close, and volume values.

Data Availability

In live trading, live data is available in real-time. In backtests, live data is available at the following pre-market trading session.

 

US Equity

Market Hours

Introduction

This page shows the trading hours, holidays, and time zone of the US Equity market.

Pre-market Hours

The following table shows the pre-market hours for the US Equity market:

Weekday Time (America/New York)
Monday 04:00:00 to 09:30:00
Tuesday 04:00:00 to 09:30:00
Wednesday 04:00:00 to 09:30:00
Thursday 04:00:00 to 09:30:00
Friday 04:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the US Equity market:

Weekday Time (America/New York)
Monday 09:30:00 to 16:00:00
Tuesday 09:30:00 to 16:00:00
Wednesday 09:30:00 to 16:00:00
Thursday 09:30:00 to 16:00:00
Friday 09:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the US Equity market:

Weekday Time (America/New York)
Monday 16:00:00 to 20:00:00
Tuesday 16:00:00 to 20:00:00
Wednesday 16:00:00 to 20:00:00
Thursday 16:00:00 to 20:00:00
Friday 16:00:00 to 20:00:00

Holidays

LEAN uses the trading holidays from the NYSE website.

The following table shows the dates of holidays for the US Equity market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the US Equity market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The US Equity market trades in the America/New York time zone.

 

Asset Classes

India Equity

India Equities represent partial ownership in an Indian corporation.

See Also

BasicTemplateIndiaAlgorithm.py
BasicTemplateIndiaAlgorithm.cs

 

India Equity

Requesting Data

Introduction

Request India Equity data in your algorithm to receive a feed of asset prices in the OnData on_data method. Historical data for backtesting is unavailable. To trade India Equities live, you can use one of the brokerage data providers .

Create Subscriptions

To create an India Equity subscription, in the Initialize initialize method, call the AddEquity add_equity method. The AddEquity add_equity method returns an Equity object, which contains a Symbol symbol property. Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

_symbol = AddEquity("YESBANK", market: Market.India).Symbol;
self._symbol = self.add_equity("YESBANK", market=Market.INDIA).symbol

If you set the brokerage model to an India brokerage, you don't need to pass a market argument. To view the integrated brokerages that offer India Equities, see Brokerages .

Resolutions

The following table shows the available resolutions and data formats for India Equity subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK

Second SECOND

Minute MINUTE green check
Hour HOUR green check
Daily DAILY green check

The default resolution for India Equity subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddEquity add_equity method.

_symbol = AddEquity("YESBANK", Resolution.Daily, Market.India).Symbol;
self._symbol = self.add_equity("YESBANK", Resolution.DAILY, Market.INDIA).symbol

To create custom resolution periods, see Consolidating Data .

Supported Markets

LEAN groups all of the India Equity exchanges under Market.India Market.INDIA . To set the market for a security, pass a market argument to the AddEquity add_equity method.

_symbol = AddEquity("YESBANK", market: Market.India).Symbol;
self._symbol = self.add_equity("YESBANK", market=Market.INDIA).symbol

The brokerage models have a default market for each asset class. If you set a brokerage model, you may not need to specify the market to use.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

_symbol = AddEquity("YESBANK", market: Market.India, fillForward: false).Symbol;
self._symbol = self.add_equity("YESBANK", market=Market.INDIA, fill_forward=False).symbol

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. The amount of margin that's available depends on the brokerage model you use. For more information about the margin requirements of each brokerage, see the Margin section of the brokerage guides . To change the amount of leverage you can use for a security, pass a leverage argument to the AddEquity add_equity method.

_symbol = AddEquity("YESBANK", market: Market.India, leverage: 3).Symbol;
self._symbol = self.add_equity("YESBANK", market=Market.INDIA, leverage=3).symbol

Extended Market Hours

By default, your security subscriptions only cover regular trading hours. To subscribe to pre and post-market trading hours for a specific asset, enable the extendedMarketHours extended_market_hours argument when you create the security subscription.

_symbol = AddEquity("YESBANK", market: Market.India, extendedMarketHours: true).Symbol;
self._symbol = self.add_equity("YESBANK", market=Market.India, extended_market_hours=True).Symbol

You only receive extended market hours data if you create the subscription with minute, second, or tick resolution. If you create the subscription with daily or hourly resolution, the bars only reflect the regular trading hours.

To view the schedule of regular and extended market hours, see Market Hours .

Data Normalization

The data normalization mode defines how historical data is adjusted for corporate actions . The data normalization mode affects the data that LEAN passes to OnData on_data and the data from history request . By default, LEAN adjusts India Equity data for splits and dividends to produce a smooth price curve, but the following data normalization modes are available:

If you use Adjusted ADJUSTED , SplitAdjusted SPLIT_ADJUSTED , or TotalReturn TOTAL_RETURN , we use the entire split and dividend history to adjust historical prices. This process ensures you get the same adjusted prices, regardless of the backtest end date. The ScaledRaw SCALED_RAW data normalization is only for history requests . When you use ScaledRaw SCALED_RAW , we use the split and dividend history before the algorithm's current time to adjust historical prices. The ScaledRaw SCALED_RAW data normalization model enables you to warm up indicators with adjusted data when you subscribe to Raw RAW security data.

To set the data normalization mode for a security, pass a dataNormalizationMode data_normalization_mode argument to the AddEquity add_equity method..

_symbol = AddEquity("YESBANK", market: Market.India, dataNormalizationMode: DataNormalizationMode.Raw).Symbol;
self._symbol = AddEquity("YESBANK", market=Market.INDIA, data_normalization_mode=DataNormalizationMode.RAW).symbol

Properties

The AddEquity add_equity method returns an Equity object, which have the following properties:

 

India Equity

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a TradeBar argument, it only receives TradeBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the TradeBars DataDictionary is made up of TradeBar objects. To access individual data points in the dictionary, you can index the dictionary with the security ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for India Equity data, see Resolutions .

Trades

TradeBar objects are price bars that consolidate individual trades from the exchanges. They contain the open, high, low, close, and volume of trading activity over a period of time.

Tradebar decomposition

TradeBar objects have the following properties:

To get the TradeBar objects in the Slice , index the Slice or index the Bars bars property of the Slice with the security Symbol symbol . If the security doesn't actively trade or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    trade_bar = slice.bars.get(self._symbol)   # None if not found

You can also iterate through the TradeBars dictionary. The keys of the dictionary are the Symbol objects and the values are the TradeBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        var closePrice = tradeBar.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        close_price = trade_bar.close

 

India Equity

Corporate Actions

Introduction

India Equity subscriptions provide notifications for splits, dividends, symbol changes, and delistings.

We don't have a live data source for India Equity corporate actions, so the following event handlers don't run in live mode.

Splits

When a company does a stock split, the number of shares each shareholder owns increases and the price of each share decreases. When a company does a reverse stock split, the number of shares each shareholder owns decreases and the price of each share increases. A company may perform a stock split or a reverse stock split to adjust the price of their stock so that more investors trade it and the liquidity increases.

When a stock split or reverse stock split occurs for an Equity in your algorithm, LEAN sends a Split object to the OnData on_data method. Split objects have the following properties:

You receive Split objects when a split is in the near future and when it occurs. To know if the split occurs in the near future or now, check the Type type property.

If you backtest without the Raw RAW data normalization mode , the splits are factored into the price and volume. If you backtest with the Raw RAW data normalization mode or trade live, when a split occurs, LEAN automatically adjusts your positions based on the SplitFactor split_factor . If the post-split quantity isn't a valid lot size , LEAN credits the remaining value to your cashbook in your account currency. If you have indicators in your algorithm, reset and warm-up your indicators with ScaledRaw data when splits occur so that the data in your indicators account for the price adjustments that the splits cause.

To get the Split objects, index the Splits splits object with the security Symbol symbol . The Splits splits object may not contain data for your Symbol . To avoid issues, check if the Splits splits object contains data for your security before you index it with the security Symbol .

public override void OnData(Slice slice)
{
    if (slice.Splits.ContainsKey(_symbol))
    {
        var split = slice.Splits[_symbol];
    }
}

public override void OnSplits(Splits splits)
{
    if (splits.ContainsKey(_symbol))
    {
        var split = splits[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    split = slice.splits.get(self._symbol)
    if split:
        pass


def on_splits(self, splits: Splits) -> None:
    split = splits.get(self._symbol)
    if split:
        pass

You can also iterate through the Splits splits dictionary. The keys of the dictionary are the Symbol objects and the values are the Split objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Splits)
    {
        var symbol = kvp.Key;
        var split = kvp.Value;
    }
}

public override void OnSplits(Splits splits)
{
    foreach (var kvp in splits)
    {
        var symbol = kvp.Key;
        var split = kvp.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, split in slice.splits.items():
        pass

def on_splits(self, splits: Splits) -> None:
    for symbol, split in splits.items():
        pass

LEAN stores the data for stock splits in factor files. To view some example factor files, see the LEAN GitHub repository . In backtests, your algorithm receives Split objects at midnight. In live trading, your algorithm receives Split objects when the factor files are ready.

If you hold an Option contract for an underlying Equity when a split occurs, LEAN closes your Option contract position.

If a split event occurs before your order is filled, the unfilled portion of the order is adjusted automatically, where its quantity is multiplied by the split factor and the limit/stop/trigger price (if any) is divided by the split factor.

Dividends

A dividend is a payment that a company gives to shareholders to distribute profits. When a dividend payment occurs for an Equity in your algorithm, LEAN sends a Dividend object to the OnData on_data method. Dividend objects have the following properties:

If you backtest with the Adjusted ADJUSTED or TotalReturn TOTAL_RETURN data normalization mode, the dividends are factored into the price. If you backtest with the other data normalization modes or trade live, when a dividend payment occurs, LEAN automatically adds the payment amount to your cashbook. If you have indicators in your algorithm, reset and warm-up your indicators with ScaledRaw data when dividend payments occur so that the data in your indicators account for the price adjustments that the dividend causes.

To get the Dividend objects, index the Dividends dividends object with the security Symbol symbol . The Dividends dividends object may not contain data for your Symbol symbol . To avoid issues, check if the Dividends dividends object contains data for your security before you index it with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Dividends.ContainsKey(_symbol))
    {
        var dividend = slice.Dividends[_symbol];
    }
}

public override void OnDividends(Dividends dividends)
{
    if (dividends.ContainsKey(_symbol))
    {
        var dividend = dividends[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    dividend = slice.dividends.get(self._symbol)
    if dividend:
        pass

def on_dividends(self, dividends: Dividends) -> None:
    dividend = dividends.get(self._symbol)
    if dividend:
        pass

You can also iterate through the Dividends dividends dictionary. The keys of the dictionary are the Symbol objects and the values are the Dividend objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Dividends)
    {
        var symbol = kvp.Key;
        var dividend = kvp.Value;
    }
}

public override void OnDividends(Dividends dividends)
{
    foreach (var kvp in dividends)
    {
        var symbol = kvp.Key;
        var dividend = kvp.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, dividend in slice.dividends.items():
        pass

def on_dividends(self, dividends: Dividends) -> None:
    for symbol, dividend in dividends.items():
        pass

For a full example, see the DividendAlgorithm DividendAlgorithm in the LEAN GitHub repository.

Symbol Changes

The benefit of the Symbol class is that it always maps to the same security, regardless of their trading ticker. When a company changes its trading ticker, LEAN sends a SymbolChangedEvent to the OnData on_data method. SymbolChangedEvent objects have the following properties:

To get the SymbolChangedEvent objects, index the SymbolChangedEvents symbol_changed_events object with the security Symbol symbol . The SymbolChangedEvents symbol_changed_events object may not contain data for your Symbol symbol . To avoid issues, check if the SymbolChangedEvents symbol_changed_events object contains data for your security before you index it with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.SymbolChangedEvents.ContainsKey(_symbol))
    {
        var symbolChangedEvent = slice.SymbolChangedEvents[_symbol];
    }
}

public override void OnSymbolChangedEvents(SymbolChangedEvents symbolChangedEvents)
{
    if (symbolChangedEvents.ContainsKey(_symbol))
    {
        var symbolChangedEvent = symbolChangedEvents[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    symbol_changed_event = slice.symbol_changed_events.get(self._symbol)
    if symbol_changed_event:
        pass

def on_symbol_changed_events(self, symbol_changed_events: SymbolChangedEvents) -> None:
    symbol_changed_event = symbol_changed_events.get(self._symbol)
    if symbol_changed_event:
        pass

You can also iterate through the SymbolChangedEvents symbol_changed_events dictionary. The keys of the dictionary are the Symbol objects and the values are the SymbolChangedEvent objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.SymbolChangedEvents)
    {
        var symbol = kvp.Key;
        var symbolChangedEvent = kvp.Value;
    }
}

public override void OnSymbolChangedEvents(SymbolChangedEvents symbolChangedEvents)
{
    foreach (var kvp in symbolChangedEvents)
    {
        var symbol = kvp.Key;
        var symbolChangedEvent = kvp.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, symbol_changed_event in slice.symbol_changed_events.items():
        pass


def on_symbol_changed_events(self, symbol_changed_events: SymbolChangedEvents) -> None:
    for symbol, symbol_changed_event in symbol_changed_events.items():
        pass

If you have an open order for a security when they change their ticker, LEAN cancels your order. To keep your order, in the OnOrderEvent on_order_event method, get the quantity and Symbol of the cancelled order and submit a new order.

public override void OnOrderEvent(OrderEvent orderEvent)
{
    if (orderEvent.Status == OrderStatus.Canceled)
    {
        var ticket = Transactions.GetOrderTicket(orderEvent.OrderId);
        if (ticket.Tag.Contains("symbol changed event"))
        {
            Transactions.AddOrder(ticket.SubmitRequest);
        }
    } 
}
def on_order_event(self, order_event: OrderEvent) -> None:
    if order_event.status == OrderStatus.CANCELED:
        ticket = self.transactions.get_order_ticket(order_event.order_id)
        if "symbol changed event" in ticket.tag:
            self.transactions.add_order(ticket.submit_request)

LEAN stores the data for ticker changes in map files. To view some example map files, see the LEAN GitHub repository .

Delistings

When a company is delisting from an exchange, LEAN sends a Delisting object to the OnData on_data method. Delisting objects have the following properties:

You receive Delisting objects when a delisting is in the near future and when it occurs. To know if the delisting occurs in the near future or now, check the Type property.

To get the Delisting objects, index the Delistings delistings object with the security Symbol symbol . The Delistings delistings objects may not contain data for your Symbol symbol . To avoid issues, check if the Delistings delistings object contains data for your security before you index it with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Delistings.ContainsKey(_symbol))
    {
        var delisting = slice.Delistings[_symbol];
    }
}

public override void OnDelistings(Delistings delistings)
{
    if (delistings.ContainsKey(_symbol))
    {
        var delisting = delistings[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    delisting = slice.delistings.get(self._symbol)
    if delisting:
        pass

def on_delistings(self, delistings: Delistings) -> None:
    delisting = delistings.get(self._symbol)
    if delisting:
        pass

You can also iterate through the Delistings delistings dictionary. The keys of the dictionary are the Symbol objects and the values are the Delisting objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Delistings)
    {
        var symbol = kvp.Key;
        var delisting = kvp.Value;
    }
}

public override void OnDelistings(Delistings delistings)
{
    foreach (var kvp in delistings)
    {
        var symbol = kvp.Key;
        var delisting = kvp.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, delisting in slice.Delistings.items():
        pass

def on_delistings(self, delistings: Delistings) -> None:
    for symbol, delisting in delistings.items():
        pass

The delist warning occurs on the final trading day of the stock to give you time to gracefully exit out of positions before LEAN automatically liquidates them.

if (delisting.Type == DelistingType.Warning)
{
    // Liquidate with MarketOnOpenOrder on delisting warning
    var quantity = Portfolio[symbol].Quantity;
    if (quantity != 0)
    {
        MarketOnOpenOrder(symbol, -quantity);
    }
}
if delisting.type == DelistingType.WARNING:
    # Liquidate with MarketOnOpenOrder on delisting warning
    quantity = self.portfolio[symbol].quantity
    if quantity != 0:
        self.market_on_open_order(symbol, -quantity)

The OnSecuritiesChanged on_securities_changed event notifies the algorithm when delisted assets are removed from the universe.

To improve iteration speed, LEAN removes delisted securities from the Securities securities primary collection. To access all the securities, iterate the Securities.Total securities.total property.

foreach (var security in Securities.Total)
{ 

}

// Exclude delisted securities
foreach (var security in Securities.Values)
{ 

}
for security in self.securities.total:
    pass

# Exclude delisted securities
for security in self.securities.values():
    pass

For a full example, see the DelistingEventsAlgorithm DelistingEventsAlgorithm in the LEAN GitHub repository.

 

India Equity

Market Hours

Introduction

This page shows the trading hours, holidays, and time zone of the India Equity market.

Historical data for backtesting is unavailable for INDIA. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

The following table shows the pre-market hours for the India Equity market:

Weekday Time (Asia/Kolkata)
Monday 09:00:00 to 09:15:00
Tuesday 09:00:00 to 09:15:00
Wednesday 09:00:00 to 09:15:00
Thursday 09:00:00 to 09:15:00
Friday 09:00:00 to 09:15:00

Regular Trading Hours

The following table shows the regular trading hours for the India Equity market:

Weekday Time (Asia/Kolkata)
Monday 09:15:00 to 15:30:00
Tuesday 09:15:00 to 15:30:00
Wednesday 09:15:00 to 15:30:00
Thursday 09:15:00 to 15:30:00
Friday 09:15:00 to 15:30:00

Post-market Hours

The following table shows the post-market hours for the India Equity market:

Weekday Time (Asia/Kolkata)
Monday 15:40:00 to 16:00:00
Tuesday 15:40:00 to 16:00:00
Wednesday 15:40:00 to 16:00:00
Thursday 15:40:00 to 16:00:00
Friday 15:40:00 to 16:00:00

Holidays

The following table shows the dates of holidays for the India Equity market:

Date ( yyyy-mm-dd )
2004-01-26 2004-04-14 2005-01-26 2005-04-14 2005-08-15
2006-01-26 2006-04-14 2006-05-01 2006-08-15 2006-10-02
2006-12-25 2007-01-26 2007-05-01 2007-08-15 2007-10-02
2007-12-25 2008-04-14 2008-05-01 2008-08-15 2008-10-02
2008-12-25 2009-01-26 2009-04-14 2009-05-01 2009-10-02
2009-12-25 2010-01-26 2010-04-14 2011-01-26 2011-03-02
2011-04-12 2011-04-14 2011-04-22 2011-08-15 2011-08-31
2011-09-01 2011-10-06 2011-10-26 2011-10-27 2011-11-07
2011-11-10 2011-12-06 2012-01-26 2012-02-20 2012-03-08
2012-04-05 2012-04-06 2012-05-01 2012-08-15 2012-08-20
2012-09-19 2012-10-02 2012-10-24 2012-11-14 2012-11-28
2012-12-25 2013-03-27 2013-03-29 2013-04-19 2013-04-24
2013-05-01 2013-08-09 2013-08-15 2013-09-09 2013-10-02
2013-10-16 2013-11-04 2013-11-15 2013-12-25 2014-02-27
2014-03-17 2014-04-08 2014-04-14 2014-04-18 2014-04-24
2014-05-01 2014-07-29 2014-08-15 2014-08-29 2014-10-02
2014-10-03 2014-10-06 2014-10-15 2014-10-24 2014-11-04
2014-11-06 2014-12-25 2015-01-26 2015-02-17 2015-03-06
2015-04-02 2015-04-03 2015-04-14 2015-05-01 2015-09-17
2015-09-25 2015-10-02 2015-10-22 2015-11-12 2015-11-25
2015-12-25 2016-01-26 2016-03-07 2016-03-24 2016-03-25
2016-04-14 2016-04-15 2016-04-19 2016-07-06 2016-08-15
2016-09-05 2016-09-13 2016-10-11 2016-10-12 2016-10-31
2016-11-14 2017-01-26 2017-02-24 2017-03-13 2017-04-04
2017-04-14 2017-05-01 2017-06-26 2017-08-15 2017-08-25
2017-10-02 2017-10-20 2017-12-25 2018-01-26 2018-02-13
2018-03-02 2018-03-29 2018-03-30 2018-05-01 2018-08-15
2018-08-22 2018-09-13 2018-09-20 2018-10-02 2018-10-18
2018-11-08 2018-11-23 2018-12-25 2019-03-04 2019-03-21
2019-04-17 2019-04-19 2019-04-29 2019-05-01 2019-06-05
2019-08-12 2019-08-15 2019-09-02 2019-09-10 2019-10-02
2019-10-08 2019-10-21 2019-10-28 2019-11-12 2019-12-25
2020-02-21 2020-03-10 2020-04-02 2020-04-06 2020-04-10
2020-04-14 2020-05-01 2020-05-25 2020-10-02 2020-11-16
2020-11-30 2020-12-25 2021-01-26 2021-03-11 2021-03-29
2021-04-02 2021-04-14 2021-04-21 2021-05-13 2021-07-21
2021-08-19 2021-09-10 2021-10-15 2021-11-05 2021-11-19
2022-01-26 2022-04-14 2022-08-15 2023-01-26 2023-04-14
2023-05-01 2023-08-15 2023-10-02 2023-12-25 2024-01-26
2024-05-01 2024-08-15 2024-10-02 2024-12-25 2025-04-14
2025-05-01

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The India Equity market trades in the Asia/Kolkata time zone.

 

Asset Classes

Equity Options

Equity Options are a financial derivative that gives the holder the right (but not the obligation) to buy or sell the underlying Equity, such as Apple, at the stated exercise price.

See Also

BasicTemplateOptionsAlgorithm.py
BasicTemplateOptionsAlgorithm.cs
Introduction to Options
Applied Options

 

Equity Options

Requesting Data

Introduction

Request Equity Options data in your algorithm to receive a feed of contract prices in the OnData on_data method. For more information about the specific dataset we use for backtests, see the US Equity Options dataset listing . To trade Equity Options live, you can use one of the brokerage data providers . We currently only support American-style Options for US Equity Options.

Create Subscriptions

Before you can subscribe to an Option contract, you must configure the underlying Equity and get the contract Symbol .

Configure the Underlying Equity

If you want to subscribe to the underlying Equity in the Initialize initialize method, set the Equity data normalization to DataNormalizationMode.Raw DataNormalizationMode.RAW .

_symbol = AddEquity("SPY", dataNormalizationMode: DataNormalizationMode.Raw).Symbol;
self._symbol = self.add_equity("SPY", data_normalization_mode=DataNormalizationMode.RAW).symbol

If your algorithm has a dynamic universe of Equities, before you add the Equity universe in the Initialize initialize method, set the universe data normalization mode to DataNormalizationMode.Raw DataNormalizationMode.RAW .

UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW

If you subscribe to an Equity Option contract but don't have a subscription to the underlying Equity, LEAN automatically subscribes to the underlying Equity with the following settings:

Setting Value
Fill forward Same as the Option contract
Leverage 0
Extended Market Hours Same as the Option contract
Data Normalization DataNormalizationMode.Raw DataNormalizationMode.RAW

In this case, you still need the Equity Symbol to subscribe to Equity Option contracts. If you don't have access to it, create it.

_symbol = QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA);
self._symbol = Symbol.create("SPY", SecurityType.EQUITY, Market.USA)

To override the initial guess of implied volatility , set and warm up the underlying volatility model .

Get Contract Symbols

To subscribe to an Option contract, you need the contract Symbol . You can get the contract Symbol from the CreateOption create_option method or from the OptionChainProvider option_chain_provider . If you use the CreateOption create_option method, you need to provide the details of an existing contract.

_contractSymbol = QuantConnect.Symbol.CreateOption(_symbol, Market.USA,
    OptionStyle.American, OptionRight.Call, 365, new DateTime(2022, 6, 17));
self._contract_symbol = Symbol.create_option(self._symbol, Market.USA,
    OptionStyle.AMERICAN, OptionRight.CALL, 365, datetime(2022, 6, 17))

Another way to get an Option contract Symbol is to use the OptionChainProvider option_chain_provider . The GetOptionContractList get_option_contract_list method of OptionChainProvider option_chain_provider returns a list of Symbol objects that reference the available Option contracts for a given underlying Equity on a given date. To filter and select contracts, you can use the following properties of each Symbol object:

Property Description
ID.Date id.date The expiration date of the contract.
ID.StrikePrice id.strike_price The strike price of the contract.
ID.OptionRight id.option_right The contract type. The OptionRight enumeration has the following members:
ID.OptionStyle id.option_style The contract style. The OptionStyle enumeration has the following members:
We currently only support American-style Options for US Equity Options.
var contractSymbols = OptionChainProvider.GetOptionContractList(_symbol, Time);
var expiry = contractSymbols.Select(symbol => symbol.ID.Date).Min();
var filteredSymbols = contractSymbols.Where(symbol => symbol.ID.Date == expiry && symbol.ID.OptionRight == OptionRight.Call);
_contractSymbol = filteredSymbols.OrderByDescending(symbol => symbol.ID.StrikePrice).Last();
contract_symbols = self.option_chain_provider.get_option_contract_list(self._symbol, self.time)
expiry = min([symbol.id.date for symbol in contract_symbols])
filtered_symbols = [symbol for symbol in contract_symbols if symbol.id.date == expiry and symbol.id.option_right == OptionRight.CALL]
self._contract_symbol = sorted(filtered_symbols, key=lambda symbol: symbol.id.strike_price)[0]

Subscribe to Contracts

To create an Equity Option contract subscription, pass the contract Symbol to the AddOptionContract add_option_contract method. Save a reference to the contract Symbol symbol so you can easily access the Option contract in the OptionChain that LEAN passes to the OnData on_data method. This method returns an Option object. To override the default pricing model of the Option, set a pricing model .

var option = AddOptionContract(_contractSymbol);
option.PriceModel = OptionPriceModels.BinomialCoxRossRubinstein();
option = self.add_option_contract(self._contract_symbol)
option.price_model = OptionPriceModels.binomial_cox_ross_rubinstein()

The AddOptionContract add_option_contract method creates a subscription for a single Option contract and adds it to your user-defined universe. To create a dynamic universe of Option contracts, add an Equity Options universe or an Options Universe Selection model .

Warm Up Contract Prices

If you subscribe to an Option contract with AddOptionContract add_option_contract , you'll need to wait until the next Slice to receive data and trade the contract. To trade the contract in the same time step you subscribe to the contract, set the current price of the contract in a security initializer .

var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, seeder));
seeder = FuncSecuritySeeder(self.get_last_known_prices)
self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, seeder))

Supported Assets

To view the supported assets in the US Equities dataset, see the Data Explorer .

Resolutions

The following table shows the available resolutions and data formats for Equity Option contract subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK

Second SECOND

Minute MINUTE green check green check
Hour HOUR green check green check
Daily DAILY green check green check

The default resolution for Option contract subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddOptionContract add_option_contract method.

AddOptionContract(_contractSymbol, Resolution.Minute);
self.add_option_contract(self._contract_symbol, Resolution.MINUTE)

To create custom resolution periods, see Consolidating Data .

Supported Markets

LEAN groups all of the US Equity exchanges under Market.USA . You don't need to pass a Market market argument to the AddOptionContract add_option_contract method because the contract Symbol symbol already contains the market.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

AddOptionContract(_contractSymbol, fillForward: false);
self.add_option_contract(self._contract_symbol, fill_forward=False)

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. Options are already leveraged products, so you can't change their leverage.

Extended Market Hours

By default, your security subscriptions only cover regular trading hours. To subscribe to pre and post-market trading hours for a specific asset, enable the extendedMarketHours extended_market_hours argument when you create the security subscription.

AddOptionContract(_contractSymbol, extendedMarketHours: true);
self.add_option_contract(self._contract_symbol, extended_market_hours=True)

You only receive extended market hours data if you create the subscription with minute, second, or tick resolution. If you create the subscription with daily or hourly resolution, the bars only reflect the regular trading hours.

To view the schedule of regular and extended market hours, see Market Hours .

Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to OnData on_data or the data from history request . By default, LEAN doesn't adjust Equity Options data for splits and dividends of their underlying. If you change the data normalization mode, it won't change the outcome.

If you hold an Option contract when a corporate action occurs for the underlying Equity, LEAN automatically closes your position.

Remove Subscriptions

To remove a contract subscription that you created with AddOptionContract , call the RemoveOptionContract remove_option_contract method. This method is an alias for RemoveSecurity remove_security .

RemoveOptionContract(_contractSymbol);
self.remove_option_contract(self._contract_symbol)

The RemoveOptionContract remove_option_contract method cancels your open orders for the contract and liquidates your holdings.

Properties

The AddOptionContract method returns an Option object, which have the following properties:

Helper Methods

The Option object provides methods you can use for basic calculations. These methods require the underlying price. To get the Option object and the Security object for its underlying in any function, use the Option Symbol symbol to access the value in the Securities securities object.

var option = Securities[_contractSymbol];
var underlying = Securities[_contractSymbol.Underlying];
var underlyingPrice = underlying.Price;
option = self.securities[self._contract_symbol]
underlying = self.securities[self._contract_symbol.underlying]
underlying_price = underlying.price

To get the Option payoff , call the GetPayOff get_pay_off method.

var payOff = option.GetPayOff(underlyingPrice);
pay_off = option.get_pay_off(underlying_price)

To get the Option intrinsic value , call the GetIntrinsicValue get_intrinsic_value method.

var intrinsicValue = option.GetIntrinsicValue(underlyingPrice);
intrinsic_value = option.get_intrinsic_value(underlying_price)

To get the Option out-of-the-money amount , call the OutOfTheMoneyAmount out_of_the_money_amount method.

var otmAmount = option.OutOfTheMoneyAmount(underlyingPrice);
otm_amount = option.out_of_the_money_amount(underlying_price)

To check whether the Option can be automatic exercised, call the IsAutoExercised is_auto_exercised method.

var isAutoExercised = option.IsAutoExercised(underlyingPrice);
is_auto_exercised = option.is_auto_exercised(underlying_price)

Example

The following example shows how to update the Option chain every five minutes. The OptionChainManager class implements the selection logic and manages the contract subscriptions.

namespace QuantConnect.Algorithm.CSharp
{
    public class OptionChainProviderFullExample : QCAlgorithm
    {
        private Dictionary<Symbol, OptionChainManager> _chainManager = new();
        public override void Initialize()
        {
            SetStartDate(2023, 1, 2);
            SetEndDate(2023, 1, 30);
            SetCash(100000);
            UniverseSettings.Asynchronous = true;
            UniverseSettings.MinimumTimeInUniverse = TimeSpan.Zero;
            SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
            var spy = AddEquity("SPY", dataNormalizationMode: DataNormalizationMode.Raw).Symbol;
            _chainManager[QuantConnect.Symbol.CreateCanonicalOption(spy)] = new(-10, 10, 0, 7);
            PopulateOptionChain();
            Schedule.On(DateRules.EveryDay(spy), TimeRules.AfterMarketOpen(spy, 1), PopulateOptionChain);
            Schedule.On(DateRules.EveryDay(spy), TimeRules.Every(TimeSpan.FromMinutes(5)), Filter);
        }
        
        private void PopulateOptionChain()
        {
            // The contract list is updated daily, so we can get it and apply
            // the expiration filter as soon as the market open
            foreach (var (symbol, manager) in _chainManager)
            {
                manager.SetChain(OptionChainProvider.GetOptionContractList(symbol, Time), Time);
            }
    
            Filter();
        }
        
        private void Filter()
        {
            foreach (var (symbol, manager) in _chainManager)
            {
                manager.Select(this, symbol);
            }
        }
        
        public override void OnData(Slice slice)
        {
            foreach (var (symbol, manager) in _chainManager)
            {
                if (!slice.OptionChains.TryGetValue(symbol, out var chain))
                    continue;
                var expiry = chain.Min(x => x.Expiry);
                var atmCall = chain
                    .Where(x => x.Expiry == expiry && x.Right == OptionRight.Call && Securities[x.Symbol].IsTradable)
                    .OrderBy(x => Math.Abs(chain.Underlying.Price - x.Strike))
                    .FirstOrDefault();

                if (atmCall != null && !Portfolio[atmCall.Symbol].Invested)
                    MarketOrder(atmCall.Symbol, 1);
            }
        }
    }

    internal class OptionChainManager
    {
        private readonly int _minStrike;
        private readonly int _maxStrike;
        private readonly int _minExpiry;
        private readonly int _maxExpiry;
        private List<Symbol> _chain = new();
        private readonly List<Symbol> _symbols = new();

        public OptionChainManager(int minStrike, int maxStrike, int minExpiry, int maxExpiry)
        {
            _minStrike = minStrike;
            _maxStrike = maxStrike;
            _minExpiry = minExpiry;
            _maxExpiry = maxExpiry;
        }

        public void SetChain(IEnumerable<Symbol> symbols, DateTime time)
        {
            _chain = symbols.Where(x =>
            {
                var totalDays = (x.ID.Date - time).TotalDays;
                return _minExpiry <= totalDays && totalDays <= _maxExpiry;
            }).ToList();
        }
        
        public void Select(QCAlgorithm algorithm, Symbol underlyingSymbol)
        {
            if (_chain.IsNullOrEmpty())
                return;
            if (underlyingSymbol.IsCanonical())
                underlyingSymbol = underlyingSymbol.Underlying;

            var strikes = _chain.Select(x => x.ID.StrikePrice).OrderBy(x => x).Distinct().ToList();
            var spot = algorithm.Securities[underlyingSymbol].Price;
            var atm = strikes.OrderBy(x => Math.Abs(spot - x)).FirstOrDefault();
            var index = strikes.IndexOf(atm);
            var minStrike = strikes[Math.Max(0, index + _minStrike)];
            var maxStrike = strikes[Math.Min(strikes.Count - 1, index + _maxStrike)];
            var symbols = _chain.Where(x => minStrike <= x.ID.StrikePrice && x.ID.StrikePrice <= maxStrike).ToList();

            var toRemove = _symbols.Except(symbols).ToList();
            foreach (var symbol in toRemove)
            {
                if (algorithm.RemoveOptionContract(symbol))
                    _symbols.Remove(symbol);
            }
            var toAdd = symbols.Except(_symbols).ToList();
            foreach (var symbol in toAdd)
            {
                _symbols.Add(symbol);
                algorithm.AddOptionContract(symbol);
            }
        }
    }
}
class OptionChainProviderFullExample(QCAlgorithm):

    def initialize(self):
        self.set_start_date(2023, 1, 2)
        self.set_end_date(2023, 1, 30)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        self.universe_settings.minimum_time_in_universe = timedelta(minutes=0)
        self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
        spy = self.add_equity("SPY", data_normalization_mode=DataNormalizationMode.RAW).symbol
        self._chain_manager = {
            Symbol.create_canonical_option(spy): OptionChainManager(-10, 10, 0, 7)
        }
        self._populate_option_chain()
        self.schedule.on(self.date_rules.every_day(spy), self.time_rules.after_market_open(spy, 1), self._populate_option_chain)
        self.schedule.on(self.date_rules.every_day(spy), self.time_rules.every(timedelta(minutes=5)), self._filter)

    def _populate_option_chain(self):
        # The contract list is updated daily, so we can get it and apply
        # the expiration filter as soon as the market open
        for symbol, manager in self._chain_manager.items():
            manager.set_chain(self.option_chain_provider.get_option_contract_list(symbol, self.time), self.time)
        self._filter()

    def _filter(self):
        for symbol, manager in self._chain_manager.items():
            manager.select(self, symbol)

    def on_data(self, slice: Slice) -> None:
        for symbol, _ in self._chain_manager.items():
            chain = slice.option_chains.get(symbol)
            if not chain: continue
            if self.portfolio[symbol.underlying].invested:
                self.liquidate(symbol.underlying)

            expiry = min([x.expiry for x in chain])
            contracts = [x for x in chain if x.expiry == expiry and x.right == OptionRight.CALL and self.securities[x.symbol].is_tradable]
            if not contracts: continue
            atm_call = sorted(contracts, key=lambda x: abs(chain.underlying.price-x.strike))[0]

            if not self.portfolio[atm_call.symbol].invested:
                self.market_order(atm_call.symbol, 1)

class OptionChainManager:
    _chain = []
    _symbols = []
    
    def __init__(self, min_strike, max_strike, min_expiry, max_expiry):
        self._min_strike = min_strike
        self._max_strike = max_strike
        self._min_expiry = min_expiry
        self._max_expiry = max_expiry
    
    def set_chain(self, symbols: List[Symbol], time: datetime) -> None:
        self._chain = [x for x in symbols if self._min_expiry <= (x.id.date - time).days <= self._max_expiry]
    
    def select(self, algorithm: QCAlgorithm, symbol: Symbol) -> None:
        if not self._chain:
            return
        if symbol.is_canonical():
            symbol = symbol.underlying
        strikes = sorted(set(x.id.strike_price for x in self._chain))
        spot = algorithm.securities[symbol].price
        atm = sorted(strikes, key=lambda x: abs(spot-x))[0]
        index = strikes.index(atm)
        min_strike = strikes[max(0, index + self._min_strike)]
        max_strike = strikes[min(len(strikes) - 1, index + self._max_strike)]
        symbols = set(x for x in self._chain if min_strike <= x.id.strike_price <= max_strike)
        to_remove = set(self._symbols).difference(symbols)
        for symbol in to_remove:
            if algorithm.remove_option_contract(symbol):
                self._symbols.remove(symbol)
        to_add = symbols.difference(self._symbols)
        for symbol in to_add:
            self._symbols.append(symbol)
            algorithm.add_option_contract(symbol)

 

Equity Options

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a TradeBar argument, it only receives TradeBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the TradeBars DataDictionary is made up of TradeBar objects. To access individual data points in the dictionary, you can index the dictionary with the contract ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for Equity Options data, see Resolutions .

Trades

TradeBar objects are price bars that consolidate individual trades from the exchanges. They contain the open, high, low, close, and volume of trading activity over a period of time.

Tradebar decomposition

TradeBar objects have the following properties:

To get the TradeBar objects in the Slice , index the Slice or index the Bars bars property of the Slice with the contract Symbol symbol . If the contract doesn't actively trade or you are in the same time step as when you added the contract subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your contract before you index the Slice with the contract Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_contractSymbol))
    {
        var tradeBar = slice.Bars[_contractSymbol];
    }
}
def on_data(self, slice: Slice) -> None:
    trade_bar = slice.bars.get(self._contract_symbol)   # None if not found

You can also iterate through the TradeBars dictionary. The keys of the dictionary are the Symbol objects and the values are the TradeBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        var closePrice = tradeBar.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        close_price = trade_bar.close

Quotes

QuoteBar objects are bars that consolidate NBBO quotes from the exchanges. They contain the open, high, low, and close prices of the bid and ask. The Open open , High high , Low low , and Close close properties of the QuoteBar object are the mean of the respective bid and ask prices. If the bid or ask portion of the QuoteBar has no data, the Open open , High high , Low low , and Close close properties of the QuoteBar copy the values of either the Bid bid or Ask ask instead of taking their mean.

Quotebar decomposition

QuoteBar objects have the following properties:

To get the QuoteBar objects in the Slice , index the QuoteBars property of the Slice with the contract Symbol symbol . If the contract doesn't actively get quotes or you are in the same time step as when you added the contract subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your contract before you index the Slice with the contract Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_contractSymbol))
    {
        var quoteBar = slice.QuoteBars[_contractSymbol];
    }
}
def on_data(self, slice: Slice) -> None:
    quote_bar = slice.quote_bars.get(self._contract_symbol)   # None if not found

You can also iterate through the QuoteBars dictionary. The keys of the dictionary are the Symbol objects and the values are the QuoteBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        var askPrice = quoteBar.Ask.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        ask_price = quote_bar.ask.close

QuoteBar objects let LEAN incorporate spread costs into your simulated trade fills to make backtest results more realistic.

Option Chains

OptionChain objects represent an entire chain of Option contracts for a single underlying security. They have the following properties:

To get the OptionChain , index the OptionChains option_chains property of the Slice with the canonical Symbol .

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._contract_symbol.Canonical)
    if chain:
        contracts = chain.contracts

You can also loop through the OptionChains option_chains property to get each OptionChain .

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.OptionChains)
    {
        var canonicalSymbol = kvp.Key;
        var chain = kvp.Value;
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    for canonical_symbol, chain in slice.option_chains.items():
        contracts = chain.contracts

Option Contracts

OptionContract objects represent the data of a single Option contract in the market. They have the following properties:

To get the Option contracts in the Slice , use the Contracts contracts property of the OptionChain .

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var price = contract.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._contract_symbol)
        if contract:
            price = contract.price

Greeks and Implied Volatility

To get the Greeks and implied volatility of an Option contract, use the Greeks greeks and implied_volatility members.

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var delta = contract.Greeks.Delta;
            var iv = contract.ImpliedVolatility;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._contract_symbol)
        if contract:
            delta = contract.greeks.delta
            iv = contract.implied_volatility

LEAN only calculates Greeks and implied volatility when you request them because they are expensive operations. If you invoke the Greeks greeks property, the Greeks aren't calculated. However, if you invoke the Greeks.Delta greeks.delta , LEAN calculates the delta. To avoid unecessary computation in your algorithm, only request the Greeks and implied volatility when you need them. For more information about the Greeks and implied volatility, see Options Pricing .

Open Interest

Open interest is the number of outstanding contracts that haven't been settled. It provides a measure of investor interest and the market liquidity, so it's a popular metric to use for contract selection. Open interest is calculated once per day. To get the latest open interest value, use the OpenInterest open_interest property of the Option or OptionContract Optioncontract .

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var openInterest = contract.OpenInterest;
        }
    }
}

public void OnData(OptionChains optionChains)
{
    if (optionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var openInterest = contract.OpenInterest;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.OptionChains.get(self._contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._contract_symbol)
        if contract:
            open_interest = contract.open_interest

 

Equity Options

Greeks and Implied Volatility

Greeks and Implied Volatilty

See Also

Option Pricing
Risk Free Interest Rate
Dividend Yield

 

Greeks and Implied Volatility

Key Concepts

Option Pricing

As derivatives, Options are subject to a zero-sum game dynamic, necessitating counterparties to take opposing positions. Consequently, it is essential to accurately determine the fair value of an Option to avoid potential disadvantages resulting from counterparties. It's possible to calculate the theoretical value of an Option using only its own terms and the underlying price series expectations.

$$ P = F(S_t, K, \sigma, T, r, q) $$

where $P$ is the Option price, $S_t$ is the current underlying price, $K$ is the strike price, $\sigma$ is the volatility, $T$ is the expiry, $r$ is the continuous interest rate, and $q$ is the continuous dividend yield.

With a correct Option pricing model , arbitrage traders capitalize on market inefficiencies, speculation traders can trade on the underlying price expectation or volatility, and risk/portfolio managers can hedge their positions to perfectly reduce risk exposure. The following sections describe popular Option pricing models.

Black-Scholes-Merton (BSM) Framework

This framework operates on the assumption of a log-normal stochastic process governing underlying price dynamics. Its appeal stems from its continuous modeling approach and provision of closed-form analytical solutions, rendering it particularly amenable to real-world scenarios. Nevertheless, it has faced scrutiny for its reliance on assumptions of constant volatility and interest rates. It's primarily employed in the valuation of European Options, so utility wanes in situations where early exercise risk is significant.

Lattice Models

These encompass prevalent models such as the Binomial Tree and Trinomial Tree. Unlike the BSM model, lattice models adopt a discrete process framework lacking an analytical solution, necessitating numerical methods and substantial computational resources for the solution. However, they offer the advantage of facilitating the calculation of early exercise payoffs at each time step, making it a suitable tool on pricing American Options.

Monte Carlo Simulation

Particularly relevant for the pricing of exotic Options devoid of explicit analytical frameworks, Monte Carlo simulations serve as indispensable tools for estimating the expected fair Option prices. Despite their computational complexity and time-intensive nature, these simulations, including methods like Markov-Chain Monte Carlo, play a pivotal role in pricing certain Options.

Implied Volatility

Failure of Historical Volatility

It is worth noting that all these pricing models have a volatility input, as to account for the future price expectation. However, the conventional approach of using historical volatility to predict future price uncertainty has faced criticism due to its assumption of time-invariant volatility, which fails to capture the dynamic nature of stock price distributions. This assumption overlooks the observed fat-tailed and evolving characteristics of price distributions over time. Consequently, employing such assumptions in Option pricing models derived from the underlying stock may lead to pricing inaccuracies. For example, examining the Brownian Motion stochastic differential formula within the Black-Scholes-Merton (BSM) framework: $$ dS_t = \mu S_t dt + \sigma S_t dW_t^S $$ In this equation, the parameter $\sigma$ denotes volatility, assumed to be constant. However, this assumption is unrealistic, as any movement in the underlying asset's price naturally induces fluctuations.

Local and Stochastic Volatility

One effective approach involves employing an alternative measure of volatility. This strategy is intuitive, as deviations of a stock's price from its current expected value typically correspond to increased variance in the series of price changes. This alternative measure can be broken down into stochastic and local volatility components.

Mathematically, stochastic volatility can be represented by the following stochastic differential equation: $$ d\sigma_t=\alpha(t,\sigma_t)dt + \beta(t,\sigma_t)dW_t^\sigma $$ On the other hand, local volatility, which is deterministic, serves as a parameterization of the volatility term within the original price Brownian Motion. Notable examples of local volatility models include the Dupire local volatility model ( details ). It is worth noting that many models utilize past volatility as a predictive input for future volatility. This approach is justified by the observation of volatility clustering, where volatility tends to persist at similar levels over short time frames.

Implied Volatility and Its Importance

If we view volatility modeling as a prospective approach, implied volatility (IV) can be understood as a retrospective, backward-looking measure derived from a chosen option pricing model. Following the no-arbitrage assumption, if we consider the market option price as the fair, theoretical price, we can use the current option price, along with other known variables, to determine the "fair" volatility value implied by the specific pricing model.

Implied volatility serves not only as the output of the pricing formula's inverse but also as an input for option Greeks, which we will discuss subsequently, as it represents a "correct" and risk-adjusted measure of volatility. Accurate implied volatility is crucial for calculating the correct Greeks for both trading and hedging purposes. Additionally, implied volatility offers insights into the likelihood of a stock moving toward a specific price level, thereby serving as valuable data points for regression analysis in the modeling process or to assess the accuracy of the model.

While modeling implied volatility can enhance pricing accuracy, some traders leverage implied volatility for volatility trading, as it tends to be more predictable due to volatility clustering. This concept can be implemented through trading composite Option strategies such as Straddles and an Iron Condor .

Greeks

Option Greeks represent the changes of an option's price concerning changes in specific parameters. They serve as indicators of the sensitivity of an option's value to variations in these parameters, effectively quantifying the impact of each component on the final option price. The table below outlines some of the most commonly used Option Greeks:

Greek Description
Delta Sensitivity of the option price by $1 change of the underlying security.
Gamma Change in Delta's value by $1 change of the underlying security.
Vega Sensitivity of the option price by 1% change of the implied volatility.
Theta Sensitivity of the option price by daily time decay.
Rho Sensitivity of the option price by 1% change of the interest rate.

Option Greeks are the partial derivatives of the option price. Therefore, their values are also a function of the IV. This stresses the importance of an accurate IV model to obtain accurate Greeks, hence accurate hedge size calculation for option hedging methods like Delta hedging.

Volatility Smile

The "volatility smile" is a term used in finance to describe a particular shape that can be observed when plotting IV against strike prices for options that share the same expiration date. Typically, when you plot IVs against strike prices, the curve tends to be concave, resembling a smile. This means that options with strike prices significantly above or below the current market price of the underlying asset tend to have higher IV than options with strike prices closer to the current market price.

Several theories attempt to explain the existence of the volatility smile. One explanation is that it arises from adjustments to the classic Black-Scholes-Merton (BSM) model, which assumes that asset prices follow a log-normal distribution. The volatility smile suggests that the market anticipates a higher probability of extreme price movements (fat tails) than the BSM model predicts. Another explanation is related to market dynamics and the demand for hedging. During periods of heightened market volatility, the volatility smile tends to become steeper, indicating a greater disparity in implied volatilities across different strike prices. This means that options, particularly those with out-of-the-money strike prices, become more expensive as investors seek protection against potential market downturns or increased price fluctuations. As a result, the volatility smile can serve as a valuable tool for investors and traders to assess market sentiment and gauge the level of risk in their portfolios.

According to some volatility models, such as the Heston model, the IV smile/surface should exhibit a smooth pattern. Any deviations from this smoothness, such as non-smooth spikes or irregularities, may signal potential arbitrage opportunities for traders.

Volatility Smirk

However, in some cases, rather than a traditional U-shaped curve, traders may observe what's known as a "smirk." This smirk occurs when the implied volatilities for higher-strike options are lower than those for ATM and lower-strike options. This deviation from the typical volatility smile pattern indicates a market expectation of a significant downward movement in the underlying asset's price. Traders interpret this as a signal that investors are allocating funds towards options with higher probabilities of such downward movements, resulting in increased demand for lower-strike options.

Volatility Smoothing

Volatility smoothing refers to the creation of a smooth volatility smile/surface. Derivative like options are favorable for maket-making and arbitration trading, due to the existence of fair price modeling. In the contemporary domain of high-frequency trading, the efficiency of calculating IV and Greeks assumes paramount significance. Thus, the quest for swift and refined IV surface computation becomes an inevitable quest for traders. Rather than relying solely on conventional methods involving slow-paced sampling and continuous parameter recalibration, the adoption of approximation techniques and stationary state analyses gains traction, especially in the context of IV estimation.

Accuracy Consideration

The Law of One Price stipulates the existence of a singular fair price for any given underlying asset. Consequently, according to the principles of put-call parity, each strike price for European options at expiration should correspond to a unique IV value. Within the realm of the Black-Scholes-Merton (BSM) framework, for instance, the concept of put-call parity yields insights into the equivalence of IVs for call and put options at identical strike prices and expirations. This equivalence serves as the foundation for formulating objective function: $$ C(t,K) - P(t,K)=e^{(q-r)t} (S_T - K) \\\Rightarrow e^{(q-r)t} [S_T (\Phi(d_{+}^{call})+\Phi(-d_{+}^{put})) - K (\Phi(d_{-}^{call})+\Phi(-d_{-}^{put}))] = e^{(q-r)t} (S_T - K) \\\Rightarrow \Phi(d_{+}^{call})+\Phi(-d_{+}^{put}) = 1\ \text{and}\ \Phi(d_{-}^{call})+\Phi(-d_{-}^{put}) = 1 \\\Rightarrow d_{\pm}^{call}=d_{\pm}^{put} $$ Thus, we can formulate an objective function of $C_{market} + P_{market} = C_{BSM} + P_{BSM}$.

Alternatively, certain schools of thought contend that the bulk of historical volatility information is encapsulated within at-the-money (ATM) options, with any residual volatility attributable to the extrinsic value of the option. Consequently, a strategy focused on out-of-the-money (OTM) options for IV calculations gains traction.

Speed Consideration

In the realm of high-frequency trading, where split-second decisions are the norm, the traditional process of sampling, evaluating, recalibrating, and deriving implied volatility expectations is simply unfeasible. In response, traders and analysts increasingly turn to polynomial regression techniques as a pragmatic solution for IV modeling.

For example, $$ IV_t = \beta_0 + \beta_1 M + \beta_2 M^2 + \beta_3 (T-t) + \beta_4 (T-t)^2 + \beta_5 M(T-t) \\\text{where} M = ln(S_t/K) $$

Additionally, the utilization of advanced mathematical algorithms, such as the Fast Fourier Transform (FFT), enables the rapid computation of the entire Greek surface, enhancing speed and efficiency. While these approaches may entail minor trade-offs in terms of accuracy, the overarching objective remains the attainment of a seamlessly smooth implied volatility surface that fosters effective arbitrage strategies.

 

Greeks and Implied Volatility

Option Indicators

Introduction

This page explains the most popular Option indicators and how to use them with LEAN.

Parameters

The following table describes the arguments that the automatic Option indicators methods accept:

Argument Data Type Description Default Value
symbol Symbol The contract to use when calculating the indicator values.
mirrorOption mirror_option Symbol The mirror contract to use in parity type calculations. null None
riskFreeRate risk_free_rate decimal float The risk-free interest rate. If you don't provide a value, the default value is the US primary credit rate from the Interest Rate Provider Model . null None
dividendYield dividend_yield decimal float The dividend yield rate. If you don't provide a value, the default value comes from the Dividend Yield Provider Model . null None
optionModel option_model OptionPricingModelType The Option pricing model that's used to calculate the Greeks. If you don't provide a value, the default value is OptionPricingModelType.BlackScholes for European Options or OptionPricingModelType.BinomialCoxRossRubinstein for American Options. null None
resolution Resolution The resolution of the indicator data. If you don't provide a value, the default value is the resolution of the subscription you have for the Option contract(s). null None

To perform implied volatility (IV) smoothing with a put-call pair, pass one of the contracts as the symbol argument and pass the other contract in the pair as the mirrorOption mirror_option argument. The default IV smoothing method uses the one contract in the pair that's at-the-money or out-of-money to calculate the IV. To change the smoothing function, call the SetSmoothingFunction set_smoothing_function method of the ImpliedVolatility class/property.

Several different Option pricing models are supported to calculate the IV and Greeks. The following table describes the OptionPricingModelType enumeration members:

Implied Volatility

Implied volatility, , is the market's expectation for the future volatility of an asset and is implied by the price of the assets's Options contracts. You can't observe it in the market but you can derive it from the price of an Option. For more information about implied volatility, see Implied Volatility .

Automatic Indicators

To create an automatic indicator for implied volatility, call the QCAlgorithm.IV QCAlgorithm.iv method with the Option contract Symbol symbol object(s).

private ImpliedVolatility _impliedvolatility;

public override void Initialize()
{
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    // Example of using the single-contract IV calculation:
    _impliedvolatility = IV(option);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _impliedvolatility = IV(option, mirrorOption);
}
def initialize(self):
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    # Example of using the single-contract IV calculation:
    self._impliedvolatility = self.iv(option)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._impliedvolatility = self.iv(option, mirror_option)

The follow table describes the arguments that the IV iv method accepts in addition to the standard parameters :

Argument Data Type Description Default Value
period int The number of periods to use when calculating the historical volatility for comparison. 252

For more information about the IV iv method, see Using IV Indicator .

Manual Indicators

To create a manual indicator for implied volatility, call the ImpliedVolatility constructor.

private ImpliedVolatility _impliedvolatility;

public override void Initialize()
{
    var equity = AddEquity("AAPL").Symbol;
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    var interestRateProvider = new InterestRateProvider();
    var dividendYieldProvider = new DividendYieldProvider(equity);

    // Example of using the single-contract IV calculation:
    _impliedvolatility = new ImpliedVolatility(option, interestRateProvider, dividendYieldProvider);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _impliedvolatility = new ImpliedVolatility(option, interestRateProvider, dividendYieldProvider, mirrorOption);
}
def initialize(self):
    equity = self.add_equity("AAPL").symbol
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    interest_rate_provider = InterestRateProvider()
    dividend_yield_provider = DividendYieldProvider(equity)

    # Example of using the single-contract IV calculation:
    self._impliedvolatility = ImpliedVolatility(option, interest_rate_provider, dividend_yield_provider)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._impliedvolatility = ImpliedVolatility(option, interest_rate_provider, dividend_yield_provider, mirror_option)

For more information about the ImpliedVolatility constructor, see Using IV Indicator .

Volatility Smoothing

The default IV smoothing method uses the one contract in the pair that's at-the-money or out-of-money to calculate the IV. To change the smoothing function, pass a mirrorOption mirror_option argument to the IV iv method or ImpliedVolatility constructor and then call the SetSmoothingFunction set_smoothing_function method of the resulting ImpliedVolatility object. The follow table describes the arguments of the custom function:

Argument Data Type Description
iv decimal float The IV of the Option contract.
mirrorIv mirror_iv decimal float The IV of the mirror Option contract.

The method must return a decimal float as the smoothened IV.

private ImpliedVolatility _iv;

public override void Initialize()
{
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);

    _iv = IV(option, mirrorOption);
    // example: take average of the call-put pair
    _iv.SetSmoothingFunction((iv, mirrorIv) => (iv + mirrorIv) * 0.5m);
}
def initialize(self):
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)

    self._iv = self.iv(option, mirror_option)
    # Example: The average of the call-put pair.
    self._iv.set_smoothing_function(lambda iv, mirror_iv: (iv + mirror_iv) * 0.5)

Delta

Delta, , is the rate of change of the Option price with respect to the price of the underlying asset. It measures the first-order sensitivity of the price to a movement in underlying price. For example, an Option delta of 0.4 means that if the underlying asset moves by 1%, then the value of the Option moves by 0.4 × 1% = 0.4%. For more information about delta, see Delta .

Automatic Indicators

To create an automatic indicator for delta, call the QCAlgorithm.D QCAlgorithm.d method with the Option contract Symbol symbol object(s).

private Delta _delta;

public override void Initialize()
{
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    // Example of using the single-contract IV calculation:
    _delta = D(option);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _delta = D(option, mirrorOption);
}
def initialize(self):
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    # Example of using the single-contract IV calculation:
    self._delta = self.d(option)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._delta = self.d(option, mirror_option)

The follow table describes the arguments that the D method accepts in addition to the standard parameters :

Argument Data Type Description Default Value
ivModel iv_model OptionPricingModelType The Option pricing model to use to estimate the IV when calculating Delta. If you don't provide a value, the default value is to match the optionModel option_model parameter. null None

For more information about the D method, see Using D Indicator .

Manual Indicators

To create a manual indicator for delta, call the Delta constructor.

private Delta _delta;

public override void Initialize()
{
    var equity = AddEquity("AAPL").Symbol;
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    var interestRateProvider = new InterestRateProvider();
    var dividendYieldProvider = new DividendYieldProvider(equity);

    // Example of using the single-contract IV calculation:
    _delta = new Delta(option, interestRateProvider, dividendYieldProvider);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _delta = new Delta(option, interestRateProvider, dividendYieldProvider, mirrorOption);
}
def initialize(self):
    equity = self.add_equity("AAPL").symbol
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    interest_rate_provider = InterestRateProvider()
    dividend_yield_provider = DividendYieldProvider(equity)

    # Example of using the single-contract IV calculation:
    self._delta = Delta(option, interest_rate_provider, dividend_yield_provider)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._delta = Delta(option, interest_rate_provider, dividend_yield_provider, mirror_option)

For more information about the Delta constructor, see Using D Indicator .

Volatility Smoothing

The default IV smoothing method uses the one contract in the pair that's at-the-money or out-of-money to calculate the IV. To change the smoothing function, pass a mirrorOption mirror_option argument to the indicator method or constructor and then call the SetSmoothingFunction set_smoothing_function method of the ImpliedVolatility property of the indicator.

// Example: Average IV of the call-put pair.
_delta.ImpliedVolatility.SetSmoothingFunction((iv, mirrorIv) => (iv + mirrorIv) * 0.5m);
# Example: Average IV of the call-put pair.
self._delta.implied_volatility.set_smoothing_function(lambda iv, mirror_iv: (iv + mirror_iv) * 0.5)

For more information about the IV smoothing function, see Implied Volatility .

Gamma

Gamma, , is the rate of change of the portfolio's delta with respect to the underlying asset's price. It represents the second-order sensitivity of the Option to a movement in the underlying asset's price. For more information about Gamma, see Gamma .

Automatic Indicators

To create an automatic indicator for gamma, call the QCAlgorithm.G QCAlgorithm.g method with the Option contract Symbol symbol object(s).

private Gamma _gamma;

public override void Initialize()
{
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    // Example of using the single-contract IV calculation:
    _gamma = G(option);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _gamma = G(option, mirrorOption);
}
def initialize(self):
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    # Example of using the single-contract IV calculation:
    self._gamma = self.g(option)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._gamma = self.g(option, mirror_option)

The follow table describes the arguments that the G method accepts in addition to the standard parameters :

Argument Data Type Description Default Value
ivModel iv_model OptionPricingModelType The Option pricing model to use to estimate the IV when calculating Gamma. If you don't provide a value, the default value is to match the optionModel option_model parameter. null None

For more information about the G method, see Using G Indicator .

Manual Indicators

To create a manual indicator for gamma, call the Gamma constructor.

private Gamma _gamma;

public override void Initialize()
{
    var equity = AddEquity("AAPL").Symbol;
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    var interestRateProvider = new InterestRateProvider();
    var dividendYieldProvider = new DividendYieldProvider(equity);

    // Example of using the single-contract IV calculation:
    _gamma = new Gamma(option, interestRateProvider, dividendYieldProvider);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _gamma = new Gamma(option, interestRateProvider, dividendYieldProvider, mirrorOption);
}
def initialize(self):
    equity = self.add_equity("AAPL").symbol
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    interest_rate_provider = InterestRateProvider()
    dividend_yield_provider = DividendYieldProvider(equity)

    # Example of using the single-contract IV calculation:
    self._gamma = Gamma(option, interest_rate_provider, dividend_yield_provider)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._gamma = Gamma(option, interest_rate_provider, dividend_yield_provider, mirror_option)

For more information about the Gamma constructor, see Using G Indicator .

Volatility Smoothing

The default IV smoothing method uses the one contract in the pair that's at-the-money or out-of-money to calculate the IV. To change the smoothing function, pass a mirrorOption mirror_option argument to the indicator method or constructor and then call the SetSmoothingFunction set_smoothing_function method of the ImpliedVolatility property of the indicator.

// Example: Average IV of the call-put pair.
_gamma.ImpliedVolatility.SetSmoothingFunction((iv, mirrorIv) => (iv + mirrorIv) * 0.5m);
# Example: Average IV of the call-put pair.
self._gamma.implied_volatility.set_smoothing_function(lambda iv, mirror_iv: (iv + mirror_iv) * 0.5)

For more information about the IV smoothing function, see Implied Volatility .

Vega

Vega, , is the rate of change in the value of the Option with respect to the volatility of the underlying asset. For more information about vega, see Vega .

Automatic Indicators

To create an automatic indicator for vega, call the QCAlgorithm.V QCAlgorithm.v method with the Option contract Symbol symbol object(s).

private Vega _vega;

public override void Initialize()
{
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    // Example of using the single-contract IV calculation:
    _vega = V(option);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _vega = V(option, mirrorOption);
}
def initialize(self):
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    # Example of using the single-contract IV calculation:
    self._vega = self.v(option)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._vega = self.v(option, mirror_option)

The follow table describes the arguments that the V method accepts in addition to the standard parameters :

Argument Data Type Description Default Value
ivModel iv_model OptionPricingModelType The Option pricing model to use to estimate the IV when calculating Vega. If you don't provide a value, the default value is to match the optionModel option_model parameter. null None

For more information about the V method, see Using V Indicator .

Manual Indicators

To create a manual indicator for vega, call the Vega constructor.

private Vega _vega;

public override void Initialize()
{
    var equity = AddEquity("AAPL").Symbol;
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    var interestRateProvider = new InterestRateProvider();
    var dividendYieldProvider = new DividendYieldProvider(equity);

    // Example of using the single-contract IV calculation:
    _vega = new Vega(option, interestRateProvider, dividendYieldProvider);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _vega = new Vega(option, interestRateProvider, dividendYieldProvider, mirrorOption);
}
def initialize(self):
    equity = self.add_equity("AAPL").symbol
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    interest_rate_provider = InterestRateProvider()
    dividend_yield_provider = DividendYieldProvider(equity)

    # Example of using the single-contract IV calculation:
    self._vega = Vega(option, interest_rate_provider, dividend_yield_provider)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._vega = Vega(option, interest_rate_provider, dividend_yield_provider, mirror_option)

For more information about the Vega constructor, see Using V Indicator .

Volatility Smoothing

The default IV smoothing method uses the one contract in the pair that's at-the-money or out-of-money to calculate the IV. To change the smoothing function, pass a mirrorOption mirror_option argument to the indicator method or constructor and then call the SetSmoothingFunction set_smoothing_function method of the ImpliedVolatility property of the indicator.

// Example: Average IV of the call-put pair.
_vega.ImpliedVolatility.SetSmoothingFunction((iv, mirrorIv) => (iv + mirrorIv) * 0.5m);
# Example: Average IV of the call-put pair.
self._vega.implied_volatility.set_smoothing_function(lambda iv, mirror_iv: (iv + mirror_iv) * 0.5)

For more information about the IV smoothing function, see Implied Volatility .

Theta

Theta, , is the rate of change of the value of the Option with respect to the passage of time. It is also known to as the time decay of an Option. For more information about theta, see Theta .

Automatic Indicators

To create an automatic indicator for theta, call the QCAlgorithm.T QCAlgorithm.t method with the Option contract Symbol symbol object(s).

private Theta _theta;

public override void Initialize()
{
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    // Example of using the single-contract IV calculation:
    _theta = T(option);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _theta = T(option, mirrorOption);
}
def initialize(self):
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    # Example of using the single-contract IV calculation:
    self._theta = self.t(option)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._theta = self.t(option, mirror_option)

The follow table describes the arguments that the T method accepts in addition to the standard parameters :

Argument Data Type Description Default Value
ivModel iv_model OptionPricingModelType The Option pricing model to use to estimate the IV when calculating theta. If you don't provide a value, the default value is to match the optionModel option_model parameter. null None

For more information about the T method, see Using T Indicator .

Manual Indicators

To create a manual indicator for theta, call the Theta constructor.

private Theta _theta;

public override void Initialize()
{
    var equity = AddEquity("AAPL").Symbol;
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    var interestRateProvider = new InterestRateProvider();
    var dividendYieldProvider = new DividendYieldProvider(equity);

    // Example of using the single-contract IV calculation:
    _theta = new Theta(option, interestRateProvider, dividendYieldProvider);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _theta = new Theta(option, interestRateProvider, dividendYieldProvider, mirrorOption);
}
def initialize(self):
    equity = self.add_equity("AAPL").symbol
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    interest_rate_provider = InterestRateProvider()
    dividend_yield_provider = DividendYieldProvider(equity)

    # Example of using the single-contract IV calculation:
    self._theta = Theta(option, interest_rate_provider, dividend_yield_provider)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._theta = Theta(option, interest_rate_provider, dividend_yield_provider, mirror_option)

For more information about the Theta constructor, see Using T Indicator .

Volatility Smoothing

The default IV smoothing method uses the one contract in the pair that's at-the-money or out-of-money to calculate the IV. To change the smoothing function, pass a mirrorOption mirror_option argument to the indicator method or constructor and then call the SetSmoothingFunction set_smoothing_function method of the ImpliedVolatility property of the indicator.

// Example: Average IV of the call-put pair.
_theta.ImpliedVolatility.SetSmoothingFunction((iv, mirrorIv) => (iv + mirrorIv) * 0.5m);
# Example: Average IV of the call-put pair.
self._theta.implied_volatility.set_smoothing_function(lambda iv, mirror_iv: (iv + mirror_iv) * 0.5)

For more information about the IV smoothing function, see Implied Volatility .

Rho

Rho, , is the rate of change of the value of a derivative with respect to the interest rate.  It is usually small and not a big issue in practice unless the Option is deep in-the-money and has a long horizon. In this case, the interest rate matters because you need to discount a larger cash flow over a longer horizon. For more information about rho, see Rho .

Automatic Indicators

To create an automatic indicator for rho, call the QCAlgorithm.R QCAlgorithm.r method with the Option contract Symbol symbol object(s).

private Rho _rho;

public override void Initialize()
{
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    // Example of using the single-contract IV calculation:
    _rho = R(option);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _rho = R(option, mirrorOption);
}
def initialize(self):
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    # Example of using the single-contract IV calculation:
    self._rho = self.r(option)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._rho = self.r(option, mirror_option)

The follow table describes the arguments that the R method accepts in addition to the standard parameters :

Argument Data Type Description Default Value
ivModel iv_model OptionPricingModelType The Option pricing model to use to estimate the IV when calculating rho If you don't provide a value, the default value is to match the optionModel option_model parameter. null None

Manual Indicators

To create a manual indicator for rho, call the Rho constructor.

private Rho _rho;

public override void Initialize()
{
    var equity = AddEquity("AAPL").Symbol;
    var option = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Put, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(option);

    var interestRateProvider = new InterestRateProvider();
    var dividendYieldProvider = new DividendYieldProvider(equity);

    // Example of using the single-contract IV calculation:
    _rho = new Rho(option, interestRateProvider, dividendYieldProvider);

    // Example of using the using mirror-contract IV calculation:
    var mirrorOption = QuantConnect.Symbol.CreateOption("AAPL", Market.USA, OptionStyle.American, OptionRight.Call, 505m, new DateTime(2014, 6, 27));
    AddOptionContract(mirrorOption);
    _rho = new Rho(option, interestRateProvider, dividendYieldProvider, mirrorOption);
}
def initialize(self):
    equity = self.add_equity("AAPL").symbol
    option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 505, datetime(2014, 6, 27))
    self.add_option_contract(option)

    interest_rate_provider = InterestRateProvider()
    dividend_yield_provider = DividendYieldProvider(equity)

    # Example of using the single-contract IV calculation:
    self._rho = Rho(option, interest_rate_provider, dividend_yield_provider)

    # Example of using the using mirror-contract IV calculation:
    mirror_option = Symbol.create_option("AAPL", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 505, datetime(2014, 6, 27))
    self.add_option_contract(mirror_option)
    self._rho = Rho(option, interest_rate_provider, dividend_yield_provider, mirror_option)

For more information about the Rho constructor, see Using R Indicator .

Volatility Smoothing

The default IV smoothing method uses the one contract in the pair that's at-the-money or out-of-money to calculate the IV. To change the smoothing function, pass a mirrorOption mirror_option argument to the indicator method or constructor and then call the SetSmoothingFunction set_smoothing_function method of the ImpliedVolatility property of the indicator.

// Example: Average IV of the call-put pair.
_rho.ImpliedVolatility.SetSmoothingFunction((iv, mirrorIv) => (iv + mirrorIv) * 0.5m);
# Example: Average IV of the call-put pair.
self._rho.implied_volatility.set_smoothing_function(lambda iv, mirror_iv: (iv + mirror_iv) * 0.5)

For more information about the IV smoothing function, see Implied Volatility .

Examples

Demonstration Algorithms
OptionIndicatorsRegressionAlgorithm.cs C# OptionIndicatorsMirrorContractsRegressionAlgorithm.cs C# OptionIndicatorsRegressionAlgorithm.py Python OptionIndicatorsMirrorContractsRegressionAlgorithm.py Python

 

Equity Options

Market Hours

Introduction

This page shows the trading hours, holidays, and time zone of the Equity Option market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Equity Option market:

Weekday Time (America/New York)
Monday 09:30:00 to 16:00:00
Tuesday 09:30:00 to 16:00:00
Wednesday 09:30:00 to 16:00:00
Thursday 09:30:00 to 16:00:00
Friday 09:30:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

LEAN uses the trading holidays from the NYSE website.

The following table shows the dates of holidays for the Equity Option market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the Equity Option market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Equity Option market trades in the America/New York time zone.

 

Asset Classes

Crypto

A Cryptocurrency is a digital currency that's secured by cryptography, which makes it nearly impossible to counterfeit or double-spend.

See Also

BasicTemplateCryptoAlgorithm.py
BasicTemplateCryptoAlgorithm.cs

 

Crypto

Requesting Data

Introduction

Request Crypto data in your algorithm to receive a feed of asset prices in the OnData on_data method. For more information about the specific datasets we use for backtests, see the CoinAPI datasets . To trade Crypto live, you can use the QuantConnect data provider .

Create Subscriptions

To create a Crypto subscription, in the Initialize initialize method, call the AddCrypto add_crypto method. The AddCrypto add_crypto method returns a Crypto object, which contains a Symbol symbol property. Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

_symbol = AddCrypto("BTCUSD").Symbol;
self._symbol = self.add_crypto("BTCUSD").symbol

The AddCrypto add_crypto method creates a subscription for a single Crypto asset and adds it to your user-defined universe. To create a dynamic universe of Crypto assets, add a Crypto universe .

To view the supported assets, see the CoinAPI datasets .

Fungible Assets

Fungible assets are assets that are interchangeable with each other. For example, every Bitcoin is effectively identical to every other Bitcoin. In contrast, non-fungible tokens (NFTs) are non-fungible because each one is unique. An example of an NFT is the Bored Ape Yacht Club collection. LEAN doesn't currently support trading NFTs.

Resolutions

The following table shows the available resolutions and data formats for Crypto subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK green check green check
Second SECOND green check green check
Minute MINUTE green check green check
Hour HOUR green check green check
Daily DAILY green check green check

The default resolution for Crypto subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddCrypto add_crypto method.

_symbol = AddCrypto("BTCUSD", Resolution.Daily).Symbol;
self._symbol = self.add_crypto("BTCUSD", Resolution.DAILY).symbol

To create custom resolution periods, see Consolidating Data .

Supported Markets

The following Market enumeration members are available for Crypto:

To set the market for a security, pass a market argument to the AddCrypto add_crypto method.

_symbol = AddCrypto("BTCUSD", market: Market.Coinbase).Symbol;
self._symbol = self.add_crypto("BTCUSD", market=Market.COINBASE).symbol

The brokerage models have a default market for each asset class. If you set a brokerage model, you may not need to specify the market to use.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

_symbol = AddCrypto("BTCUSD", fillForward: false).Symbol;
self._symbol = self.add_crypto("BTCUSD", fill_forward=False).symbol

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. The amount of leverage available to you depends on the brokerage you use. To change the amount of leverage you can use for a security, pass a leverage argument to the AddCrypto add_crypto method.

_symbol = AddCrypto("BTCUSD", leverage: 3).Symbol;
self._symbol = self.add_crypto("BTCUSD", leverage=3).symbol

For more information about the leverage each brokerage provides, see Brokerages .

Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to OnData on_data or the data from history request . If you change the data normalization mode, it won't change the outcome.

Properties

The AddCrypto add_crypto method returns a Crypto object, which have the following properties:

 

Crypto

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a TradeBar argument, it only receives TradeBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the TradeBars DataDictionary is made up of TradeBar objects. To access individual data points in the dictionary, you can index the dictionary with the security ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for Crypto data, see Resolutions .

Trades

TradeBar objects are price bars that consolidate individual trades from the exchanges. They contain the open, high, low, close, and volume of trading activity over a period of time.

Tradebar decomposition

TradeBar objects have the following properties:

To get the TradeBar objects in the Slice , index the Slice or index the Bars bars property of the Slice with the security Symbol symbol . If the security doesn't actively trade or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    trade_bar = slice.bars.get(self._symbol)   # None if not found

You can also iterate through the TradeBars dictionary. The keys of the dictionary are the Symbol objects and the values are the TradeBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        var closePrice = tradeBar.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        close_price = trade_bar.close

Quotes

QuoteBar objects are bars that consolidate NBBO quotes from the exchanges. They contain the open, high, low, and close prices of the bid and ask. The Open open , High high , Low low , and Close close properties of the QuoteBar object are the mean of the respective bid and ask prices. If the bid or ask portion of the QuoteBar has no data, the Open open , High high , Low low , and Close close properties of the QuoteBar copy the values of either the Bid bid or Ask ask instead of taking their mean.

Quotebar decomposition

QuoteBar objects have the following properties:

To get the QuoteBar objects in the Slice , index the QuoteBars property of the Slice with the security Symbol symbol . If the security doesn't actively get quotes or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    quote_bar = slice.quote_bars.get(self._symbol)   # None if not found

You can also iterate through the QuoteBars dictionary. The keys of the dictionary are the Symbol objects and the values are the QuoteBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        var askPrice = quoteBar.Ask.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        ask_price = quote_bar.ask.close

QuoteBar objects let LEAN incorporate spread costs into your simulated trade fills to make backtest results more realistic.

Ticks

Tick objects represent a single trade or quote at a moment in time. A trade tick is a record of a transaction for the security. A quote tick is an offer to buy or sell the security at a specific price. Tick objects have the following properties:

Trade ticks have a non-zero value for the Quantity quantity and Price price properties, but they have a zero value for the BidPrice bid_price , BidSize bid_size , AskPrice ask_price , and AskSize ask_size properties. Quote ticks have non-zero values for BidPrice bid_price and BidSize bid_size properties or have non-zero values for AskPrice ask_price and AskSize ask_size properties. To check if a tick is a trade or a quote, use the TickType ticktype property.

In backtests, LEAN groups ticks into one millisecond buckets. In live trading, LEAN groups ticks into ~70-millisecond buckets. To get the Tick objects in the Slice , index the Ticks property of the Slice with a Symbol symbol . If the security doesn't actively trade or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    ticks = slice.ticks.get(self._symbol, [])   # Empty if not found
    for tick in ticks:
        price = tick.price

You can also iterate through the Ticks dictionary. The keys of the dictionary are the Symbol objects and the values are the List<Tick> list[Tick] objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            price = tick.price

Tick data is raw and unfiltered, so it can contain bad ticks that skew your trade results. For example, some ticks come from dark pools, which aren't tradable. We recommend you only use tick data if you understand the risks and are able to perform your own online tick filtering.

 

Crypto

Holdings

Introduction

Crypto holdings require special consideration because not all brokerages track your positions in each currency pair.

Cash vs Margin Brokerage Accounts

Some of the Crypto brokerages integrated into QuantConnect support cash and margin accounts while some only support cash accounts. If you want to short Crypto assets or use leverage, you need a margin account. Follow these steps to view which account types each brokerage supports:

  1. Open the brokerage guides .
  2. Click a Crypto brokerage.
  3. Scroll down to the Account Types section.

Virtual Pairs

All fiat and Crypto currencies are individual assets. When you buy a pair like BTCUSD, you trade USD for BTC. In this case, LEAN removes some USD from your portfolio cashbook and adds some BTC. The virtual pair BTCUSD represents your position in that trade, but the virtual pair doesn't actually exist. It simply represents an open trade. If you call the Liquidate method with the Symbol symbol of a virtual pair, the method only liquidates the quantity in your virtual pair. For more information about liquidating Crypto postitions, see Crypto Trades .

Access Cypto Holdings

The CashBook cash_book stores the quantity of your Crypto holdings. To access your Crypto holdings, index the CashBook cash_book with the currency ticker. The values of the CashBook dictionary are Cash objects, which have the following properties:

var btcQuantity = Portfolio.CashBook["BTC"].Amount;
var btcValue = Portfolio.CashBook["BTC"].ValueInAccountCurrency;
btc_quantity = self.portfolio.cash_book['BTC'].amount
btc_value = self.portfolio.cash_book['BTC'].value_in_account_currency

To access the virtual pair of your Crypto trades, index the Portfolio portfolio object with the pair Symbol symbol .

var securityHolding = Portfolio[_btcUsdSymbol];
security_holding  = self.portfolio[self._btc_usd_symbol]

Stateful Redeployments

When you make a trade inside of a running algorithm, LEAN tracks the virtual position state for you, but it won't survive between deployments. Some brokerages save your virtual pairs, so you can load them into your algorithm when you stop and redeploy it. Depending on the brokerage you select, you may be able to manually add virtual pairs when you deploy live algorithms with the LEAN CLI or cloud deployment wizard .

 

Crypto

Market Hours

Introduction

The Crypto markets are open 24/7. There are no pre-market hours, post-market hours, holidays, late opens, or early closes.

 

Asset Classes

Crypto Futures

Crypto Perpetual Futures are derivative financial contracts that obligate parties to buy or sell an asset at an unspecified future date.

See Also

BasicTemplateCryptoFutureAlgorithm.py
BasicTemplateCryptoFutureAlgorithm.cs

 

Crypto Futures

Requesting Data

Introduction

Request Crypto Futures data in your algorithm to receive a feed of asset prices in the OnData on_data method. For more information about the specific datasets we use for backtests, see the Binance Crypto Future Price Data dataset listing . To trade Crypto Futures live, you can use the QuantConnect data provider .

Create Subscriptions

To create a Crypto Futures subscription, in the Initialize initialize method, call the AddCryptoFuture add_crypto_future method. The AddCryptoFuture add_crypto_future method returns a CryptoFuture object, which contains a Symbol symbol property. Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

_symbol = AddCryptoFuture("BTCUSD").Symbol;
self._symbol = self.add_crypto_future("BTCUSD").symbol

The AddCryptoFuture add_crypto_future method creates a subscription for a single Crypto Futures asset and adds it to your user-defined universe.

To view the supported assets in the Crypto Futures dataset, see Supported Assets .

Resolutions

The following table shows the available resolutions and data formats for Crypto Futures contract subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK green check green check
Second SECOND green check green check
Minute MINUTE green check green check
Hour HOUR green check green check
Daily DAILY green check green check

The default resolution for Crypto Futures subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddCryptoFuture add_crypto_future method.

_symbol = AddCryptoFuture("BTCUSD", Resolution.Daily).Symbol;
self._symbol = self.add_crypto_future("BTCUSD", Resolution.DAILY).symbol

To create custom resolution periods, see Consolidating Data .

Supported Markets

Crypto Futures are currently only available on Market.Binance Market.BINANCE . To set the market for a security, pass a market argument to the AddCryptoFuture add_crypto_future method.

_symbol = AddCryptoFuture("BTCUSD", market: Market.Binance).Symbol;
self._symbol = self.add_crypto_future("BTCUSD", market=Market.BINANCE).symbol

The brokerage models have a default market for each asset class. If you set a brokerage model, you may not need to specify the market to use.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

_symbol = AddCryptoFuture("BTCUSD", fillForward: false).Symbol;
self._symbol = self.add_crypto_future("BTCUSD", fill_forward=False).symbol

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. The amount of leverage available to you depends on the brokerage you use. To change the amount of leverage you can use for a security, pass a leverage argument to the AddCryptoFuture add_crypto_future method.

_symbol = AddCryptoFuture("BTCUSD", leverage: 3).Symbol;
self._symbol = self.add_crypto_future("BTCUSD", leverage=3).symbol

For more information about the leverage each brokerage provides, see Brokerages .

Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to OnData on_data or the data from history request . If you change the data normalization mode, it won't change the outcome.

Properties

The AddCryptoFuture add_crypto_future method returns a CryptoFuture object, which have the following properties:

 

Crypto Futures

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a TradeBar argument, it only receives TradeBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the TradeBars DataDictionary is made up of TradeBar objects. To access individual data points in the dictionary, you can index the dictionary with the security ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for Crypto Futures data, see Resolutions .

Trades

TradeBar objects are price bars that consolidate individual trades from the exchanges. They contain the open, high, low, close, and volume of trading activity over a period of time.

Tradebar decomposition

TradeBar objects have the following properties:

To get the TradeBar objects in the Slice , index the Slice or index the Bars bars property of the Slice with the security Symbol symbol . If the security doesn't actively trade or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    trade_bar = slice.bars.get(self._symbol)   # None if not found

You can also iterate through the TradeBars dictionary. The keys of the dictionary are the Symbol objects and the values are the TradeBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        var closePrice = tradeBar.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        close_price = trade_bar.close

Quotes

QuoteBar objects are bars that consolidate NBBO quotes from the exchanges. They contain the open, high, low, and close prices of the bid and ask. The Open open , High high , Low low , and Close close properties of the QuoteBar object are the mean of the respective bid and ask prices. If the bid or ask portion of the QuoteBar has no data, the Open open , High high , Low low , and Close close properties of the QuoteBar copy the values of either the Bid bid or Ask ask instead of taking their mean.

Quotebar decomposition

QuoteBar objects have the following properties:

To get the QuoteBar objects in the Slice , index the QuoteBars property of the Slice with the security Symbol symbol . If the security doesn't actively get quotes or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    quote_bar = slice.quote_bars.get(self._symbol)   # None if not found

You can also iterate through the QuoteBars dictionary. The keys of the dictionary are the Symbol objects and the values are the QuoteBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        var askPrice = quoteBar.Ask.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        ask_price = quote_bar.ask.close

QuoteBar objects let LEAN incorporate spread costs into your simulated trade fills to make backtest results more realistic.

Ticks

Tick objects represent a single trade or quote at a moment in time. A trade tick is a record of a transaction for the security. A quote tick is an offer to buy or sell the security at a specific price. Tick objects have the following properties:

Trade ticks have a non-zero value for the Quantity quantity and Price price properties, but they have a zero value for the BidPrice bid_price , BidSize bid_size , AskPrice ask_price , and AskSize ask_size properties. Quote ticks have non-zero values for BidPrice bid_price and BidSize bid_size properties or have non-zero values for AskPrice ask_price and AskSize ask_size properties. To check if a tick is a trade or a quote, use the TickType ticktype property.

In backtests, LEAN groups ticks into one millisecond buckets. In live trading, LEAN groups ticks into ~70-millisecond buckets. To get the Tick objects in the Slice , index the Ticks property of the Slice with a Symbol symbol . If the security doesn't actively trade or you are in the same time step as when you added the security subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your security before you index the Slice with the security Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    ticks = slice.ticks.get(self._symbol, [])   # Empty if not found
    for tick in ticks:
        price = tick.price

You can also iterate through the Ticks dictionary. The keys of the dictionary are the Symbol objects and the values are the List<Tick> list[Tick] objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            price = tick.price

Tick data is raw and unfiltered, so it can contain bad ticks that skew your trade results. For example, some ticks come from dark pools, which aren't tradable. We recommend you only use tick data if you understand the risks and are able to perform your own online tick filtering.

Margin Interest Rates

MarginInterestRate objects contain the margin interest rate, which is a cost associated with trading on margin. MarginInterestRate objects have the following properties:

To get the MarginInterestRate margin_interest_rate objects in the Slice , index the MarginInterestRate margin_interest_rate property of the Slice with the Crypto Future Symbol . The MarginInterestRate margin_interest_rate property of the Slice may not contain data for your Symbol . To avoid issues, check if the property contains data for your Crypto Future before you index it with the Crypto Future Symbol .

public override void OnData(Slice slice)
{
    if (slice.MarginInterestRates.ContainsKey(_symbol))
    {
        var interestRate = slice.MarginInterestRates[_symbol].InterestRate;
    }
}
def on_data(self, slice: Slice) -> None:
    margin_interest_rate = slice.margin_interest_rate.get(self._symbol)
    if margin_interest_rate:
        interest_rate = margin_interest_rate.interest_rate

You can also iterate through the MarginInterestRate margin_interest_rate dictionary. The keys of the dictionary are the Symbol objects and the values are the MarginInterestRate margin_interest_rate objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.MarginInterestRates)
    {
        var symbol = kvp.Key;
        var marginInterestRate = kvp.Value;
        var interestRate = marginInterestRate.InterestRate;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, margin_interest_rate in slice.MarginInterestRates.items():
        interest_rate = margin_interest_rate.interest_rate

 

Crypto Futures

Market Hours

Introduction

The Crypto Futures markets are open 24/7. There are no pre-market hours, post-market hours, holidays, late opens, or early closes.

 

Asset Classes

Forex

Forex markets are for trading foreign currencies.

See Also

BasicTemplateForexAlgorithm.py
BasicTemplateForexAlgorithm.cs

 

Forex

Requesting Data

Introduction

Request Forex data in your algorithm to receive a feed of exchange rates in the OnData on_data method. For more information about the specific dataset we use for backtests, see the FOREX dataset listing . To trade Forex live, you can use the QuantConnect data provider .

Create Subscriptions

To create a Forex pair subscription, in the Initialize initialize method, call the AddForex add_forex method. The AddForex add_forex method returns a Forex object, which contains a Symbol symbol property. Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

_symbol = AddForex("EURUSD").Symbol;
self._symbol = self.add_forex("EURUSD").symbol

To view the supported Forex pairs, see Supported Assets .

Resolutions

The following table shows the available resolutions and data formats for Forex subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK green check
Second SECOND
green check
Minute MINUTE
green check
Hour HOUR
green check
Daily DAILY
green check

The default resolution for Forex subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddForex add_forex method.

_symbol = AddForex("EURUSD", Resolution.Daily).Symbol;
self._symbol = self.add_forex("EURUSD", Resolution.DAILY).symbol

To create custom resolution periods, see Consolidating Data .

Supported Markets

The only market available for Forex pairs is Market.Oanda Market.OANDA , so you don't need to pass a market argument to the AddForex add_forex method.

_symbol = AddForex("EURUSD", market: Market.Oanda).Symbol;
self._symbol = self.add_forex("EURUSD", market=Market.OANDA).symbol

The brokerage models have a default market for each asset class. If you set a brokerage model, you may not need to specify the market to use.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

_symbol = AddForex("EURUSD", fillForward: false).Symbol;
self._symbol = self.add_forex("EURUSD", fill_forward=False).symbol

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. The Oanda brokerage let's you use up to 50x leverage on margin accounts. To change the amount of leverage you can use for a Forex pair, pass a leverage argument to the AddForex add_forex method.

_symbol = AddForex("EURUSD", leverage: 35).Symbol;
self._symbol = self.add_forex("EURUSD", leverage=35).symbol

Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to OnData on_data or the data from history request . If you change the data normalization mode, it won't change the outcome.

Properties

The AddForex add_forex method returns a Forex object, which have the following properties:

 

Forex

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a QuoteBar argument, it only receives QuoteBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the QuoteBars DataDictionary is made up of QuoteBar objects. To access individual data points in the dictionary, you can index the dictionary with the Forex pair ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for Forex data, see Resolutions .

Quotes

QuoteBar objects are bars that consolidate NBBO quotes from the exchanges. They contain the open, high, low, and close prices of the bid and ask. The Open open , High high , Low low , and Close close properties of the QuoteBar object are the mean of the respective bid and ask prices. If the bid or ask portion of the QuoteBar has no data, the Open open , High high , Low low , and Close close properties of the QuoteBar copy the values of either the Bid bid or Ask ask instead of taking their mean.

Quotebar decomposition

QuoteBar objects have the following properties:

To get the QuoteBar objects in the Slice , index the QuoteBars property of the Slice with the Forex pair Symbol symbol . If the Forex pair doesn't actively get quotes or you are in the same time step as when you added the Forex pair subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your Forex pair before you index the Slice with the Forex pair Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    quote_bar = slice.quote_bars.get(self._symbol)   # None if not found

You can also iterate through the QuoteBars dictionary. The keys of the dictionary are the Symbol objects and the values are the QuoteBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        var askPrice = quoteBar.Ask.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        ask_price = quote_bar.ask.close

QuoteBar objects let LEAN incorporate spread costs into your simulated trade fills to make backtest results more realistic.

Ticks

Tick objects represent a single trade or quote at a moment in time. A trade tick is a record of a transaction for the Forex pair. A quote tick is an offer to buy or sell the Forex pair at a specific price. Tick objects have the following properties:

Trade ticks have a non-zero value for the Quantity quantity and Price price properties, but they have a zero value for the BidPrice bid_price , BidSize bid_size , AskPrice ask_price , and AskSize ask_size properties. Quote ticks have non-zero values for BidPrice bid_price and BidSize bid_size properties or have non-zero values for AskPrice ask_price and AskSize ask_size properties. To check if a tick is a trade or a quote, use the TickType ticktype property.

In backtests, LEAN groups ticks into one millisecond buckets. In live trading, LEAN groups ticks into ~70-millisecond buckets. To get the Tick objects in the Slice , index the Ticks property of the Slice with a Symbol symbol . If the Forex pair doesn't actively trade or you are in the same time step as when you added the Forex pair subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your Forex pair before you index the Slice with the Forex pair Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    ticks = slice.ticks.get(self._symbol, [])   # Empty if not found
    for tick in ticks:
        price = tick.price

You can also iterate through the Ticks dictionary. The keys of the dictionary are the Symbol objects and the values are the List<Tick> list[Tick] objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            price = tick.price

Tick data is raw and unfiltered, so it can contain bad ticks that skew your trade results. For example, some ticks come from dark pools, which aren't tradable. We recommend you only use tick data if you understand the risks and are able to perform your own online tick filtering.

 

Forex

Market Hours

Introduction

This page shows the trading hours, holidays, and time zone of the Forex market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Forex market:

Weekday Time (America/New York)
Sunday 17:03:00 to 24:00:00
Monday 00:00:00 to 16:58:00, 17:03:00 to 24:00:00
Tuesday 00:00:00 to 16:58:00, 17:03:00 to 24:00:00
Wednesday 00:00:00 to 16:58:00, 17:03:00 to 24:00:00
Thursday 00:00:00 to 16:58:00, 17:03:00 to 24:00:00
Friday 00:00:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Forex market:

Date ( yyyy-mm-dd )
2005-01-01 2010-01-01 2010-12-25 2011-01-01 2012-12-25
2013-01-01 2015-12-25 2016-01-01 2016-12-25 2017-01-01
2020-12-25 2021-01-01 2022-12-25 2022-12-26 2023-01-01
2023-01-02 2023-12-24 2023-12-31 2024-01-01 2024-12-25
2025-01-01

Early Closes

The following table shows the early closes for the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2005-12-29 17:00:00
2005-12-30 17:00:00
2007-12-31 17:00:00
2008-12-31 17:00:00
2009-12-31 17:00:00
2010-12-31 17:00:00
2011-12-30 17:00:00
2012-12-31 14:00:00
2013-12-31 14:00:00
2014-12-31 14:00:00
2015-12-31 14:00:00
2016-12-30 14:00:00
2017-12-29 17:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-12-24 17:00:00
2019-12-31 17:00:00
2020-12-24 17:00:00
2020-12-31 17:00:00
2021-12-31 17:00:00
2024-12-24 17:00:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2018-12-25 17:00:00
2019-01-01 17:00:00
2019-12-25 17:00:00
2020-01-01 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Forex market trades in the America/New York time zone.

Assets With Other Hours

The following list shows the pairs that have different trading periods than the overall Forex market:

 

Market Hours

EURNZD

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/NZD pair in the Forex market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/NZD pair in the Forex market:

Weekday Time (America/New York)
Sunday 17:03:00 to 24:00:00
Monday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Tuesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Wednesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Thursday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Friday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/NZD pair in the Forex market:

Date ( yyyy-mm-dd )
2005-01-01 2010-01-01 2010-12-25 2011-01-01 2012-12-25
2013-01-01 2015-12-25 2016-01-01 2016-12-25 2017-01-01
2020-12-25 2021-01-01 2022-12-25 2022-12-26 2023-01-01
2023-01-02 2023-12-24 2023-12-31 2024-01-01 2024-12-25
2025-01-01

Early Closes

The following table shows the early closes for the EUR/NZD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2005-12-29 17:00:00
2005-12-30 17:00:00
2007-12-31 17:00:00
2008-12-31 17:00:00
2009-12-31 17:00:00
2010-12-31 17:00:00
2011-12-30 17:00:00
2012-12-31 14:00:00
2013-12-31 14:00:00
2014-12-31 14:00:00
2015-12-31 14:00:00
2016-12-30 14:00:00
2017-12-29 17:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-12-24 17:00:00
2019-12-31 17:00:00
2020-12-24 17:00:00
2020-12-31 17:00:00
2021-12-31 17:00:00
2024-12-24 17:00:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the EUR/NZD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2018-12-25 17:00:00
2019-01-01 17:00:00
2019-12-25 17:00:00
2020-01-01 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The EUR/NZD pair in the Forex market trades in the America/New York time zone.

 

Market Hours

GBPNZD

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/NZD pair in the Forex market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/NZD pair in the Forex market:

Weekday Time (America/New York)
Sunday 17:03:00 to 24:00:00
Monday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Tuesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Wednesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Thursday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Friday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/NZD pair in the Forex market:

Date ( yyyy-mm-dd )
2005-01-01 2010-01-01 2010-12-25 2011-01-01 2012-12-25
2013-01-01 2015-12-25 2016-01-01 2016-12-25 2017-01-01
2020-12-25 2021-01-01 2022-12-25 2022-12-26 2023-01-01
2023-01-02 2023-12-24 2023-12-31 2024-01-01 2024-12-25
2025-01-01

Early Closes

The following table shows the early closes for the GBP/NZD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2005-12-29 17:00:00
2005-12-30 17:00:00
2007-12-31 17:00:00
2008-12-31 17:00:00
2009-12-31 17:00:00
2010-12-31 17:00:00
2011-12-30 17:00:00
2012-12-31 14:00:00
2013-12-31 14:00:00
2014-12-31 14:00:00
2015-12-31 14:00:00
2016-12-30 14:00:00
2017-12-29 17:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-12-24 17:00:00
2019-12-31 17:00:00
2020-12-24 17:00:00
2020-12-31 17:00:00
2021-12-31 17:00:00
2024-12-24 17:00:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the GBP/NZD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2018-12-25 17:00:00
2019-01-01 17:00:00
2019-12-25 17:00:00
2020-01-01 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The GBP/NZD pair in the Forex market trades in the America/New York time zone.

 

Market Hours

NZDCAD

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/CAD pair in the Forex market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/CAD pair in the Forex market:

Weekday Time (America/New York)
Sunday 17:03:00 to 24:00:00
Monday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Tuesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Wednesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Thursday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Friday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/CAD pair in the Forex market:

Date ( yyyy-mm-dd )
2005-01-01 2010-01-01 2010-12-25 2011-01-01 2012-12-25
2013-01-01 2015-12-25 2016-01-01 2016-12-25 2017-01-01
2020-12-25 2021-01-01 2022-12-25 2022-12-26 2023-01-01
2023-01-02 2023-12-24 2023-12-31 2024-01-01 2024-12-25
2025-01-01

Early Closes

The following table shows the early closes for the NZD/CAD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2005-12-29 17:00:00
2005-12-30 17:00:00
2007-12-31 17:00:00
2008-12-31 17:00:00
2009-12-31 17:00:00
2010-12-31 17:00:00
2011-12-30 17:00:00
2012-12-31 14:00:00
2013-12-31 14:00:00
2014-12-31 14:00:00
2015-12-31 14:00:00
2016-12-30 14:00:00
2017-12-29 17:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-12-24 17:00:00
2019-12-31 17:00:00
2020-12-24 17:00:00
2020-12-31 17:00:00
2021-12-31 17:00:00
2024-12-24 17:00:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the NZD/CAD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2018-12-25 17:00:00
2019-01-01 17:00:00
2019-12-25 17:00:00
2020-01-01 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The NZD/CAD pair in the Forex market trades in the America/New York time zone.

 

Market Hours

NZDCHF

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/CHF pair in the Forex market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/CHF pair in the Forex market:

Weekday Time (America/New York)
Sunday 17:03:00 to 24:00:00
Monday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Tuesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Wednesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Thursday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Friday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/CHF pair in the Forex market:

Date ( yyyy-mm-dd )
2005-01-01 2010-01-01 2010-12-25 2011-01-01 2012-12-25
2013-01-01 2015-12-25 2016-01-01 2016-12-25 2017-01-01
2020-12-25 2021-01-01 2022-12-25 2022-12-26 2023-01-01
2023-01-02 2023-12-24 2023-12-31 2024-01-01 2024-12-25
2025-01-01

Early Closes

The following table shows the early closes for the NZD/CHF pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2005-12-29 17:00:00
2005-12-30 17:00:00
2007-12-31 17:00:00
2008-12-31 17:00:00
2009-12-31 17:00:00
2010-12-31 17:00:00
2011-12-30 17:00:00
2012-12-31 14:00:00
2013-12-31 14:00:00
2014-12-31 14:00:00
2015-12-31 14:00:00
2016-12-30 14:00:00
2017-12-29 17:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-12-24 17:00:00
2019-12-31 17:00:00
2020-12-24 17:00:00
2020-12-31 17:00:00
2021-12-31 17:00:00
2024-12-24 17:00:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the NZD/CHF pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2018-12-25 17:00:00
2019-01-01 17:00:00
2019-12-25 17:00:00
2020-01-01 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The NZD/CHF pair in the Forex market trades in the America/New York time zone.

 

Market Hours

NZDHKD

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/HKD pair in the Forex market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/HKD pair in the Forex market:

Weekday Time (America/New York)
Sunday 17:03:00 to 24:00:00
Monday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Tuesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Wednesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Thursday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Friday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/HKD pair in the Forex market:

Date ( yyyy-mm-dd )
2005-01-01 2010-01-01 2010-12-25 2011-01-01 2012-12-25
2013-01-01 2015-12-25 2016-01-01 2016-12-25 2017-01-01
2020-12-25 2021-01-01 2022-12-25 2022-12-26 2023-01-01
2023-01-02 2023-12-24 2023-12-31 2024-01-01 2024-12-25
2025-01-01

Early Closes

The following table shows the early closes for the NZD/HKD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2005-12-29 17:00:00
2005-12-30 17:00:00
2007-12-31 17:00:00
2008-12-31 17:00:00
2009-12-31 17:00:00
2010-12-31 17:00:00
2011-12-30 17:00:00
2012-12-31 14:00:00
2013-12-31 14:00:00
2014-12-31 14:00:00
2015-12-31 14:00:00
2016-12-30 14:00:00
2017-12-29 17:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-12-24 17:00:00
2019-12-31 17:00:00
2020-12-24 17:00:00
2020-12-31 17:00:00
2021-12-31 17:00:00
2024-12-24 17:00:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the NZD/HKD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2018-12-25 17:00:00
2019-01-01 17:00:00
2019-12-25 17:00:00
2020-01-01 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The NZD/HKD pair in the Forex market trades in the America/New York time zone.

 

Market Hours

NZDJPY

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/JPY pair in the Forex market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/JPY pair in the Forex market:

Weekday Time (America/New York)
Sunday 17:03:00 to 24:00:00
Monday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Tuesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Wednesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Thursday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Friday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/JPY pair in the Forex market:

Date ( yyyy-mm-dd )
2005-01-01 2010-01-01 2010-12-25 2011-01-01 2012-12-25
2013-01-01 2015-12-25 2016-01-01 2016-12-25 2017-01-01
2020-12-25 2021-01-01 2022-12-25 2022-12-26 2023-01-01
2023-01-02 2023-12-24 2023-12-31 2024-01-01 2024-12-25
2025-01-01

Early Closes

The following table shows the early closes for the NZD/JPY pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2005-12-29 17:00:00
2005-12-30 17:00:00
2007-12-31 17:00:00
2008-12-31 17:00:00
2009-12-31 17:00:00
2010-12-31 17:00:00
2011-12-30 17:00:00
2012-12-31 14:00:00
2013-12-31 14:00:00
2014-12-31 14:00:00
2015-12-31 14:00:00
2016-12-30 14:00:00
2017-12-29 17:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-12-24 17:00:00
2019-12-31 17:00:00
2020-12-24 17:00:00
2020-12-31 17:00:00
2021-12-31 17:00:00
2024-12-24 17:00:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the NZD/JPY pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2018-12-25 17:00:00
2019-01-01 17:00:00
2019-12-25 17:00:00
2020-01-01 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The NZD/JPY pair in the Forex market trades in the America/New York time zone.

 

Market Hours

NZDSGD

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/SGD pair in the Forex market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/SGD pair in the Forex market:

Weekday Time (America/New York)
Sunday 17:03:00 to 24:00:00
Monday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Tuesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Wednesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Thursday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Friday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/SGD pair in the Forex market:

Date ( yyyy-mm-dd )
2005-01-01 2010-01-01 2010-12-25 2011-01-01 2012-12-25
2013-01-01 2015-12-25 2016-01-01 2016-12-25 2017-01-01
2020-12-25 2021-01-01 2022-12-25 2022-12-26 2023-01-01
2023-01-02 2023-12-24 2023-12-31 2024-01-01 2024-12-25
2025-01-01

Early Closes

The following table shows the early closes for the NZD/SGD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2005-12-29 17:00:00
2005-12-30 17:00:00
2007-12-31 17:00:00
2008-12-31 17:00:00
2009-12-31 17:00:00
2010-12-31 17:00:00
2011-12-30 17:00:00
2012-12-31 14:00:00
2013-12-31 14:00:00
2014-12-31 14:00:00
2015-12-31 14:00:00
2016-12-30 14:00:00
2017-12-29 17:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-12-24 17:00:00
2019-12-31 17:00:00
2020-12-24 17:00:00
2020-12-31 17:00:00
2021-12-31 17:00:00
2024-12-24 17:00:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the NZD/SGD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2018-12-25 17:00:00
2019-01-01 17:00:00
2019-12-25 17:00:00
2020-01-01 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The NZD/SGD pair in the Forex market trades in the America/New York time zone.

 

Market Hours

NZDUSD

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/USD pair in the Forex market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/USD pair in the Forex market:

Weekday Time (America/New York)
Sunday 17:03:00 to 24:00:00
Monday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Tuesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Wednesday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Thursday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00, 17:03:00 to 24:00:00
Friday 00:00:00 to 12:58:00, 13:03:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/USD pair in the Forex market:

Date ( yyyy-mm-dd )
2005-01-01 2010-01-01 2010-12-25 2011-01-01 2012-12-25
2013-01-01 2015-12-25 2016-01-01 2016-12-25 2017-01-01
2020-12-25 2021-01-01 2022-12-25 2022-12-26 2023-01-01
2023-01-02 2023-12-24 2023-12-31 2024-01-01 2024-12-25
2025-01-01

Early Closes

The following table shows the early closes for the NZD/USD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2005-12-29 17:00:00
2005-12-30 17:00:00
2007-12-31 17:00:00
2008-12-31 17:00:00
2009-12-31 17:00:00
2010-12-31 17:00:00
2011-12-30 17:00:00
2012-12-31 14:00:00
2013-12-31 14:00:00
2014-12-31 14:00:00
2015-12-31 14:00:00
2016-12-30 14:00:00
2017-12-29 17:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-12-24 17:00:00
2019-12-31 17:00:00
2020-12-24 17:00:00
2020-12-31 17:00:00
2021-12-31 17:00:00
2024-12-24 17:00:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the NZD/USD pair in the Forex market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2018-12-25 17:00:00
2019-01-01 17:00:00
2019-12-25 17:00:00
2020-01-01 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The NZD/USD pair in the Forex market trades in the America/New York time zone.

 

Asset Classes

Futures

Select one of the following Futures markets to see its operating hours:

See Also

BasicTemplateFuturesAlgorithm.py
BasicTemplateFuturesAlgorithm.cs

 

Futures

Requesting Data

Introduction

Request Futures data in your algorithm to receive a feed of contract prices in the OnData on_data method. For more information about the specific dataset we use for backtests, see the US Futures dataset listing . To trade Futures live, you can use the QuantConnect data provider or one of the brokerage data providers .

Create Subscriptions

Before you can subscribe to a Futures contract, you must get the contract Symbol symbol .

Get Contract Symbols

To get Futures contract Symbol objects, call the CreateFuture create_future method or use the FutureChainProvider future_chain_provider . If you use the CreateFuture create_future method, you need to know the specific contract details.

_contractSymbol = QuantConnect.Symbol.CreateFuture(Futures.Indices.SP500EMini,
    Market.CME, new DateTime(2022, 6, 17));
self._contract_symbol = Symbol.create_future(Futures.Indices.SP500E_MINI,
    Market.CME, datetime(2022,6,17))

If you use the FutureChainProvider future_chain_provider , you need to create the continuous contract Symbol of the Future. The GetFutureContractList get_future_contract_list method of FutureChainProvider future_chain_provider returns a list of Symbol objects that reference the available Futures contracts for a given underlying Future on a given date.

var continuousFutureSymbol = QuantConnect.Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME);
var contractSymbols = FutureChainProvider.GetFutureContractList(continuousFutureSymbol, Time);
_contractSymbol = contractSymbols.OrderByDescending(symbol => symbol.ID.Date).Last();
continuous_future_symbol = Symbol.create(Futures.Indices.SP500E_MINI, SecurityType.FUTURE, Market.CME)
contract_symbols = self.future_chain_provider.get_future_contract_list(continuous_future_symbol, self.time)
self._contract_symbol = sorted(contract_symbols, key=lambda symbol: symbol.id.date)[0]

Subscribe to Contracts

To create a Futures contract subscription, pass the contract Symbol symbol to the AddFutureContract add_future_contract method. Save a reference to the contract Symbol symbol so you can easily access the contract in the Futures Chains that LEAN passes to the OnData on_data method.

AddFutureContract(_contractSymbol);
self.add_future_contract(self._contract_symbol)

The AddFutureContract add_future_contract method creates a subscription for a single Future contract and adds it to your user-defined universe. To create a dynamic universe of Futures contracts, add a Futures universe or a Futures Universe Selection model .

Warm Up Contract Prices

If you subscribe to a Futures contract with AddFutureContract add_future_contract , you'll need to wait until the next Slice to receive data and trade the contract. To trade the contract in the same time step you subscribe to the contract, set the current price of the contract in a security initializer .

var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, seeder));
seeder = FuncSecuritySeeder(self.get_last_known_prices)
self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, seeder))

Supported Assets

To view the supported assets in the US Futures dataset, see Supported Assets .

Resolutions

The following table shows the available resolutions and data formats for Futures subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK green check green check
Second SECOND green check green check
Minute MINUTE green check green check
Hour HOUR green check green check
Daily DAILY green check green check

The default resolution for Futures contract subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddFutureContract add_future_contract method.

AddFutureContract(_contractSymbol, Resolution.Daily);
self.add_future_contract(self._contract_symbol, Resolution.DAILY)

To create custom resolution periods, see Consolidating Data .

Supported Markets

The following Market enumeration members are available for Futures:

Historical data for backtesting is unavailable for ICE , INDIA , SGX and NYSELIFFE . In live trading, LEAN sources this data from your brokerage or a third-party data provider .

You don't need to pass a market argument to the AddFutureContract add_future_contract method because the contract Symbol already contains the market.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

AddFutureContract(_contractSymbol, fillForward: false);
self.add_future_contract(self._contract_symbol, fill_forward=False)

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. Futures are already leveraged products, so you can't change their leverage with the default margin model .

Extended Market Hours

By default, your security subscriptions only cover regular trading hours. To subscribe to pre and post-market trading hours for a specific asset, enable the extendedMarketHours extended_market_hours argument when you create the security subscription.

AddFutureContract(_contractSymbol, extendedMarketHours: true);
self.add_future_contract(self._contract_symbol, extended_market_hours=True)

You only receive extended market hours data if you create the subscription with minute, second, or tick resolution. If you create the subscription with daily or hourly resolution, the bars only reflect the regular trading hours.

To view the schedule of regular and extended market hours, see Market Hours .

In general, we model most Futures market hours with the following segments:

Market Segment Time
Pre-market 00:00:00 to 09:30:00
Market 09:30:00 to 17:00:00
Post-market 18:00:00 to 00:00:00

We model it this way because some Futures, like VIX, have pre- and post-market hours, so we standardized it. With this segmentation, if you set a Scheduled Events for the market open, it's set for 9:30 AM instead of midnight.

Continuous Contracts

A continuous Futures contract represents a single contract that maps to other contracts over time as the rollover rules are met. For more information about continuous Futures contracts, see Continuous Contracts .

Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to OnData on_data or the data from history request for Futures contracts. If you change the data normalization mode, it won't change the outcome.

The following data normalization modes are available for continuous Futures contracts :

Properties

The AddFutureContract add_future_contract method returns a Future object, which have the following properties:

 

Futures

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a TradeBar argument, it only receives TradeBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the TradeBars DataDictionary is made up of TradeBar objects. To access individual data points in the dictionary, you can index the dictionary with the contract ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for Futures data, see Resolutions .

Trades

TradeBar objects are price bars that consolidate individual trades from the exchanges. They contain the open, high, low, close, and volume of trading activity over a period of time.

Tradebar decomposition

TradeBar objects have the following properties:

To get the TradeBar objects in the Slice , index the Slice or index the Bars bars property of the Slice with the contract Symbol symbol . If the contract doesn't actively trade or you are in the same time step as when you added the contract subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your contract before you index the Slice with the contract Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_contractSymbol))
    {
        var tradeBar = slice.Bars[_contractSymbol];
    }
}
def on_data(self, slice: Slice) -> None:
    trade_bar = slice.bars.get(self._contract_symbol)   # None if not found

You can also iterate through the TradeBars dictionary. The keys of the dictionary are the Symbol objects and the values are the TradeBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        var closePrice = tradeBar.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        close_price = trade_bar.close

Quotes

QuoteBar objects are bars that consolidate NBBO quotes from the exchanges. They contain the open, high, low, and close prices of the bid and ask. The Open open , High high , Low low , and Close close properties of the QuoteBar object are the mean of the respective bid and ask prices. If the bid or ask portion of the QuoteBar has no data, the Open open , High high , Low low , and Close close properties of the QuoteBar copy the values of either the Bid bid or Ask ask instead of taking their mean.

Quotebar decomposition

QuoteBar objects have the following properties:

To get the QuoteBar objects in the Slice , index the QuoteBars property of the Slice with the contract Symbol symbol . If the contract doesn't actively get quotes or you are in the same time step as when you added the contract subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your contract before you index the Slice with the contract Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_contractSymbol))
    {
        var quoteBar = slice.QuoteBars[_contractSymbol];
    }
}
def on_data(self, slice: Slice) -> None:
    quote_bar = slice.quote_bars.get(self._contract_symbol)   # None if not found

You can also iterate through the QuoteBars dictionary. The keys of the dictionary are the Symbol objects and the values are the QuoteBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        var askPrice = quoteBar.Ask.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        ask_price = quote_bar.ask.close

QuoteBar objects let LEAN incorporate spread costs into your simulated trade fills to make backtest results more realistic.

Ticks

Tick objects represent a single trade or quote at a moment in time. A trade tick is a record of a transaction for the contract. A quote tick is an offer to buy or sell the contract at a specific price. Tick objects have the following properties:

Trade ticks have a non-zero value for the Quantity quantity and Price price properties, but they have a zero value for the BidPrice bid_price , BidSize bid_size , AskPrice ask_price , and AskSize ask_size properties. Quote ticks have non-zero values for BidPrice bid_price and BidSize bid_size properties or have non-zero values for AskPrice ask_price and AskSize ask_size properties. To check if a tick is a trade or a quote, use the TickType ticktype property.

In backtests, LEAN groups ticks into one millisecond buckets. In live trading, LEAN groups ticks into ~70-millisecond buckets. To get the Tick objects in the Slice , index the Ticks property of the Slice with a Symbol symbol . If the contract doesn't actively trade or you are in the same time step as when you added the contract subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your contract before you index the Slice with the contract Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Ticks.ContainsKey(_contractSymbol))
    {
        var ticks = slice.Ticks[_contractSymbol];
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    ticks = slice.ticks.get(self._contract_symbol, [])   # Empty if not found
    for tick in ticks:
        price = tick.price

You can also iterate through the Ticks dictionary. The keys of the dictionary are the Symbol objects and the values are the List<Tick> list[Tick] objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            price = tick.price

Tick data is raw and unfiltered, so it can contain bad ticks that skew your trade results. For example, some ticks come from dark pools, which aren't tradable. We recommend you only use tick data if you understand the risks and are able to perform your own online tick filtering.

Futures Chains

FuturesChain objects represent an entire chain of contracts for a single underlying Future. They have the following properties:

To get the FuturesChain , index the FuturesChains futures_chains property of the Slice with the continuous contract Symbol .

public override void OnData(Slice slice)
{
    if (slice.FuturesChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.futures_chains.get(self._contract_symbol.canonical)
    if chain:
        contracts = chain.contracts

You can also loop through the FuturesChains futures_chains property to get each FuturesChain .

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.FuturesChains)
    {
        var continuousContractSymbol = kvp.Key;
        var chain = kvp.Value;
        var contracts = chain.Contracts;
    }
}

public void OnData(FuturesChains futuresChains)
{
    foreach (var kvp in futuresChains)
    {
        var continuousContractSymbol = kvp.Key;
        var chain = kvp.Value;
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    for continuous_contract_symbol, chain in slice.futures_chains.items():
        contracts = chain.contracts

Futures Contracts

FuturesContract objects represent the data of a single Futures contract in the market. They have the following properties:

To get the Futures contracts in the Slice , use the Contracts contracts property of the FuturesChain .

public override void OnData(Slice slice)
{
    if (slice.FuturesChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var price = contract.LastPrice;
        }
    }
}

public void OnData(FuturesChains futuresChains)
{
    if (futuresChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var price = contract.LastPrice;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.FuturesChains.get(self._contract_symbol.Canonical)
    if chain:
        contract = chain.Contracts.get(self._contract_symbol)
        if contract:
            price = contract.LastPrice

Open interest is the number of outstanding contracts that haven't been settled. It provides a measure of investor interest and the market liquidity, so it's a popular metric to use for contract selection. Open interest is calculated once per day. To get the latest open interest value, use the OpenInterest open_interest property of the Future or FutureContract Futurecontract .

public override void OnData(Slice slice)
{
    if (slice.FuturesChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var openInterest = contract.OpenInterest;
        }
    }
}

def on_data(self, slice: Slice) -> None:
    chain = slice.FuturesChains.get(self._contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._contract_symbol)
        if contract:
            open_interest = contract.open_interest

Symbol Changes

When the continuous contract rolls over, LEAN passes a SymbolChangedEvent to your OnData on_data method, which contains the old contract Symbol and the new contract Symbol . SymbolChangedEvent objects have the following properties:

To get the SymbolChangedEvent , use the SymbolChangedEvents symbol_changed_events property of the Slice . You can use the SymbolChangedEvent to roll over contracts.

public override void OnData(Slice slice)
{
    foreach (var (symbol, changedEvent) in slice.SymbolChangedEvents)
    {
        var oldSymbol = changedEvent.OldSymbol;
        var newSymbol = changedEvent.NewSymbol;
        var tag = $"Rollover - Symbol changed at {Time}: {oldSymbol} -> {newSymbol}";
        var quantity = Portfolio[oldSymbol].Quantity;
        // Rolling over: to liquidate any position of the old mapped contract and switch to the newly mapped contract
        Liquidate(oldSymbol, tag: tag);
        if (quantity != 0) MarketOrder(newSymbol, quantity, tag: tag);
        Log(tag);
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, changed_event in  slice.symbol_changed_events.items():
        old_symbol = changed_event.old_symbol
        new_symbol = changed_event.new_symbol
        tag = f"Rollover - Symbol changed at {self.time}: {old_symbol} -> {new_symbol}"
        quantity = self.portfolio[old_symbol].quantity

        # Rolling over: to liquidate any position of the old mapped contract and switch to the newly mapped contract
        self.liquidate(old_symbol, tag=tag)
        if quantity: self.market_order(new_symbol, quantity, tag=tag)
        self.log(tag)

In backtesting, the SymbolChangedEvent occurs at midnight Eastern Time (ET). In live trading, the live data for continuous contract mapping arrives at 6/7 AM ET, so that's when it occurs.

 

Futures

Market Hours

Select one of the following Futures markets to see its operating hours:

 

Market Hours

CBOT

Introduction

This page shows the trading hours, holidays, and time zone of the CBOT Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 24:00:00
Tuesday 00:00:00 to 24:00:00
Wednesday 00:00:00 to 24:00:00
Thursday 00:00:00 to 24:00:00
Friday 00:00:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The CBOT Future market trades in the following time zones:

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall CBOT Future market:

Symbol Name
10Y Micro 10-Year Yield Futures
2YY Micro 2-Year Yield Futures
30Y Micro 30-Year Yield Futures
5YY Micro 5-Year Yield Futures
AW Bloomberg Commodity Index Futures
BCF Black Sea Corn Financially Settled (Platts) Futures
BWF Black Sea Wheat Financially Settled (Platts) Futures
EH Ethanol Futures
F1U 5-Year USD MAC Swap Futures
KE KC HRW Wheat Futures
MYM Micro E-mini Dow Jones Industrial Average Index Futures
TN Ultra 10-Year U.S. Treasury Note Futures
UB Ultra U.S. Treasury Bond Futures
YM E-mini Dow ($5) Futures
ZB U.S. Treasury Bond Futures
ZC Corn Futures
ZF 5-Year T-Note Futures
ZL Soybean Oil Futures
ZM Soybean Meal Futures
ZN 10-Year T-Note Futures
ZO Oats Futures
ZS Soybean Futures
ZT 2-Year T-Note Futures
ZW Chicago SRW Wheat Futures

 

CBOT

10Y

Introduction

This page shows the trading hours, holidays, and time zone of the Micro 10-Year Yield Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro 10-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro 10-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro 10-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Micro 10-Year Yield Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro 10-Year Yield Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro 10-Year Yield Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

2YY

Introduction

This page shows the trading hours, holidays, and time zone of the Micro 2-Year Yield Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro 2-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro 2-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro 2-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Micro 2-Year Yield Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro 2-Year Yield Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro 2-Year Yield Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

30Y

Introduction

This page shows the trading hours, holidays, and time zone of the Micro 30-Year Yield Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro 30-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro 30-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro 30-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Micro 30-Year Yield Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro 30-Year Yield Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro 30-Year Yield Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

5YY

Introduction

This page shows the trading hours, holidays, and time zone of the Micro 5-Year Yield Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro 5-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro 5-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro 5-Year Yield Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Micro 5-Year Yield Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro 5-Year Yield Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro 5-Year Yield Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

AW

Introduction

This page shows the trading hours, holidays, and time zone of the Bloomberg Commodity Index Futures contract in the CBOT Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Bloomberg Commodity Index Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:15:00 to 13:30:00
Tuesday 08:15:00 to 13:30:00
Wednesday 08:15:00 to 13:30:00
Thursday 08:15:00 to 13:30:00
Friday 08:15:00 to 13:30:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Bloomberg Commodity Index Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2023-04-07

Early Closes

The following table shows the early closes for the Bloomberg Commodity Index Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-11-27 12:00:00
2009-12-24 12:00:00
2010-11-26 12:00:00
2011-11-25 12:00:00
2011-12-31 12:00:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-11-27 12:00:00
2015-12-24 12:00:00
2016-11-25 12:00:00
2016-12-23 12:00:00
2017-07-03 12:00:00
2017-11-24 12:00:00
2017-12-22 12:00:00
2018-07-03 12:00:00
2018-11-23 12:00:00
2018-12-24 12:00:00
2019-07-03 12:00:00
2019-11-29 12:00:00
2019-12-24 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The Bloomberg Commodity Index Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

BCF

Introduction

This page shows the trading hours, holidays, and time zone of the Black Sea Corn Financially Settled (Platts) Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Black Sea Corn Financially Settled (Platts) Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Black Sea Corn Financially Settled (Platts) Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:20:00
Tuesday 08:30:00 to 13:20:00
Wednesday 08:30:00 to 13:20:00
Thursday 08:30:00 to 13:20:00
Friday 08:30:00 to 13:20:00

Post-market Hours

The following table shows the post-market hours for the Black Sea Corn Financially Settled (Platts) Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 19:00:00 to 24:00:00
Tuesday 19:00:00 to 24:00:00
Wednesday 19:00:00 to 24:00:00
Thursday 19:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Black Sea Corn Financially Settled (Platts) Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2018-07-04
2019-07-04 2020-07-03 2021-04-02 2021-07-05 2022-07-04
2023-04-07 2023-07-04 2023-11-23 2023-12-25 2024-01-02
2024-07-04 2024-11-28 2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the Black Sea Corn Financially Settled (Platts) Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2011-11-25 12:00:00
2012-01-15 19:00:00
2012-02-19 19:00:00
2012-11-21 16:45:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-01-20 16:00:00
2013-02-17 16:00:00
2013-05-26 16:00:00
2013-07-03 12:00:00
2013-09-01 16:00:00
2013-11-27 16:45:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-08-31 16:00:00
2014-11-26 16:45:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-01-18 16:00:00
2015-02-15 16:00:00
2015-05-24 16:00:00
2015-07-02 12:00:00
2015-09-06 16:00:00
2015-11-25 16:45:00
2015-11-27 12:05:00
2015-12-24 12:05:00
2016-01-17 16:00:00
2016-02-14 16:00:00
2016-05-29 16:00:00
2016-09-04 16:00:00
2016-11-23 16:45:00
2016-11-25 12:05:00
2016-12-23 12:05:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-05-28 16:00:00
2017-07-03 12:05:00
2017-09-03 16:00:00
2017-11-22 16:45:00
2017-12-22 12:05:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-05-27 16:00:00
2018-07-03 12:05:00
2018-09-02 16:00:00
2018-11-21 16:45:00
2018-11-23 12:05:00
2018-12-24 12:05:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-05-26 16:00:00
2019-07-03 12:05:00
2019-09-01 16:00:00
2019-11-27 16:45:00
2019-11-29 12:05:00
2019-12-24 12:05:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-05-24 16:00:00
2020-07-02 12:05:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-05-30 16:00:00
2021-09-05 16:00:00
2021-11-24 16:45:00
2021-11-26 12:05:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-09-04 16:00:00
2022-11-23 16:45:00
2022-11-25 12:05:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2023-11-24 12:05:00
2024-03-28 16:00:00
2024-12-24 12:05:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Black Sea Corn Financially Settled (Platts) Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:30:00
2012-01-03 09:30:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-11-23 09:30:00
2013-01-02 09:30:00
2013-01-21 19:00:00
2013-02-18 19:00:00
2013-05-27 19:00:00
2013-07-05 08:30:00
2013-09-02 19:00:00
2013-11-29 08:30:00
2013-12-26 08:30:00
2014-01-02 08:30:00
2014-01-20 19:00:00
2014-02-17 19:00:00
2014-05-26 19:00:00
2014-09-01 19:00:00
2015-01-19 19:00:00
2015-02-16 19:00:00
2015-05-25 19:00:00
2015-09-07 19:00:00
2016-01-18 19:00:00
2016-02-15 19:00:00
2016-05-30 19:00:00
2016-09-05 19:00:00
2016-11-25 08:30:00
2017-01-16 19:00:00
2017-02-20 19:00:00
2017-05-29 19:00:00
2017-07-05 08:30:00
2017-09-04 19:00:00
2017-11-24 08:30:00
2018-01-15 19:00:00
2018-02-19 19:00:00
2018-05-28 19:00:00
2018-07-05 08:30:00
2018-09-03 19:00:00
2018-11-23 08:30:00
2019-01-21 19:00:00
2019-02-18 19:00:00
2019-05-27 19:00:00
2019-07-05 08:30:00
2019-09-02 19:00:00
2019-11-29 08:30:00
2020-01-20 19:00:00
2020-02-17 19:00:00
2020-05-25 19:00:00
2020-09-07 19:00:00
2020-11-27 08:30:00
2021-01-18 19:00:00
2021-02-15 19:00:00
2021-05-31 19:00:00
2021-09-06 19:00:00
2021-11-26 08:30:00
2022-01-17 19:00:00
2022-02-21 19:00:00
2022-05-30 19:00:00
2022-06-20 19:00:00
2022-09-05 19:00:00
2023-01-16 19:00:00
2023-02-20 19:00:00
2023-05-29 19:00:00
2023-06-19 19:00:00
2023-09-04 19:00:00
2024-01-15 19:00:00
2024-02-19 19:00:00
2024-05-27 19:00:00
2024-06-19 19:00:00
2024-09-02 19:00:00

Time Zone

The Black Sea Corn Financially Settled (Platts) Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

BWF

Introduction

This page shows the trading hours, holidays, and time zone of the Black Sea Wheat Financially Settled (Platts) Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Black Sea Wheat Financially Settled (Platts) Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Black Sea Wheat Financially Settled (Platts) Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:20:00
Tuesday 08:30:00 to 13:20:00
Wednesday 08:30:00 to 13:20:00
Thursday 08:30:00 to 13:20:00
Friday 08:30:00 to 13:20:00

Post-market Hours

The following table shows the post-market hours for the Black Sea Wheat Financially Settled (Platts) Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 19:00:00 to 24:00:00
Tuesday 19:00:00 to 24:00:00
Wednesday 19:00:00 to 24:00:00
Thursday 19:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Black Sea Wheat Financially Settled (Platts) Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2018-07-04
2019-07-04 2020-07-03 2021-04-02 2021-07-05 2022-07-04
2023-04-07 2023-07-04 2023-11-23 2023-12-25 2024-01-02
2024-07-04 2024-11-28 2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the Black Sea Wheat Financially Settled (Platts) Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2011-11-25 12:00:00
2012-01-15 19:00:00
2012-02-19 19:00:00
2012-11-21 16:45:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-01-20 16:00:00
2013-02-17 16:00:00
2013-05-26 16:00:00
2013-07-03 12:00:00
2013-09-01 16:00:00
2013-11-27 16:45:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-08-31 16:00:00
2014-11-26 16:45:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-01-18 16:00:00
2015-02-15 16:00:00
2015-05-24 16:00:00
2015-07-02 12:00:00
2015-09-06 16:00:00
2015-11-25 16:45:00
2015-11-27 12:05:00
2015-12-24 12:05:00
2016-01-17 16:00:00
2016-02-14 16:00:00
2016-05-29 16:00:00
2016-09-04 16:00:00
2016-11-23 16:45:00
2016-11-25 12:05:00
2016-12-23 12:05:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-05-28 16:00:00
2017-07-03 12:05:00
2017-09-03 16:00:00
2017-11-22 16:45:00
2017-12-22 12:05:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-05-27 16:00:00
2018-07-03 12:05:00
2018-09-02 16:00:00
2018-11-21 16:45:00
2018-11-23 12:05:00
2018-12-24 12:05:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-05-26 16:00:00
2019-07-03 12:05:00
2019-09-01 16:00:00
2019-11-27 16:45:00
2019-11-29 12:05:00
2019-12-24 12:05:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-05-24 16:00:00
2020-07-02 12:05:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-05-30 16:00:00
2021-09-05 16:00:00
2021-11-24 16:45:00
2021-11-26 12:05:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-09-04 16:00:00
2022-11-23 16:45:00
2022-11-25 12:05:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2023-11-24 12:05:00
2024-03-28 16:00:00
2024-12-24 12:05:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Black Sea Wheat Financially Settled (Platts) Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:30:00
2012-01-03 09:30:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-11-23 09:30:00
2013-01-02 09:30:00
2013-01-21 19:00:00
2013-02-18 19:00:00
2013-05-27 19:00:00
2013-07-05 08:30:00
2013-09-02 19:00:00
2013-11-29 08:30:00
2013-12-26 08:30:00
2014-01-02 08:30:00
2014-01-20 19:00:00
2014-02-17 19:00:00
2014-05-26 19:00:00
2014-09-01 19:00:00
2015-01-19 19:00:00
2015-02-16 19:00:00
2015-05-25 19:00:00
2015-09-07 19:00:00
2016-01-18 19:00:00
2016-02-15 19:00:00
2016-05-30 19:00:00
2016-09-05 19:00:00
2016-11-25 08:30:00
2017-01-16 19:00:00
2017-02-20 19:00:00
2017-05-29 19:00:00
2017-07-05 08:30:00
2017-09-04 19:00:00
2017-11-24 08:30:00
2018-01-15 19:00:00
2018-02-19 19:00:00
2018-05-28 19:00:00
2018-07-05 08:30:00
2018-09-03 19:00:00
2018-11-23 08:30:00
2019-01-21 19:00:00
2019-02-18 19:00:00
2019-05-27 19:00:00
2019-07-05 08:30:00
2019-09-02 19:00:00
2019-11-29 08:30:00
2020-01-20 19:00:00
2020-02-17 19:00:00
2020-05-25 19:00:00
2020-09-07 19:00:00
2020-11-27 08:30:00
2021-01-18 19:00:00
2021-02-15 19:00:00
2021-05-31 19:00:00
2021-09-06 19:00:00
2021-11-26 08:30:00
2022-01-17 19:00:00
2022-02-21 19:00:00
2022-05-30 19:00:00
2022-06-20 19:00:00
2022-09-05 19:00:00
2023-01-16 19:00:00
2023-02-20 19:00:00
2023-05-29 19:00:00
2023-06-19 19:00:00
2023-09-04 19:00:00
2024-01-15 19:00:00
2024-02-19 19:00:00
2024-05-27 19:00:00
2024-06-19 19:00:00
2024-09-02 19:00:00

Time Zone

The Black Sea Wheat Financially Settled (Platts) Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

EH

Introduction

This page shows the trading hours, holidays, and time zone of the Ethanol Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Ethanol Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Ethanol Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Ethanol Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Ethanol Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02 2023-04-07

Early Closes

The following table shows the early closes for the Ethanol Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-19 16:15:00
2009-02-16 16:15:00
2009-05-22 15:15:00
2009-05-25 12:15:00
2009-07-03 12:30:00
2009-09-04 15:15:00
2009-09-07 12:15:00
2009-10-09 15:15:00
2009-11-26 12:15:00
2009-11-27 12:45:00
2009-12-24 12:45:00
2010-01-15 15:15:00
2010-01-18 12:15:00
2010-02-12 15:15:00
2010-02-15 12:15:00
2010-05-28 15:15:00
2010-05-31 12:15:00
2010-07-02 15:15:00
2010-07-05 12:15:00
2010-09-03 15:15:00
2010-09-06 12:15:00
2010-10-08 15:15:00
2010-11-25 12:15:00
2010-11-26 12:45:00
2010-12-31 15:15:00
2011-01-14 15:15:00
2011-01-17 12:15:00
2011-02-21 12:15:00
2011-05-30 12:15:00
2011-07-04 12:15:00
2011-09-05 12:15:00
2011-11-24 12:15:00
2011-11-25 12:45:00
2012-01-16 12:15:00
2012-02-20 12:15:00
2012-05-28 12:15:00
2012-07-04 12:15:00
2012-09-03 12:15:00
2012-11-22 12:15:00
2012-11-23 12:45:00
2012-12-24 12:45:00
2013-01-21 12:15:00
2013-02-18 12:15:00
2013-05-27 12:15:00
2013-07-04 12:15:00
2013-09-02 12:15:00
2013-11-28 12:15:00
2013-11-29 12:45:00
2013-12-24 12:45:00
2014-01-20 12:15:00
2014-02-17 12:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:45:00
2014-12-24 12:45:00
2015-01-19 12:00:00
2015-02-16 12:00:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:45:00
2015-12-24 12:45:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:45:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:45:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:45:00
2018-12-24 12:45:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:45:00
2019-12-24 12:45:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:45:00
2020-12-24 12:45:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:45:00
2022-01-17 13:30:00
2022-02-21 13:30:00
2022-05-30 13:30:00
2022-06-20 13:30:00
2022-07-04 13:30:00
2022-09-05 13:30:00
2022-11-24 13:30:00
2022-11-25 12:45:00
2023-01-16 13:30:00
2023-02-20 13:30:00
2023-05-29 13:30:00
2023-06-19 13:30:00
2023-07-04 13:30:00
2023-09-04 13:30:00
2023-11-23 13:30:00
2023-11-24 12:45:00
2024-01-15 13:30:00
2024-02-19 13:30:00
2024-03-28 16:00:00
2024-05-27 13:30:00
2024-06-19 13:30:00
2024-07-04 13:30:00
2024-09-02 13:30:00
2024-11-28 13:30:00
2024-12-24 12:45:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Ethanol Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-10-09 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Ethanol Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

F1U

Introduction

This page shows the trading hours, holidays, and time zone of the 5-Year USD MAC Swap Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the 5-Year USD MAC Swap Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the 5-Year USD MAC Swap Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the 5-Year USD MAC Swap Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The 5-Year USD MAC Swap Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

KE

Introduction

This page shows the trading hours, holidays, and time zone of the KC HRW Wheat Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the KC HRW Wheat Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00
Tuesday 00:00:00 to 07:45:00
Wednesday 00:00:00 to 07:45:00
Thursday 00:00:00 to 07:45:00
Friday 00:00:00 to 07:45:00

Regular Trading Hours

The following table shows the regular trading hours for the KC HRW Wheat Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:20:00
Tuesday 08:30:00 to 13:20:00
Wednesday 08:30:00 to 13:20:00
Thursday 08:30:00 to 13:20:00
Friday 08:30:00 to 13:20:00

Post-market Hours

The following table shows the post-market hours for the KC HRW Wheat Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 19:00:00 to 24:00:00
Tuesday 19:00:00 to 24:00:00
Wednesday 19:00:00 to 24:00:00
Thursday 19:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the KC HRW Wheat Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2013-01-01 2013-01-20 2013-02-17 2013-03-29 2013-05-26
2013-07-04 2013-09-01 2013-11-28 2013-12-25 2014-01-01
2014-01-19 2014-02-16 2014-04-18 2014-05-25 2014-07-04
2014-07-04 2014-07-06 2014-08-31 2014-11-27 2014-12-25
2015-01-01 2015-01-18 2015-02-15 2015-04-03 2015-04-03
2015-05-24 2015-07-03 2015-07-03 2015-09-06 2015-11-26
2015-12-25 2016-01-01 2016-01-17 2016-02-14 2016-03-25
2016-05-29 2016-07-03 2016-07-04 2016-09-04 2016-11-24
2017-01-15 2017-02-19 2017-04-14 2017-05-28 2017-07-04
2017-07-04 2017-09-03 2017-11-23 2017-12-25 2018-01-01
2018-01-14 2018-02-18 2018-03-30 2018-05-27 2018-07-04
2018-07-04 2018-09-02 2018-11-22 2018-12-25 2019-01-01
2019-01-20 2019-02-17 2019-04-19 2019-05-26 2019-07-04
2019-07-04 2019-09-01 2019-11-28 2019-12-25 2020-01-01
2020-01-19 2020-02-16 2020-04-10 2020-05-24 2020-07-03
2020-07-03 2020-09-06 2020-11-26 2020-12-25 2021-01-01
2021-04-02 2021-07-05 2022-07-04 2022-12-25 2022-12-26
2023-01-01 2023-01-02 2023-01-16 2023-02-20 2023-04-07
2023-05-29 2023-06-19 2023-07-04 2023-07-04 2023-09-04
2023-11-23 2023-11-23 2023-12-25 2023-12-25 2024-01-01
2024-01-02 2024-07-04 2024-11-28 2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the KC HRW Wheat Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2011-11-25 12:00:00
2012-01-15 19:00:00
2012-02-19 19:00:00
2012-11-21 16:45:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-01-20 16:00:00
2013-02-17 16:00:00
2013-05-26 16:00:00
2013-07-03 12:00:00
2013-09-01 16:00:00
2013-11-27 16:45:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-08-31 16:00:00
2014-11-26 16:45:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-01-18 16:00:00
2015-02-15 16:00:00
2015-05-24 16:00:00
2015-07-02 12:00:00
2015-09-06 16:00:00
2015-11-25 16:45:00
2015-11-27 12:05:00
2015-12-24 12:05:00
2016-01-17 16:00:00
2016-02-14 16:00:00
2016-05-29 16:00:00
2016-09-04 16:00:00
2016-11-23 16:45:00
2016-11-25 12:05:00
2016-12-23 12:05:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-05-28 16:00:00
2017-07-03 12:05:00
2017-09-03 16:00:00
2017-11-22 16:45:00
2017-12-22 12:05:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-05-27 16:00:00
2018-07-03 12:05:00
2018-09-02 16:00:00
2018-11-21 16:45:00
2018-11-23 12:05:00
2018-12-24 12:05:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-05-26 16:00:00
2019-07-03 12:05:00
2019-09-01 16:00:00
2019-11-27 16:45:00
2019-11-29 12:05:00
2019-12-24 12:05:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-05-24 16:00:00
2020-07-02 12:05:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-05-30 16:00:00
2021-09-05 16:00:00
2021-11-24 16:45:00
2021-11-26 12:05:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-09-04 16:00:00
2022-11-23 16:45:00
2022-11-25 12:05:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2023-11-24 12:05:00
2024-03-28 16:00:00
2024-12-24 12:05:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the KC HRW Wheat Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:30:00
2012-01-03 09:30:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-11-23 09:30:00
2013-01-02 09:30:00
2013-01-21 19:00:00
2013-02-18 19:00:00
2013-05-27 19:00:00
2013-07-05 08:30:00
2013-09-02 19:00:00
2013-11-29 08:30:00
2013-12-26 08:30:00
2014-01-02 08:30:00
2014-01-20 19:00:00
2014-02-17 19:00:00
2014-05-26 19:00:00
2014-09-01 19:00:00
2015-01-19 19:00:00
2015-02-16 19:00:00
2015-05-25 19:00:00
2015-09-07 19:00:00
2016-01-18 19:00:00
2016-02-15 19:00:00
2016-05-30 19:00:00
2016-09-05 19:00:00
2016-11-25 08:30:00
2017-01-16 19:00:00
2017-02-20 19:00:00
2017-05-29 19:00:00
2017-07-05 08:30:00
2017-09-04 19:00:00
2017-11-24 08:30:00
2018-01-15 19:00:00
2018-02-19 19:00:00
2018-05-28 19:00:00
2018-07-05 08:30:00
2018-09-03 19:00:00
2018-11-23 08:30:00
2019-01-21 19:00:00
2019-02-18 19:00:00
2019-05-27 19:00:00
2019-07-05 08:30:00
2019-09-02 19:00:00
2019-11-29 08:30:00
2020-01-20 19:00:00
2020-02-17 19:00:00
2020-05-25 19:00:00
2020-09-07 19:00:00
2020-11-27 08:30:00
2021-01-18 19:00:00
2021-02-15 19:00:00
2021-05-31 19:00:00
2021-09-06 19:00:00
2021-11-26 08:30:00
2022-01-17 19:00:00
2022-02-21 19:00:00
2022-05-30 19:00:00
2022-06-20 19:00:00
2022-09-05 19:00:00
2023-01-16 19:00:00
2023-02-20 19:00:00
2023-05-29 19:00:00
2023-06-19 19:00:00
2023-09-04 19:00:00
2024-01-15 19:00:00
2024-02-19 19:00:00
2024-05-27 19:00:00
2024-06-19 19:00:00
2024-09-02 19:00:00

Time Zone

The KC HRW Wheat Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

MYM

Introduction

This page shows the trading hours, holidays, and time zone of the Micro E-mini Dow Jones Industrial Average Index Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro E-mini Dow Jones Industrial Average Index Futures contract in the CBOT Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro E-mini Dow Jones Industrial Average Index Futures contract in the CBOT Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro E-mini Dow Jones Industrial Average Index Futures contract in the CBOT Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Micro E-mini Dow Jones Industrial Average Index Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00
2024-01-15 13:00:00
2024-02-19 13:00:00
2024-05-27 13:00:00
2024-06-19 13:00:00
2024-07-04 13:00:00
2024-09-02 13:00:00
2024-11-28 13:00:00
2024-12-24 13:15:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro E-mini Dow Jones Industrial Average Index Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro E-mini Dow Jones Industrial Average Index Futures contract in the CBOT Future market trades in the America/New York time zone.

 

CBOT

TN

Introduction

This page shows the trading hours, holidays, and time zone of the Ultra 10-Year U.S. Treasury Note Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Ultra 10-Year U.S. Treasury Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Ultra 10-Year U.S. Treasury Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Ultra 10-Year U.S. Treasury Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Ultra 10-Year U.S. Treasury Note Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Ultra 10-Year U.S. Treasury Note Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Ultra 10-Year U.S. Treasury Note Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

UB

Introduction

This page shows the trading hours, holidays, and time zone of the Ultra U.S. Treasury Bond Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Ultra U.S. Treasury Bond Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Ultra U.S. Treasury Bond Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Ultra U.S. Treasury Bond Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Ultra U.S. Treasury Bond Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Ultra U.S. Treasury Bond Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Ultra U.S. Treasury Bond Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

YM

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini Dow ($5) Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini Dow ($5) Futures contract in the CBOT Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini Dow ($5) Futures contract in the CBOT Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini Dow ($5) Futures contract in the CBOT Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the E-mini Dow ($5) Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00
2024-01-15 13:00:00
2024-02-19 13:00:00
2024-05-27 13:00:00
2024-06-19 13:00:00
2024-07-04 13:00:00
2024-09-02 13:00:00
2024-11-28 13:00:00
2024-12-24 13:15:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the E-mini Dow ($5) Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The E-mini Dow ($5) Futures contract in the CBOT Future market trades in the America/New York time zone.

 

CBOT

ZB

Introduction

This page shows the trading hours, holidays, and time zone of the U.S. Treasury Bond Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the U.S. Treasury Bond Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the U.S. Treasury Bond Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the U.S. Treasury Bond Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the U.S. Treasury Bond Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the U.S. Treasury Bond Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The U.S. Treasury Bond Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

ZC

Introduction

This page shows the trading hours, holidays, and time zone of the Corn Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Corn Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00
Tuesday 00:00:00 to 07:45:00
Wednesday 00:00:00 to 07:45:00
Thursday 00:00:00 to 07:45:00
Friday 00:00:00 to 07:45:00

Regular Trading Hours

The following table shows the regular trading hours for the Corn Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:20:00
Tuesday 08:30:00 to 13:20:00
Wednesday 08:30:00 to 13:20:00
Thursday 08:30:00 to 13:20:00
Friday 08:30:00 to 13:20:00

Post-market Hours

The following table shows the post-market hours for the Corn Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 19:00:00 to 24:00:00
Tuesday 19:00:00 to 24:00:00
Wednesday 19:00:00 to 24:00:00
Thursday 19:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Corn Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2018-07-04
2019-07-04 2020-07-03 2021-04-02 2021-07-05 2022-07-04
2023-04-07 2023-07-04 2023-11-23 2023-12-25 2024-01-02
2024-07-04 2024-11-28 2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the Corn Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2011-11-25 12:00:00
2012-01-15 19:00:00
2012-02-19 19:00:00
2012-11-21 16:45:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-01-20 16:00:00
2013-02-17 16:00:00
2013-05-26 16:00:00
2013-07-03 12:00:00
2013-09-01 16:00:00
2013-11-27 16:45:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-08-31 16:00:00
2014-11-26 16:45:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-01-18 16:00:00
2015-02-15 16:00:00
2015-05-24 16:00:00
2015-07-02 12:00:00
2015-09-06 16:00:00
2015-11-25 16:45:00
2015-11-27 12:05:00
2015-12-24 12:05:00
2016-01-17 16:00:00
2016-02-14 16:00:00
2016-05-29 16:00:00
2016-09-04 16:00:00
2016-11-23 16:45:00
2016-11-25 12:05:00
2016-12-23 12:05:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-05-28 16:00:00
2017-07-03 12:05:00
2017-09-03 16:00:00
2017-11-22 16:45:00
2017-12-22 12:05:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-05-27 16:00:00
2018-07-03 12:05:00
2018-09-02 16:00:00
2018-11-21 16:45:00
2018-11-23 12:05:00
2018-12-24 12:05:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-05-26 16:00:00
2019-07-03 12:05:00
2019-09-01 16:00:00
2019-11-27 16:45:00
2019-11-29 12:05:00
2019-12-24 12:05:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-05-24 16:00:00
2020-07-02 12:05:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-05-30 16:00:00
2021-09-05 16:00:00
2021-11-24 16:45:00
2021-11-26 12:05:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-09-04 16:00:00
2022-11-23 16:45:00
2022-11-25 12:05:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2023-11-24 12:05:00
2024-03-28 16:00:00
2024-12-24 12:05:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Corn Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:30:00
2012-01-03 09:30:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-11-23 09:30:00
2013-01-02 09:30:00
2013-01-21 19:00:00
2013-02-18 19:00:00
2013-05-27 19:00:00
2013-07-05 08:30:00
2013-09-02 19:00:00
2013-11-29 08:30:00
2013-12-26 08:30:00
2014-01-02 08:30:00
2014-01-20 19:00:00
2014-02-17 19:00:00
2014-05-26 19:00:00
2014-09-01 19:00:00
2015-01-19 19:00:00
2015-02-16 19:00:00
2015-05-25 19:00:00
2015-09-07 19:00:00
2016-01-18 19:00:00
2016-02-15 19:00:00
2016-05-30 19:00:00
2016-09-05 19:00:00
2016-11-25 08:30:00
2017-01-16 19:00:00
2017-02-20 19:00:00
2017-05-29 19:00:00
2017-07-05 08:30:00
2017-09-04 19:00:00
2017-11-24 08:30:00
2018-01-15 19:00:00
2018-02-19 19:00:00
2018-05-28 19:00:00
2018-07-05 08:30:00
2018-09-03 19:00:00
2018-11-23 08:30:00
2019-01-21 19:00:00
2019-02-18 19:00:00
2019-05-27 19:00:00
2019-07-05 08:30:00
2019-09-02 19:00:00
2019-11-29 08:30:00
2020-01-20 19:00:00
2020-02-17 19:00:00
2020-05-25 19:00:00
2020-09-07 19:00:00
2020-11-27 08:30:00
2021-01-18 19:00:00
2021-02-15 19:00:00
2021-05-31 19:00:00
2021-09-06 19:00:00
2021-11-26 08:30:00
2022-01-17 19:00:00
2022-02-21 19:00:00
2022-05-30 19:00:00
2022-06-20 19:00:00
2022-09-05 19:00:00
2023-01-16 19:00:00
2023-02-20 19:00:00
2023-05-29 19:00:00
2023-06-19 19:00:00
2023-09-04 19:00:00
2024-01-15 19:00:00
2024-02-19 19:00:00
2024-05-27 19:00:00
2024-06-19 19:00:00
2024-09-02 19:00:00

Time Zone

The Corn Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

ZF

Introduction

This page shows the trading hours, holidays, and time zone of the 5-Year T-Note Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the 5-Year T-Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the 5-Year T-Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the 5-Year T-Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the 5-Year T-Note Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the 5-Year T-Note Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The 5-Year T-Note Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

ZL

Introduction

This page shows the trading hours, holidays, and time zone of the Soybean Oil Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Soybean Oil Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00
Tuesday 00:00:00 to 07:45:00
Wednesday 00:00:00 to 07:45:00
Thursday 00:00:00 to 07:45:00
Friday 00:00:00 to 07:45:00

Regular Trading Hours

The following table shows the regular trading hours for the Soybean Oil Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:20:00
Tuesday 08:30:00 to 13:20:00
Wednesday 08:30:00 to 13:20:00
Thursday 08:30:00 to 13:20:00
Friday 08:30:00 to 13:20:00

Post-market Hours

The following table shows the post-market hours for the Soybean Oil Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 19:00:00 to 24:00:00
Tuesday 19:00:00 to 24:00:00
Wednesday 19:00:00 to 24:00:00
Thursday 19:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Soybean Oil Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2023-04-07

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Soybean Oil Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

ZM

Introduction

This page shows the trading hours, holidays, and time zone of the Soybean Meal Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Soybean Meal Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00
Tuesday 00:00:00 to 07:45:00
Wednesday 00:00:00 to 07:45:00
Thursday 00:00:00 to 07:45:00
Friday 00:00:00 to 07:45:00

Regular Trading Hours

The following table shows the regular trading hours for the Soybean Meal Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:20:00
Tuesday 08:30:00 to 13:20:00
Wednesday 08:30:00 to 13:20:00
Thursday 08:30:00 to 13:20:00
Friday 08:30:00 to 13:20:00

Post-market Hours

The following table shows the post-market hours for the Soybean Meal Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 19:00:00 to 24:00:00
Tuesday 19:00:00 to 24:00:00
Wednesday 19:00:00 to 24:00:00
Thursday 19:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Soybean Meal Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2023-04-07

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Soybean Meal Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

ZN

Introduction

This page shows the trading hours, holidays, and time zone of the 10-Year T-Note Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the 10-Year T-Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the 10-Year T-Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the 10-Year T-Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the 10-Year T-Note Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the 10-Year T-Note Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The 10-Year T-Note Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

ZO

Introduction

This page shows the trading hours, holidays, and time zone of the Oats Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Oats Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00
Tuesday 00:00:00 to 07:45:00
Wednesday 00:00:00 to 07:45:00
Thursday 00:00:00 to 07:45:00
Friday 00:00:00 to 07:45:00

Regular Trading Hours

The following table shows the regular trading hours for the Oats Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:20:00
Tuesday 08:30:00 to 13:20:00
Wednesday 08:30:00 to 13:20:00
Thursday 08:30:00 to 13:20:00
Friday 08:30:00 to 13:20:00

Post-market Hours

The following table shows the post-market hours for the Oats Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 19:00:00 to 24:00:00
Tuesday 19:00:00 to 24:00:00
Wednesday 19:00:00 to 24:00:00
Thursday 19:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Oats Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2018-07-04
2019-07-04 2020-07-03 2021-04-02 2021-07-05 2022-07-04
2023-04-07 2023-07-04 2023-11-23 2023-12-25 2024-01-02
2024-07-04 2024-11-28 2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the Oats Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2011-11-25 12:00:00
2012-01-15 19:00:00
2012-02-19 19:00:00
2012-11-21 16:45:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-01-20 16:00:00
2013-02-17 16:00:00
2013-05-26 16:00:00
2013-07-03 12:00:00
2013-09-01 16:00:00
2013-11-27 16:45:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-08-31 16:00:00
2014-11-26 16:45:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-01-18 16:00:00
2015-02-15 16:00:00
2015-05-24 16:00:00
2015-07-02 12:00:00
2015-09-06 16:00:00
2015-11-25 16:45:00
2015-11-27 12:05:00
2015-12-24 12:05:00
2016-01-17 16:00:00
2016-02-14 16:00:00
2016-05-29 16:00:00
2016-09-04 16:00:00
2016-11-23 16:45:00
2016-11-25 12:05:00
2016-12-23 12:05:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-05-28 16:00:00
2017-07-03 12:05:00
2017-09-03 16:00:00
2017-11-22 16:45:00
2017-12-22 12:05:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-05-27 16:00:00
2018-07-03 12:05:00
2018-09-02 16:00:00
2018-11-21 16:45:00
2018-11-23 12:05:00
2018-12-24 12:05:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-05-26 16:00:00
2019-07-03 12:05:00
2019-09-01 16:00:00
2019-11-27 16:45:00
2019-11-29 12:05:00
2019-12-24 12:05:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-05-24 16:00:00
2020-07-02 12:05:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-05-30 16:00:00
2021-09-05 16:00:00
2021-11-24 16:45:00
2021-11-26 12:05:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-09-04 16:00:00
2022-11-23 16:45:00
2022-11-25 12:05:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2023-11-24 12:05:00
2024-03-28 16:00:00
2024-12-24 12:05:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Oats Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:30:00
2012-01-03 09:30:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-11-23 09:30:00
2013-01-02 09:30:00
2013-01-21 19:00:00
2013-02-18 19:00:00
2013-05-27 19:00:00
2013-07-05 08:30:00
2013-09-02 19:00:00
2013-11-29 08:30:00
2013-12-26 08:30:00
2014-01-02 08:30:00
2014-01-20 19:00:00
2014-02-17 19:00:00
2014-05-26 19:00:00
2014-09-01 19:00:00
2015-01-19 19:00:00
2015-02-16 19:00:00
2015-05-25 19:00:00
2015-09-07 19:00:00
2016-01-18 19:00:00
2016-02-15 19:00:00
2016-05-30 19:00:00
2016-09-05 19:00:00
2016-11-25 08:30:00
2017-01-16 19:00:00
2017-02-20 19:00:00
2017-05-29 19:00:00
2017-07-05 08:30:00
2017-09-04 19:00:00
2017-11-24 08:30:00
2018-01-15 19:00:00
2018-02-19 19:00:00
2018-05-28 19:00:00
2018-07-05 08:30:00
2018-09-03 19:00:00
2018-11-23 08:30:00
2019-01-21 19:00:00
2019-02-18 19:00:00
2019-05-27 19:00:00
2019-07-05 08:30:00
2019-09-02 19:00:00
2019-11-29 08:30:00
2020-01-20 19:00:00
2020-02-17 19:00:00
2020-05-25 19:00:00
2020-09-07 19:00:00
2020-11-27 08:30:00
2021-01-18 19:00:00
2021-02-15 19:00:00
2021-05-31 19:00:00
2021-09-06 19:00:00
2021-11-26 08:30:00
2022-01-17 19:00:00
2022-02-21 19:00:00
2022-05-30 19:00:00
2022-06-20 19:00:00
2022-09-05 19:00:00
2023-01-16 19:00:00
2023-02-20 19:00:00
2023-05-29 19:00:00
2023-06-19 19:00:00
2023-09-04 19:00:00
2024-01-15 19:00:00
2024-02-19 19:00:00
2024-05-27 19:00:00
2024-06-19 19:00:00
2024-09-02 19:00:00

Time Zone

The Oats Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

ZS

Introduction

This page shows the trading hours, holidays, and time zone of the Soybean Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Soybean Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00
Tuesday 00:00:00 to 07:45:00
Wednesday 00:00:00 to 07:45:00
Thursday 00:00:00 to 07:45:00
Friday 00:00:00 to 07:45:00

Regular Trading Hours

The following table shows the regular trading hours for the Soybean Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:20:00
Tuesday 08:30:00 to 13:20:00
Wednesday 08:30:00 to 13:20:00
Thursday 08:30:00 to 13:20:00
Friday 08:30:00 to 13:20:00

Post-market Hours

The following table shows the post-market hours for the Soybean Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 19:00:00 to 24:00:00
Tuesday 19:00:00 to 24:00:00
Wednesday 19:00:00 to 24:00:00
Thursday 19:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Soybean Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2023-04-07

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Soybean Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

ZT

Introduction

This page shows the trading hours, holidays, and time zone of the 2-Year T-Note Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the 2-Year T-Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the 2-Year T-Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the 2-Year T-Note Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CBOT Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-05-29 2023-06-19 2023-07-04
2023-11-23 2023-12-25 2024-01-01 2024-01-15 2024-02-19
2024-03-29 2024-05-27 2024-06-19 2024-07-04 2024-09-02
2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the 2-Year T-Note Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 10:30:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 10:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-03-28 16:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the 2-Year T-Note Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The 2-Year T-Note Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

CBOT

ZW

Introduction

This page shows the trading hours, holidays, and time zone of the Chicago SRW Wheat Futures contract in the CBOT Future market.

Pre-market Hours

The following table shows the pre-market hours for the Chicago SRW Wheat Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00
Tuesday 00:00:00 to 07:45:00
Wednesday 00:00:00 to 07:45:00
Thursday 00:00:00 to 07:45:00
Friday 00:00:00 to 07:45:00

Regular Trading Hours

The following table shows the regular trading hours for the Chicago SRW Wheat Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:20:00
Tuesday 08:30:00 to 13:20:00
Wednesday 08:30:00 to 13:20:00
Thursday 08:30:00 to 13:20:00
Friday 08:30:00 to 13:20:00

Post-market Hours

The following table shows the post-market hours for the Chicago SRW Wheat Futures contract in the CBOT Future market:

Weekday Time (America/Chicago)
Monday 19:00:00 to 24:00:00
Tuesday 19:00:00 to 24:00:00
Wednesday 19:00:00 to 24:00:00
Thursday 19:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Chicago SRW Wheat Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2018-07-04
2019-07-04 2020-07-03 2021-04-02 2021-07-05 2022-07-04
2023-04-07 2023-07-04 2023-11-23 2023-12-25 2024-01-02
2024-07-04 2024-11-28 2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the Chicago SRW Wheat Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2011-11-25 12:00:00
2012-01-15 19:00:00
2012-02-19 19:00:00
2012-11-21 16:45:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-01-20 16:00:00
2013-02-17 16:00:00
2013-05-26 16:00:00
2013-07-03 12:00:00
2013-09-01 16:00:00
2013-11-27 16:45:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-08-31 16:00:00
2014-11-26 16:45:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-01-18 16:00:00
2015-02-15 16:00:00
2015-05-24 16:00:00
2015-07-02 12:00:00
2015-09-06 16:00:00
2015-11-25 16:45:00
2015-11-27 12:05:00
2015-12-24 12:05:00
2016-01-17 16:00:00
2016-02-14 16:00:00
2016-05-29 16:00:00
2016-09-04 16:00:00
2016-11-23 16:45:00
2016-11-25 12:05:00
2016-12-23 12:05:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-05-28 16:00:00
2017-07-03 12:05:00
2017-09-03 16:00:00
2017-11-22 16:45:00
2017-12-22 12:05:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-05-27 16:00:00
2018-07-03 12:05:00
2018-09-02 16:00:00
2018-11-21 16:45:00
2018-11-23 12:05:00
2018-12-24 12:05:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-05-26 16:00:00
2019-07-03 12:05:00
2019-09-01 16:00:00
2019-11-27 16:45:00
2019-11-29 12:05:00
2019-12-24 12:05:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-05-24 16:00:00
2020-07-02 12:05:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-05-30 16:00:00
2021-09-05 16:00:00
2021-11-24 16:45:00
2021-11-26 12:05:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-09-04 16:00:00
2022-11-23 16:45:00
2022-11-25 12:05:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2023-11-24 12:05:00
2024-03-28 16:00:00
2024-12-24 12:05:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Chicago SRW Wheat Futures contract in the CBOT Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:30:00
2012-01-03 09:30:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-11-23 09:30:00
2013-01-02 09:30:00
2013-01-21 19:00:00
2013-02-18 19:00:00
2013-05-27 19:00:00
2013-07-05 08:30:00
2013-09-02 19:00:00
2013-11-29 08:30:00
2013-12-26 08:30:00
2014-01-02 08:30:00
2014-01-20 19:00:00
2014-02-17 19:00:00
2014-05-26 19:00:00
2014-09-01 19:00:00
2015-01-19 19:00:00
2015-02-16 19:00:00
2015-05-25 19:00:00
2015-09-07 19:00:00
2016-01-18 19:00:00
2016-02-15 19:00:00
2016-05-30 19:00:00
2016-09-05 19:00:00
2016-11-25 08:30:00
2017-01-16 19:00:00
2017-02-20 19:00:00
2017-05-29 19:00:00
2017-07-05 08:30:00
2017-09-04 19:00:00
2017-11-24 08:30:00
2018-01-15 19:00:00
2018-02-19 19:00:00
2018-05-28 19:00:00
2018-07-05 08:30:00
2018-09-03 19:00:00
2018-11-23 08:30:00
2019-01-21 19:00:00
2019-02-18 19:00:00
2019-05-27 19:00:00
2019-07-05 08:30:00
2019-09-02 19:00:00
2019-11-29 08:30:00
2020-01-20 19:00:00
2020-02-17 19:00:00
2020-05-25 19:00:00
2020-09-07 19:00:00
2020-11-27 08:30:00
2021-01-18 19:00:00
2021-02-15 19:00:00
2021-05-31 19:00:00
2021-09-06 19:00:00
2021-11-26 08:30:00
2022-01-17 19:00:00
2022-02-21 19:00:00
2022-05-30 19:00:00
2022-06-20 19:00:00
2022-09-05 19:00:00
2023-01-16 19:00:00
2023-02-20 19:00:00
2023-05-29 19:00:00
2023-06-19 19:00:00
2023-09-04 19:00:00
2024-01-15 19:00:00
2024-02-19 19:00:00
2024-05-27 19:00:00
2024-06-19 19:00:00
2024-09-02 19:00:00

Time Zone

The Chicago SRW Wheat Futures contract in the CBOT Future market trades in the America/Chicago time zone.

 

Market Hours

CFE

Introduction

This page shows the trading hours, holidays, and time zone of the CFE Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CFE Future market:

Weekday Time (America/Chicago)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 24:00:00
Tuesday 00:00:00 to 24:00:00
Wednesday 00:00:00 to 24:00:00
Thursday 00:00:00 to 24:00:00
Friday 00:00:00 to 24:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CFE Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2023-11-23 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-03-29 2024-05-27 2024-06-19
2024-07-04 2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The CFE Future market trades in the America/Chicago time zone.

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall CFE Future market:

Symbol Name
VX VIX futures

 

CFE

VX

Introduction

This page shows the trading hours, holidays, and time zone of the VIX futures contract in the CFE Future market.

Pre-market Hours

The following table shows the pre-market hours for the VIX futures contract in the CFE Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the VIX futures contract in the CFE Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 15:00:00
Tuesday 08:30:00 to 15:00:00
Wednesday 08:30:00 to 15:00:00
Thursday 08:30:00 to 15:00:00
Friday 08:30:00 to 15:00:00

Post-market Hours

The following table shows the post-market hours for the VIX futures contract in the CFE Future market:

Weekday Time (America/Chicago)
Monday 15:00:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 15:00:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 15:00:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 15:00:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 15:00:00 to 16:00:00

Holidays

The following table shows the dates of holidays for the CFE Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2023-11-23 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-03-29 2024-05-27 2024-06-19
2024-07-04 2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The VIX futures contract in the CFE Future market trades in the America/Chicago time zone.

 

Market Hours

CME

Introduction

This page shows the trading hours, holidays, and time zone of the CME Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CME Future market:

Weekday Time (America/Chicago)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 24:00:00
Tuesday 00:00:00 to 24:00:00
Wednesday 00:00:00 to 24:00:00
Thursday 00:00:00 to 24:00:00
Friday 00:00:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The CME Future market trades in the following time zones:

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall CME Future market:

Symbol Name
6A Australian Dollar Futures
6B British Pound Futures
6C Canadian Dollar Futures
6E Euro FX Futures
6J Japanese Yen Futures
6L Brazilian Real Futures
6M Mexican Peso Futures
6N New Zealand Dollar Futures
6R Russian Ruble Futures
6S Swiss Franc Futures
6Z South African Rand Futures
ACD Australian Dollar/Canadian Dollar Futures
AJY Australian Dollar/Japanese Yen Futures
ANE Australian Dollar/New Zealand Dollar Futures
BIO E-mini Nasdaq-100 Biotechnology Index Futures
BTC Bitcoin Futures
CB Cash-settled Butter Futures
CJY Canadian Dollar/Japanese Yen Futures
CNH Standard-Size USD/Offshore RMB (CNH) Futures
CSC Cash-Settled Cheese Futures
DC Class III Milk Futures
DY Dry Whey Futures
E3G E-mini FTSE 100 GBP Futures
E7 E-mini Euro FX Futures
EAD Euro/Australian Dollar Futures
ECD Euro/Canadian Dollar Futures
EI E-mini FTSE Emerging Index Futures
EMD E-mini S&P MidCap 400 Futures
ENY E-mini Nikkei YEN Futures
ES E-mini S&P 500 Futures
ESG E-mini S&P500 ESG Futures
ESK Euro/Swedish Krona Futures
ETH Ether Futures
FT1 E-mini FTSE 100 GBP Futures
FT5 E-mini FTSE China Futures
FTU E-mini FTSE 100 USD Futures
GD S&P-GSCI Commodity Index Futures
GDK Class IV Milk Futures
GE Eurodollar Futures
GF Feeder Cattle Futures
GNF Nonfat Dry Milk Futures
HE Lean Hog Futures
IBV USD-Denominated Ibovespa Index Futures
J7 E-mini Japanese Yen Futures
LBR Lumber Futures
LBS Random Length Lumber Futures
LE Live Cattle Futures
M2K Micro E-mini Russell 2000 Index Futures
M6A Micro Australian Dollar/U.S. Dollar (AUD/USD) Futures
M6B Micro British Pound Sterling/U.S. Dollar (GBP/USD) Futures
M6C Micro USD/CAD Futures
M6E Micro Euro/U.S. Dollar (EUR/USD) Futures
M6J Micro USD/JPY Futures
M6S Micro USD/CHF Futures
MBT Micro Bitcoin Futures
MCD Micro Canadian Dollar/U.S.Dollar(CAD/USD) Futures
MES Micro E-mini Standard and Poor's 500 Stock Price Index Futures
MET Micro Ether Futures
MIR Micro INR/USD Futures
MJY Micro Japanese Yen/U.S. Dollar (JPY/USD) Futures
MNH Micro USD/CNH Futures
MNQ Micro E-mini Nasdaq-100 Index Futures
MSF Micro Swiss Franc/U.S. Dollar (CHF/USD) Futures
NIY Nikkei/YEN Futures
NKD Nikkei/USD Futures
NQ E-mini Nasdaq-100 Futures
RS1 E-mini Russell 1000 future
RTY E-mini Russell 2000 Index Futures
RX DJRE Futures
SDA SP500 S&P 500 Annual Dividend Index future
TPD TOPIX USD Futures
TPY TOPIX JPY Futures

 

CME

6A

Introduction

This page shows the trading hours, holidays, and time zone of the Australian Dollar Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Australian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Australian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Australian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Australian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Australian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Australian Dollar Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6B

Introduction

This page shows the trading hours, holidays, and time zone of the British Pound Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the British Pound Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the British Pound Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the British Pound Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the British Pound Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the British Pound Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The British Pound Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6C

Introduction

This page shows the trading hours, holidays, and time zone of the Canadian Dollar Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Canadian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Canadian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Canadian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Canadian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Canadian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Canadian Dollar Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6E

Introduction

This page shows the trading hours, holidays, and time zone of the Euro FX Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Euro FX Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Euro FX Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Euro FX Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Euro FX Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Euro FX Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Euro FX Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6J

Introduction

This page shows the trading hours, holidays, and time zone of the Japanese Yen Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Japanese Yen Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Japanese Yen Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Japanese Yen Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6L

Introduction

This page shows the trading hours, holidays, and time zone of the Brazilian Real Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Brazilian Real Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Brazilian Real Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Brazilian Real Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Brazilian Real Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Brazilian Real Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Brazilian Real Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6M

Introduction

This page shows the trading hours, holidays, and time zone of the Mexican Peso Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mexican Peso Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mexican Peso Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Mexican Peso Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Mexican Peso Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Mexican Peso Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Mexican Peso Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6N

Introduction

This page shows the trading hours, holidays, and time zone of the New Zealand Dollar Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the New Zealand Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the New Zealand Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the New Zealand Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the New Zealand Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the New Zealand Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The New Zealand Dollar Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6R

Introduction

This page shows the trading hours, holidays, and time zone of the Russian Ruble Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Russian Ruble Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Russian Ruble Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Russian Ruble Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Russian Ruble Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Russian Ruble Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Russian Ruble Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6S

Introduction

This page shows the trading hours, holidays, and time zone of the Swiss Franc Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Swiss Franc Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Swiss Franc Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Swiss Franc Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Swiss Franc Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Swiss Franc Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Swiss Franc Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

6Z

Introduction

This page shows the trading hours, holidays, and time zone of the South African Rand Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the South African Rand Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the South African Rand Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the South African Rand Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the South African Rand Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the South African Rand Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The South African Rand Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

ACD

Introduction

This page shows the trading hours, holidays, and time zone of the Australian Dollar/Canadian Dollar Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Australian Dollar/Canadian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Australian Dollar/Canadian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Australian Dollar/Canadian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Australian Dollar/Canadian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Australian Dollar/Canadian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Australian Dollar/Canadian Dollar Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

AJY

Introduction

This page shows the trading hours, holidays, and time zone of the Australian Dollar/Japanese Yen Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Australian Dollar/Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Australian Dollar/Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Australian Dollar/Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Australian Dollar/Japanese Yen Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Australian Dollar/Japanese Yen Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Australian Dollar/Japanese Yen Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

ANE

Introduction

This page shows the trading hours, holidays, and time zone of the Australian Dollar/New Zealand Dollar Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Australian Dollar/New Zealand Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Australian Dollar/New Zealand Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Australian Dollar/New Zealand Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Australian Dollar/New Zealand Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Australian Dollar/New Zealand Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Australian Dollar/New Zealand Dollar Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

BIO

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini Nasdaq-100 Biotechnology Index Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini Nasdaq-100 Biotechnology Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini Nasdaq-100 Biotechnology Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini Nasdaq-100 Biotechnology Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini Nasdaq-100 Biotechnology Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-19 10:30:00
2009-02-16 10:30:00
2009-05-25 10:30:00
2009-07-03 10:30:00
2009-09-07 10:30:00
2009-11-26 10:30:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-18 10:30:00
2010-02-15 10:30:00
2010-04-02 08:15:00
2010-05-31 10:30:00
2010-07-05 10:30:00
2010-09-06 10:30:00
2010-11-25 10:30:00
2010-11-26 12:15:00
2011-01-17 10:30:00
2011-02-21 10:30:00
2011-05-30 10:30:00
2011-07-04 10:30:00
2011-09-05 10:30:00
2011-11-24 10:30:00
2011-11-25 12:15:00
2012-01-16 10:30:00
2012-02-20 10:30:00
2012-04-06 08:15:00
2012-05-28 10:30:00
2012-07-03 12:15:00
2012-07-04 10:30:00
2012-09-03 10:30:00
2012-11-22 10:30:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-21 10:30:00
2013-02-18 10:30:00
2013-05-27 10:30:00
2013-07-03 12:15:00
2013-07-04 10:30:00
2013-09-02 10:30:00
2013-11-28 10:30:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-20 10:30:00
2014-02-17 10:30:00
2014-05-26 12:00:00
2014-07-03 12:15:00
2014-07-04 12:00:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-19 12:00:00
2015-02-16 12:00:00
2015-04-03 08:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-03 12:15:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-03 12:15:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-03 12:15:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 08:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the E-mini Nasdaq-100 Biotechnology Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The E-mini Nasdaq-100 Biotechnology Index Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

BTC

Introduction

This page shows the trading hours, holidays, and time zone of the Bitcoin Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Bitcoin Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Bitcoin Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Bitcoin Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Bitcoin Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2018-01-15 12:00:00
2018-05-28 12:00:00
2018-07-03 12:15:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-03 12:15:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:45:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:45:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:45:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:45:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Bitcoin Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2018-01-15 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Bitcoin Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

CB

Introduction

This page shows the trading hours, holidays, and time zone of the Cash-settled Butter Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Cash-settled Butter Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Cash-settled Butter Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Cash-settled Butter Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Cash-settled Butter Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2017-11-23
2018-07-04 2018-11-22 2019-07-04 2019-11-28 2020-07-03
2020-11-26 2021-04-02 2021-11-25 2022-11-24 2023-01-16
2023-02-20 2023-04-07 2023-11-23 2024-11-28

Early Closes

The following table shows the early closes for the Cash-settled Butter Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-11-25 16:00:00
2010-12-31 12:15:00
2011-04-21 13:55:00
2011-11-23 16:00:00
2012-01-15 17:00:00
2012-02-19 17:00:00
2012-05-27 17:00:00
2012-07-03 16:00:00
2012-09-02 17:00:00
2012-11-21 16:00:00
2012-12-24 12:00:00
2013-01-20 17:00:00
2013-02-17 17:00:00
2013-03-28 13:55:00
2013-05-26 17:00:00
2013-07-03 12:00:00
2013-09-01 17:00:00
2013-11-27 17:00:00
2013-12-24 12:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-12-24 12:00:00
2015-04-02 13:55:00
2015-07-02 12:00:00
2015-12-24 12:00:00
2015-12-31 13:55:00
2016-03-24 13:55:00
2016-12-23 12:00:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-04-13 13:55:00
2017-05-28 16:00:00
2017-07-03 12:00:00
2017-09-03 16:00:00
2017-12-22 12:00:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-03-29 13:55:00
2018-05-27 16:00:00
2018-07-03 12:00:00
2018-09-02 16:00:00
2018-12-24 12:00:00
2018-12-31 13:55:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-04-18 13:55:00
2019-05-26 16:00:00
2019-07-03 12:00:00
2019-09-01 16:00:00
2019-11-27 16:00:00
2019-12-24 12:00:00
2019-12-31 13:55:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-04-09 13:55:00
2020-05-24 16:00:00
2020-07-02 12:00:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-12-24 12:00:00
2020-12-31 13:55:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-04-01 13:55:00
2021-05-30 16:00:00
2021-07-04 16:00:00
2021-09-05 16:00:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-04-14 13:55:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-07-03 16:00:00
2022-09-04 16:00:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-04-06 13:55:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2024-01-01 17:00:00
2024-03-28 13:55:00
2024-11-27 16:00:00
2024-12-24 12:00:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Cash-settled Butter Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:05:00
2012-01-03 09:05:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-12-26 09:05:00
2013-01-02 09:05:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-12-26 09:05:00
2014-01-02 09:05:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-12-26 09:05:00
2015-01-02 09:05:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-03-27 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-29 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-05 08:30:00
2017-09-04 17:00:00
2017-11-26 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-09-03 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-04-18 13:55:00
2019-05-27 17:00:00
2019-09-02 17:00:00
2019-12-01 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-09-07 17:00:00
2020-11-29 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-09-04 17:00:00
2023-12-25 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Cash-settled Butter Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

CJY

Introduction

This page shows the trading hours, holidays, and time zone of the Canadian Dollar/Japanese Yen Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Canadian Dollar/Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Canadian Dollar/Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Canadian Dollar/Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Canadian Dollar/Japanese Yen Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Canadian Dollar/Japanese Yen Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Canadian Dollar/Japanese Yen Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

CNH

Introduction

This page shows the trading hours, holidays, and time zone of the Standard-Size USD/Offshore RMB (CNH) Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Standard-Size USD/Offshore RMB (CNH) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Standard-Size USD/Offshore RMB (CNH) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Standard-Size USD/Offshore RMB (CNH) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Standard-Size USD/Offshore RMB (CNH) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Standard-Size USD/Offshore RMB (CNH) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Standard-Size USD/Offshore RMB (CNH) Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

CSC

Introduction

This page shows the trading hours, holidays, and time zone of the Cash-Settled Cheese Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Cash-Settled Cheese Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Cash-Settled Cheese Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Cash-Settled Cheese Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Cash-Settled Cheese Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2017-11-23
2018-07-04 2018-11-22 2019-07-04 2019-11-28 2020-07-03
2020-11-26 2021-04-02 2021-11-25 2022-11-24 2023-01-16
2023-02-20 2023-04-07 2023-11-23 2024-11-28

Early Closes

The following table shows the early closes for the Cash-Settled Cheese Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-11-25 16:00:00
2010-12-31 12:15:00
2011-04-21 13:55:00
2011-11-23 16:00:00
2012-01-15 17:00:00
2012-02-19 17:00:00
2012-05-27 17:00:00
2012-07-03 16:00:00
2012-09-02 17:00:00
2012-11-21 16:00:00
2012-12-24 12:00:00
2013-01-20 17:00:00
2013-02-17 17:00:00
2013-03-28 13:55:00
2013-05-26 17:00:00
2013-07-03 12:00:00
2013-09-01 17:00:00
2013-11-27 17:00:00
2013-12-24 12:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-12-24 12:00:00
2015-04-02 13:55:00
2015-07-02 12:00:00
2015-12-24 12:00:00
2015-12-31 13:55:00
2016-03-24 13:55:00
2016-12-23 12:00:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-04-13 13:55:00
2017-05-28 16:00:00
2017-07-03 12:00:00
2017-09-03 16:00:00
2017-12-22 12:00:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-03-29 13:55:00
2018-05-27 16:00:00
2018-07-03 12:00:00
2018-09-02 16:00:00
2018-12-24 12:00:00
2018-12-31 13:55:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-04-18 13:55:00
2019-05-26 16:00:00
2019-07-03 12:00:00
2019-09-01 16:00:00
2019-11-27 16:00:00
2019-12-24 12:00:00
2019-12-31 13:55:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-04-09 13:55:00
2020-05-24 16:00:00
2020-07-02 12:00:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-12-24 12:00:00
2020-12-31 13:55:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-04-01 13:55:00
2021-05-30 16:00:00
2021-07-04 16:00:00
2021-09-05 16:00:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-04-14 13:55:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-07-03 16:00:00
2022-09-04 16:00:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-04-06 13:55:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2024-01-01 17:00:00
2024-03-28 13:55:00
2024-11-27 16:00:00
2024-12-24 12:00:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Cash-Settled Cheese Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:05:00
2012-01-03 09:05:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-12-26 09:05:00
2013-01-02 09:05:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-12-26 09:05:00
2014-01-02 09:05:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-12-26 09:05:00
2015-01-02 09:05:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-03-27 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-29 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-05 08:30:00
2017-09-04 17:00:00
2017-11-26 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-09-03 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-04-18 13:55:00
2019-05-27 17:00:00
2019-09-02 17:00:00
2019-12-01 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-09-07 17:00:00
2020-11-29 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-09-04 17:00:00
2023-12-25 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Cash-Settled Cheese Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

DC

Introduction

This page shows the trading hours, holidays, and time zone of the Class III Milk Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Class III Milk Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Class III Milk Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Class III Milk Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Class III Milk Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2017-11-23
2018-07-04 2018-11-22 2019-07-04 2019-11-28 2020-07-03
2020-11-26 2021-04-02 2021-11-25 2022-11-24 2023-01-16
2023-02-20 2023-04-07 2023-11-23 2024-11-28

Early Closes

The following table shows the early closes for the Class III Milk Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-11-25 16:00:00
2010-12-31 12:15:00
2011-04-21 13:55:00
2011-11-23 16:00:00
2012-01-15 17:00:00
2012-02-19 17:00:00
2012-05-27 17:00:00
2012-07-03 16:00:00
2012-09-02 17:00:00
2012-11-21 16:00:00
2012-12-24 12:00:00
2013-01-20 17:00:00
2013-02-17 17:00:00
2013-03-28 13:55:00
2013-05-26 17:00:00
2013-07-03 12:00:00
2013-09-01 17:00:00
2013-11-27 17:00:00
2013-12-24 12:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-12-24 12:00:00
2015-04-02 13:55:00
2015-07-02 12:00:00
2015-12-24 12:00:00
2015-12-31 13:55:00
2016-03-24 13:55:00
2016-12-23 12:00:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-04-13 13:55:00
2017-05-28 16:00:00
2017-07-03 12:00:00
2017-09-03 16:00:00
2017-12-22 12:00:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-03-29 13:55:00
2018-05-27 16:00:00
2018-07-03 12:00:00
2018-09-02 16:00:00
2018-12-24 12:00:00
2018-12-31 13:55:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-04-18 13:55:00
2019-05-26 16:00:00
2019-07-03 12:00:00
2019-09-01 16:00:00
2019-11-27 16:00:00
2019-12-24 12:00:00
2019-12-31 13:55:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-04-09 13:55:00
2020-05-24 16:00:00
2020-07-02 12:00:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-12-24 12:00:00
2020-12-31 13:55:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-04-01 13:55:00
2021-05-30 16:00:00
2021-07-04 16:00:00
2021-09-05 16:00:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-04-14 13:55:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-07-03 16:00:00
2022-09-04 16:00:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-04-06 13:55:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2024-01-01 17:00:00
2024-03-28 13:55:00
2024-11-27 16:00:00
2024-12-24 12:00:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Class III Milk Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:05:00
2012-01-03 09:05:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-12-26 09:05:00
2013-01-02 09:05:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-12-26 09:05:00
2014-01-02 09:05:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-12-26 09:05:00
2015-01-02 09:05:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-03-27 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-29 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-05 08:30:00
2017-09-04 17:00:00
2017-11-26 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-09-03 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-04-18 13:55:00
2019-05-27 17:00:00
2019-09-02 17:00:00
2019-12-01 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-09-07 17:00:00
2020-11-29 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-09-04 17:00:00
2023-12-25 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Class III Milk Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

DY

Introduction

This page shows the trading hours, holidays, and time zone of the Dry Whey Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Dry Whey Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Dry Whey Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 13:55:00

Post-market Hours

The following table shows the post-market hours for the Dry Whey Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Dry Whey Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2017-11-23
2018-07-04 2018-11-22 2019-07-04 2019-11-28 2020-07-03
2020-11-26 2021-04-02 2021-11-25 2022-11-24 2023-01-16
2023-02-20 2023-04-07 2023-11-23 2024-11-28

Early Closes

The following table shows the early closes for the Dry Whey Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-11-25 16:00:00
2010-12-31 12:15:00
2011-04-21 13:55:00
2011-11-23 16:00:00
2012-01-15 17:00:00
2012-02-19 17:00:00
2012-05-27 17:00:00
2012-07-03 16:00:00
2012-09-02 17:00:00
2012-11-21 16:00:00
2012-12-24 12:00:00
2013-01-20 17:00:00
2013-02-17 17:00:00
2013-03-28 13:55:00
2013-05-26 17:00:00
2013-07-03 12:00:00
2013-09-01 17:00:00
2013-11-27 17:00:00
2013-12-24 12:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-12-24 12:00:00
2015-04-02 13:55:00
2015-07-02 12:00:00
2015-12-24 12:00:00
2015-12-31 13:55:00
2016-03-24 13:55:00
2016-12-23 12:00:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-04-13 13:55:00
2017-05-28 16:00:00
2017-07-03 12:00:00
2017-09-03 16:00:00
2017-12-22 12:00:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-03-29 13:55:00
2018-05-27 16:00:00
2018-07-03 12:00:00
2018-09-02 16:00:00
2018-12-24 12:00:00
2018-12-31 13:55:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-04-18 13:55:00
2019-05-26 16:00:00
2019-07-03 12:00:00
2019-09-01 16:00:00
2019-11-27 16:00:00
2019-12-24 12:00:00
2019-12-31 13:55:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-04-09 13:55:00
2020-05-24 16:00:00
2020-07-02 12:00:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-12-24 12:00:00
2020-12-31 13:55:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-04-01 13:55:00
2021-05-30 16:00:00
2021-07-04 16:00:00
2021-09-05 16:00:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-04-14 13:55:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-07-03 16:00:00
2022-09-04 16:00:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-04-06 13:55:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2024-01-01 17:00:00
2024-03-28 13:55:00
2024-11-27 16:00:00
2024-12-24 12:00:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Dry Whey Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:05:00
2012-01-03 09:05:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-12-26 09:05:00
2013-01-02 09:05:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-12-26 09:05:00
2014-01-02 09:05:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-12-26 09:05:00
2015-01-02 09:05:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-03-27 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-29 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-05 08:30:00
2017-09-04 17:00:00
2017-11-26 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-09-03 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-04-18 13:55:00
2019-05-27 17:00:00
2019-09-02 17:00:00
2019-12-01 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-09-07 17:00:00
2020-11-29 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-09-04 17:00:00
2023-12-25 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Dry Whey Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

E3G

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini FTSE 100 GBP Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00

Late Opens

The following table shows the late opens for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00

Time Zone

The E-mini FTSE 100 GBP Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

E7

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini Euro FX Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini Euro FX Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini Euro FX Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini Euro FX Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini Euro FX Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the E-mini Euro FX Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The E-mini Euro FX Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

EAD

Introduction

This page shows the trading hours, holidays, and time zone of the Euro/Australian Dollar Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Euro/Australian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Euro/Australian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Euro/Australian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Euro/Australian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Euro/Australian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Euro/Australian Dollar Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

ECD

Introduction

This page shows the trading hours, holidays, and time zone of the Euro/Canadian Dollar Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Euro/Canadian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Euro/Canadian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Euro/Canadian Dollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Euro/Canadian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Euro/Canadian Dollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Euro/Canadian Dollar Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

EI

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini FTSE Emerging Index Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini FTSE Emerging Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini FTSE Emerging Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini FTSE Emerging Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini FTSE Emerging Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-19 10:30:00
2009-02-16 10:30:00
2009-05-25 10:30:00
2009-07-03 10:30:00
2009-09-07 10:30:00
2009-11-26 10:30:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-18 10:30:00
2010-02-15 10:30:00
2010-04-02 08:15:00
2010-05-31 10:30:00
2010-07-05 10:30:00
2010-09-06 10:30:00
2010-11-25 10:30:00
2010-11-26 12:15:00
2011-01-17 10:30:00
2011-02-21 10:30:00
2011-05-30 10:30:00
2011-07-04 10:30:00
2011-09-05 10:30:00
2011-11-24 10:30:00
2011-11-25 12:15:00
2012-01-16 10:30:00
2012-02-20 10:30:00
2012-04-06 08:15:00
2012-05-28 10:30:00
2012-07-03 12:15:00
2012-07-04 10:30:00
2012-09-03 10:30:00
2012-11-22 10:30:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-21 10:30:00
2013-02-18 10:30:00
2013-05-27 10:30:00
2013-07-03 12:15:00
2013-07-04 10:30:00
2013-09-02 10:30:00
2013-11-28 10:30:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-20 10:30:00
2014-02-17 10:30:00
2014-05-26 12:00:00
2014-07-03 12:15:00
2014-07-04 12:00:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-19 12:00:00
2015-02-16 12:00:00
2015-04-03 08:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-03 12:15:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-03 12:15:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-03 12:15:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 08:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the E-mini FTSE Emerging Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The E-mini FTSE Emerging Index Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

EMD

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini S&P MidCap 400 Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini S&P MidCap 400 Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini S&P MidCap 400 Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini S&P MidCap 400 Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini S&P MidCap 400 Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-19 10:30:00
2009-02-16 10:30:00
2009-05-25 10:30:00
2009-07-03 10:30:00
2009-09-07 10:30:00
2009-11-26 10:30:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-18 10:30:00
2010-02-15 10:30:00
2010-04-02 08:15:00
2010-05-31 10:30:00
2010-07-05 10:30:00
2010-09-06 10:30:00
2010-11-25 10:30:00
2010-11-26 12:15:00
2011-01-17 10:30:00
2011-02-21 10:30:00
2011-05-30 10:30:00
2011-07-04 10:30:00
2011-09-05 10:30:00
2011-11-24 10:30:00
2011-11-25 12:15:00
2012-01-16 10:30:00
2012-02-20 10:30:00
2012-04-06 08:15:00
2012-05-28 10:30:00
2012-07-03 12:15:00
2012-07-04 10:30:00
2012-09-03 10:30:00
2012-11-22 10:30:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-21 10:30:00
2013-02-18 10:30:00
2013-05-27 10:30:00
2013-07-03 12:15:00
2013-07-04 10:30:00
2013-09-02 10:30:00
2013-11-28 10:30:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-20 10:30:00
2014-02-17 10:30:00
2014-05-26 12:00:00
2014-07-03 12:15:00
2014-07-04 12:00:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-19 12:00:00
2015-02-16 12:00:00
2015-04-03 08:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-03 12:15:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-03 12:15:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-03 12:15:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 08:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the E-mini S&P MidCap 400 Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The E-mini S&P MidCap 400 Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

ENY

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini Nikkei YEN Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini Nikkei YEN Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini Nikkei YEN Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini Nikkei YEN Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini Nikkei YEN Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00

Late Opens

The following table shows the late opens for the E-mini Nikkei YEN Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00

Time Zone

The E-mini Nikkei YEN Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

ES

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini S&P 500 Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini S&P 500 Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini S&P 500 Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini S&P 500 Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini S&P 500 Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00
2024-01-15 13:00:00
2024-02-19 13:00:00
2024-05-27 13:00:00
2024-06-19 13:00:00
2024-07-04 13:00:00
2024-09-02 13:00:00
2024-11-28 13:00:00
2024-12-24 13:15:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the E-mini S&P 500 Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The E-mini S&P 500 Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

ESG

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini S&P500 ESG Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini S&P500 ESG Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini S&P500 ESG Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini S&P500 ESG Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini S&P500 ESG Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00

Late Opens

The following table shows the late opens for the E-mini S&P500 ESG Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00

Time Zone

The E-mini S&P500 ESG Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

ESK

Introduction

This page shows the trading hours, holidays, and time zone of the Euro/Swedish Krona Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Euro/Swedish Krona Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Euro/Swedish Krona Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Euro/Swedish Krona Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Euro/Swedish Krona Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Euro/Swedish Krona Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Euro/Swedish Krona Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

ETH

Introduction

This page shows the trading hours, holidays, and time zone of the Ether Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Ether Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Ether Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Ether Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Ether Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:45:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:45:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:45:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:45:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Ether Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2018-01-15 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Ether Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

FT1

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini FTSE 100 GBP Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-19 10:30:00
2009-02-16 10:30:00
2009-05-25 10:30:00
2009-07-03 10:30:00
2009-09-07 10:30:00
2009-11-26 10:30:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-18 10:30:00
2010-02-15 10:30:00
2010-04-02 08:15:00
2010-05-31 10:30:00
2010-07-05 10:30:00
2010-09-06 10:30:00
2010-11-25 10:30:00
2010-11-26 12:15:00
2011-01-17 10:30:00
2011-02-21 10:30:00
2011-05-30 10:30:00
2011-07-04 10:30:00
2011-09-05 10:30:00
2011-11-24 10:30:00
2011-11-25 12:15:00
2012-01-16 10:30:00
2012-02-20 10:30:00
2012-04-06 08:15:00
2012-05-28 10:30:00
2012-07-03 12:15:00
2012-07-04 10:30:00
2012-09-03 10:30:00
2012-11-22 10:30:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-21 10:30:00
2013-02-18 10:30:00
2013-05-27 10:30:00
2013-07-03 12:15:00
2013-07-04 10:30:00
2013-09-02 10:30:00
2013-11-28 10:30:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-20 10:30:00
2014-02-17 10:30:00
2014-05-26 12:00:00
2014-07-03 12:15:00
2014-07-04 12:00:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-19 12:00:00
2015-02-16 12:00:00
2015-04-03 08:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-03 12:15:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-03 12:15:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-03 12:15:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 08:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00

Late Opens

The following table shows the late opens for the E-mini FTSE 100 GBP Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00

Time Zone

The E-mini FTSE 100 GBP Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

FT5

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini FTSE China Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini FTSE China Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini FTSE China Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini FTSE China Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini FTSE China Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-19 10:30:00
2009-02-16 10:30:00
2009-05-25 10:30:00
2009-07-03 10:30:00
2009-09-07 10:30:00
2009-11-26 10:30:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-18 10:30:00
2010-02-15 10:30:00
2010-04-02 08:15:00
2010-05-31 10:30:00
2010-07-05 10:30:00
2010-09-06 10:30:00
2010-11-25 10:30:00
2010-11-26 12:15:00
2011-01-17 10:30:00
2011-02-21 10:30:00
2011-05-30 10:30:00
2011-07-04 10:30:00
2011-09-05 10:30:00
2011-11-24 10:30:00
2011-11-25 12:15:00
2012-01-16 10:30:00
2012-02-20 10:30:00
2012-04-06 08:15:00
2012-05-28 10:30:00
2012-07-03 12:15:00
2012-07-04 10:30:00
2012-09-03 10:30:00
2012-11-22 10:30:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-21 10:30:00
2013-02-18 10:30:00
2013-05-27 10:30:00
2013-07-03 12:15:00
2013-07-04 10:30:00
2013-09-02 10:30:00
2013-11-28 10:30:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-20 10:30:00
2014-02-17 10:30:00
2014-05-26 12:00:00
2014-07-03 12:15:00
2014-07-04 12:00:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-19 12:00:00
2015-02-16 12:00:00
2015-04-03 08:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-03 12:15:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-03 12:15:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-03 12:15:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 08:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00

Late Opens

The following table shows the late opens for the E-mini FTSE China Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00

Time Zone

The E-mini FTSE China Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

FTU

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini FTSE 100 USD Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini FTSE 100 USD Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini FTSE 100 USD Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini FTSE 100 USD Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini FTSE 100 USD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-19 10:30:00
2009-02-16 10:30:00
2009-05-25 10:30:00
2009-07-03 10:30:00
2009-09-07 10:30:00
2009-11-26 10:30:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-18 10:30:00
2010-02-15 10:30:00
2010-04-02 08:15:00
2010-05-31 10:30:00
2010-07-05 10:30:00
2010-09-06 10:30:00
2010-11-25 10:30:00
2010-11-26 12:15:00
2011-01-17 10:30:00
2011-02-21 10:30:00
2011-05-30 10:30:00
2011-07-04 10:30:00
2011-09-05 10:30:00
2011-11-24 10:30:00
2011-11-25 12:15:00
2012-01-16 10:30:00
2012-02-20 10:30:00
2012-04-06 08:15:00
2012-05-28 10:30:00
2012-07-03 12:15:00
2012-07-04 10:30:00
2012-09-03 10:30:00
2012-11-22 10:30:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-21 10:30:00
2013-02-18 10:30:00
2013-05-27 10:30:00
2013-07-03 12:15:00
2013-07-04 10:30:00
2013-09-02 10:30:00
2013-11-28 10:30:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-20 10:30:00
2014-02-17 10:30:00
2014-05-26 12:00:00
2014-07-03 12:15:00
2014-07-04 12:00:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-19 12:00:00
2015-02-16 12:00:00
2015-04-03 08:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-03 12:15:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-03 12:15:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-03 12:15:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 08:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00

Late Opens

The following table shows the late opens for the E-mini FTSE 100 USD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00

Time Zone

The E-mini FTSE 100 USD Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

GD

Introduction

This page shows the trading hours, holidays, and time zone of the S&P-GSCI Commodity Index Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the S&P-GSCI Commodity Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the S&P-GSCI Commodity Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the S&P-GSCI Commodity Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the S&P-GSCI Commodity Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2023-04-07

Early Closes

The following table shows the early closes for the S&P-GSCI Commodity Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-19 10:30:00
2009-02-16 10:30:00
2009-05-25 10:30:00
2009-07-03 10:30:00
2009-09-07 10:30:00
2009-11-26 10:30:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-18 10:30:00
2010-02-15 10:30:00
2010-05-31 10:30:00
2010-07-05 10:30:00
2010-09-06 10:30:00
2010-11-25 10:30:00
2010-11-26 12:15:00
2011-01-17 10:30:00
2011-02-21 10:30:00
2011-05-30 10:30:00
2011-07-04 10:30:00
2011-09-05 10:30:00
2011-11-24 10:30:00
2011-11-25 12:15:00
2012-01-16 10:30:00
2012-02-20 10:30:00
2012-05-28 10:30:00
2012-07-03 12:15:00
2012-07-04 10:30:00
2012-09-03 10:30:00
2012-11-22 10:30:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-21 10:30:00
2013-02-18 10:30:00
2013-05-27 10:30:00
2013-07-03 12:15:00
2013-07-04 10:30:00
2013-07-05 15:15:00
2013-09-02 10:30:00
2013-11-28 10:30:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2013-12-26 15:15:00
2014-01-02 15:15:00
2014-01-20 10:30:00
2014-02-17 10:30:00
2014-05-26 12:00:00
2014-07-03 12:00:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-19 12:00:00
2015-02-16 12:00:00
2015-04-03 08:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-03 12:15:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-03 12:15:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-03 12:15:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 8:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00

Late Opens

There are no days with late opens.

Time Zone

The S&P-GSCI Commodity Index Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

GDK

Introduction

This page shows the trading hours, holidays, and time zone of the Class IV Milk Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Class IV Milk Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Class IV Milk Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Class IV Milk Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Class IV Milk Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2017-11-23
2018-07-04 2018-11-22 2019-07-04 2019-11-28 2020-07-03
2020-11-26 2021-04-02 2021-11-25 2022-11-24 2023-01-16
2023-02-20 2023-04-07 2023-11-23 2024-11-28

Early Closes

The following table shows the early closes for the Class IV Milk Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-11-25 16:00:00
2010-12-31 12:15:00
2011-04-21 13:55:00
2011-11-23 16:00:00
2012-01-15 17:00:00
2012-02-19 17:00:00
2012-05-27 17:00:00
2012-07-03 16:00:00
2012-09-02 17:00:00
2012-11-21 16:00:00
2012-12-24 12:00:00
2013-01-20 17:00:00
2013-02-17 17:00:00
2013-03-28 13:55:00
2013-05-26 17:00:00
2013-07-03 12:00:00
2013-09-01 17:00:00
2013-11-27 17:00:00
2013-12-24 12:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-12-24 12:00:00
2015-04-02 13:55:00
2015-07-02 12:00:00
2015-12-24 12:00:00
2015-12-31 13:55:00
2016-03-24 13:55:00
2016-12-23 12:00:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-04-13 13:55:00
2017-05-28 16:00:00
2017-07-03 12:00:00
2017-09-03 16:00:00
2017-12-22 12:00:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-03-29 13:55:00
2018-05-27 16:00:00
2018-07-03 12:00:00
2018-09-02 16:00:00
2018-12-24 12:00:00
2018-12-31 13:55:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-04-18 13:55:00
2019-05-26 16:00:00
2019-07-03 12:00:00
2019-09-01 16:00:00
2019-11-27 16:00:00
2019-12-24 12:00:00
2019-12-31 13:55:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-04-09 13:55:00
2020-05-24 16:00:00
2020-07-02 12:00:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-12-24 12:00:00
2020-12-31 13:55:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-04-01 13:55:00
2021-05-30 16:00:00
2021-07-04 16:00:00
2021-09-05 16:00:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-04-14 13:55:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-07-03 16:00:00
2022-09-04 16:00:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-04-06 13:55:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2024-01-01 17:00:00
2024-03-28 13:55:00
2024-11-27 16:00:00
2024-12-24 12:00:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Class IV Milk Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:05:00
2012-01-03 09:05:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-12-26 09:05:00
2013-01-02 09:05:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-12-26 09:05:00
2014-01-02 09:05:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-12-26 09:05:00
2015-01-02 09:05:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-03-27 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-29 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-05 08:30:00
2017-09-04 17:00:00
2017-11-26 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-09-03 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-04-18 13:55:00
2019-05-27 17:00:00
2019-09-02 17:00:00
2019-12-01 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-09-07 17:00:00
2020-11-29 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-09-04 17:00:00
2023-12-25 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Class IV Milk Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

GE

Introduction

This page shows the trading hours, holidays, and time zone of the Eurodollar Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Eurodollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Eurodollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Eurodollar Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Eurodollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2008-12-31 15:15:00
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00

Late Opens

The following table shows the late opens for the Eurodollar Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-02 05:00:00
2011-12-27 05:00:00
2012-01-03 05:00:00
2012-12-26 05:00:00
2013-01-02 05:00:00
2013-12-26 05:00:00
2014-01-02 05:00:00

Time Zone

The Eurodollar Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

GF

Introduction

This page shows the trading hours, holidays, and time zone of the Feeder Cattle Futures contract in the CME Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Feeder Cattle Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:05:00
Tuesday 08:30:00 to 13:05:00
Wednesday 08:30:00 to 13:05:00
Thursday 08:30:00 to 13:05:00
Friday 08:30:00 to 13:05:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Feeder Cattle Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-01-16 2017-02-20
2017-05-29 2017-07-04 2017-09-04 2017-11-23 2018-01-15
2018-02-19 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2019-01-21 2019-02-18 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2020-01-20 2020-02-17 2020-05-25 2020-07-03
2020-09-07 2020-11-26 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2022-01-17
2022-02-21 2022-05-30 2022-06-20 2022-07-04 2022-09-05
2022-11-24 2023-01-16 2023-02-20 2023-04-07 2023-05-29
2023-06-19 2023-07-04 2023-09-04 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the Feeder Cattle Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2010-12-31 12:15:00
2011-11-25 12:15:00
2012-12-24 12:15:00
2013-03-28 13:55:00
2013-07-03 12:15:00
2013-11-27 13:05:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-04-20 16:00:00
2014-05-25 16:00:00
2014-07-03 12:15:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-04-02 13:55:00
2015-07-02 12:15:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2015-12-31 13:55:00
2016-11-25 12:15:00
2016-12-23 12:05:00
2017-07-03 12:15:00
2017-11-24 12:15:00
2017-12-22 12:15:00
2018-07-03 12:15:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-07-03 12:15:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-07-02 12:15:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-11-26 12:05:00
2022-11-25 12:05:00
2023-11-24 12:05:00
2024-03-28 16:00:00
2024-11-27 16:00:00

Late Opens

The following table shows the late opens for the Feeder Cattle Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-11-24 17:00:00
2011-12-27 09:05:00
2012-01-03 09:05:00
2012-01-17 09:05:00
2012-02-21 09:05:00
2012-05-29 09:05:00
2012-07-05 09:05:00
2012-09-04 09:05:00
2012-11-22 17:00:00
2012-12-26 09:05:00
2013-01-02 09:05:00
2013-01-22 09:05:00
2013-02-19 09:05:00
2013-05-28 09:05:00
2013-07-05 09:05:00
2013-09-03 09:05:00
2013-11-29 09:05:00
2013-12-26 09:05:00
2014-01-02 09:05:00
2014-01-21 09:05:00
2014-02-18 09:05:00
2014-04-21 09:05:00
2014-05-27 09:05:00
2014-07-07 09:05:00
2014-09-02 09:05:00
2014-11-28 08:00:00
2014-12-26 08:00:00
2015-01-02 08:00:00
2015-01-20 09:05:00
2015-02-17 09:05:00
2015-04-06 09:05:00
2015-05-26 09:05:00
2015-07-06 09:05:00
2015-09-08 09:05:00
2015-11-27 08:00:00
2015-12-28 09:05:00
2016-01-04 09:05:00
2016-01-19 09:05:00
2016-02-16 09:05:00
2016-03-28 08:30:00
2016-05-31 08:30:00
2016-07-05 08:30:00
2016-09-06 08:30:00
2016-11-25 08:30:00
2017-01-16 08:30:00
2017-02-20 08:30:00
2017-04-17 08:30:00
2017-05-30 08:30:00
2017-07-05 08:30:00
2017-09-05 08:30:00
2018-01-16 08:30:00
2018-02-20 08:30:00
2018-04-02 08:30:00
2018-05-29 08:30:00
2018-07-05 08:30:00
2018-09-04 08:30:00
2019-01-22 08:30:00
2019-02-19 08:30:00
2019-04-22 08:30:00
2019-05-28 08:30:00
2019-07-05 08:30:00
2019-09-03 08:30:00
2020-01-21 08:30:00
2020-02-18 08:30:00
2020-04-13 08:30:00
2020-05-26 08:30:00
2020-07-06 08:30:00
2020-09-08 08:30:00
2021-01-19 08:30:00
2021-02-16 08:30:00
2021-04-05 08:30:00
2021-06-01 08:30:00

Time Zone

The Feeder Cattle Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

GNF

Introduction

This page shows the trading hours, holidays, and time zone of the Nonfat Dry Milk Futures contract in the CME Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Nonfat Dry Milk Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 00:00:00 to 13:55:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Nonfat Dry Milk Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-07-04 2017-11-23
2018-07-04 2018-11-22 2019-07-04 2019-11-28 2020-07-03
2020-11-26 2021-04-02 2021-11-25 2022-11-24 2023-01-16
2023-02-20 2023-04-07 2023-11-23 2024-11-28

Early Closes

The following table shows the early closes for the Nonfat Dry Milk Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-11-25 16:00:00
2010-12-31 12:15:00
2011-04-21 13:55:00
2011-11-23 16:00:00
2012-01-15 17:00:00
2012-02-19 17:00:00
2012-05-27 17:00:00
2012-07-03 16:00:00
2012-09-02 17:00:00
2012-11-21 16:00:00
2012-12-24 12:00:00
2013-01-20 17:00:00
2013-02-17 17:00:00
2013-03-28 13:55:00
2013-05-26 17:00:00
2013-07-03 12:00:00
2013-09-01 17:00:00
2013-11-27 17:00:00
2013-12-24 12:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-12-24 12:00:00
2015-04-02 13:55:00
2015-07-02 12:00:00
2015-12-24 12:00:00
2015-12-31 13:55:00
2016-03-24 13:55:00
2016-12-23 12:00:00
2017-01-15 16:00:00
2017-02-19 16:00:00
2017-04-13 13:55:00
2017-05-28 16:00:00
2017-07-03 12:00:00
2017-09-03 16:00:00
2017-12-22 12:00:00
2018-01-14 16:00:00
2018-02-18 16:00:00
2018-03-29 13:55:00
2018-05-27 16:00:00
2018-07-03 12:00:00
2018-09-02 16:00:00
2018-12-24 12:00:00
2018-12-31 13:55:00
2019-01-20 16:00:00
2019-02-17 16:00:00
2019-04-18 13:55:00
2019-05-26 16:00:00
2019-07-03 12:00:00
2019-09-01 16:00:00
2019-11-27 16:00:00
2019-12-24 12:00:00
2019-12-31 13:55:00
2020-01-19 16:00:00
2020-02-16 16:00:00
2020-04-09 13:55:00
2020-05-24 16:00:00
2020-07-02 12:00:00
2020-09-06 16:00:00
2020-11-25 16:45:00
2020-12-24 12:00:00
2020-12-31 13:55:00
2021-01-17 16:00:00
2021-02-14 16:00:00
2021-04-01 13:55:00
2021-05-30 16:00:00
2021-07-04 16:00:00
2021-09-05 16:00:00
2022-01-16 16:00:00
2022-02-20 16:00:00
2022-04-14 13:55:00
2022-05-29 16:00:00
2022-06-19 16:00:00
2022-07-03 16:00:00
2022-09-04 16:00:00
2023-01-15 16:00:00
2023-02-19 16:00:00
2023-04-06 13:55:00
2023-05-28 16:00:00
2023-06-18 16:00:00
2023-09-03 16:00:00
2023-11-22 16:00:00
2024-01-01 17:00:00
2024-03-28 13:55:00
2024-11-27 16:00:00
2024-12-24 12:00:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Nonfat Dry Milk Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-12-27 09:05:00
2012-01-03 09:05:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-12-26 09:05:00
2013-01-02 09:05:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-12-26 09:05:00
2014-01-02 09:05:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-12-26 09:05:00
2015-01-02 09:05:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-03-27 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-29 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-05 08:30:00
2017-09-04 17:00:00
2017-11-26 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-09-03 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-04-18 13:55:00
2019-05-27 17:00:00
2019-09-02 17:00:00
2019-12-01 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-09-07 17:00:00
2020-11-29 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-09-04 17:00:00
2023-12-25 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Nonfat Dry Milk Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

HE

Introduction

This page shows the trading hours, holidays, and time zone of the Lean Hog Futures contract in the CME Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Lean Hog Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:05:00
Tuesday 08:30:00 to 13:05:00
Wednesday 08:30:00 to 13:05:00
Thursday 08:30:00 to 13:05:00
Friday 08:30:00 to 13:05:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Lean Hog Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-01-16 2017-02-20
2017-05-29 2017-07-04 2017-09-04 2017-11-23 2018-01-15
2018-02-19 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2019-01-21 2019-02-18 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2020-01-20 2020-02-17 2020-05-25 2020-07-03
2020-09-07 2020-11-26 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2022-01-17
2022-02-21 2022-05-30 2022-06-20 2022-07-04 2022-09-05
2022-11-24 2023-01-16 2023-02-20 2023-04-07 2023-05-29
2023-06-19 2023-07-04 2023-09-04 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the Lean Hog Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2010-12-31 12:15:00
2011-11-25 12:15:00
2012-12-24 12:15:00
2013-03-28 13:55:00
2013-07-03 12:15:00
2013-11-27 13:05:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-04-20 16:00:00
2014-05-25 16:00:00
2014-07-03 12:15:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-04-02 13:55:00
2015-07-02 12:15:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2015-12-31 13:55:00
2016-11-25 12:15:00
2016-12-23 12:05:00
2017-07-03 12:15:00
2017-11-24 12:15:00
2017-12-22 12:15:00
2018-07-03 12:15:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-07-03 12:15:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-07-02 12:15:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-11-26 12:05:00
2022-11-25 12:05:00
2023-11-24 12:05:00
2024-03-28 16:00:00
2024-11-27 16:00:00

Late Opens

The following table shows the late opens for the Lean Hog Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-11-24 17:00:00
2011-12-27 09:05:00
2012-01-03 09:05:00
2012-01-17 09:05:00
2012-02-21 09:05:00
2012-05-29 09:05:00
2012-07-05 09:05:00
2012-09-04 09:05:00
2012-11-22 17:00:00
2012-12-26 09:05:00
2013-01-02 09:05:00
2013-01-22 09:05:00
2013-02-19 09:05:00
2013-05-28 09:05:00
2013-07-05 09:05:00
2013-09-03 09:05:00
2013-11-29 09:05:00
2013-12-26 09:05:00
2014-01-02 09:05:00
2014-01-21 09:05:00
2014-02-18 09:05:00
2014-04-21 09:05:00
2014-05-27 09:05:00
2014-07-07 09:05:00
2014-09-02 09:05:00
2014-11-28 08:00:00
2014-12-26 08:00:00
2015-01-02 08:00:00
2015-01-20 09:05:00
2015-02-17 09:05:00
2015-04-06 09:05:00
2015-05-26 09:05:00
2015-07-06 09:05:00
2015-09-08 09:05:00
2015-11-27 08:00:00
2015-12-28 09:05:00
2016-01-04 09:05:00
2016-01-19 09:05:00
2016-02-16 09:05:00
2016-03-28 08:30:00
2016-05-31 08:30:00
2016-07-05 08:30:00
2016-09-06 08:30:00
2016-11-25 08:30:00
2017-01-16 08:30:00
2017-02-20 08:30:00
2017-04-17 08:30:00
2017-05-30 08:30:00
2017-07-05 08:30:00
2017-09-05 08:30:00
2018-01-16 08:30:00
2018-02-20 08:30:00
2018-04-02 08:30:00
2018-05-29 08:30:00
2018-07-05 08:30:00
2018-09-04 08:30:00
2019-01-22 08:30:00
2019-02-19 08:30:00
2019-04-22 08:30:00
2019-05-28 08:30:00
2019-07-05 08:30:00
2019-09-03 08:30:00
2020-01-21 08:30:00
2020-02-18 08:30:00
2020-04-13 08:30:00
2020-05-26 08:30:00
2020-07-06 08:30:00
2020-09-08 08:30:00
2021-01-19 08:30:00
2021-02-16 08:30:00
2021-04-05 08:30:00
2021-06-01 08:30:00

Time Zone

The Lean Hog Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

IBV

Introduction

This page shows the trading hours, holidays, and time zone of the USD-Denominated Ibovespa Index Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the USD-Denominated Ibovespa Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the USD-Denominated Ibovespa Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the USD-Denominated Ibovespa Index Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the USD-Denominated Ibovespa Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-19 10:30:00
2009-02-16 10:30:00
2009-05-25 10:30:00
2009-07-03 10:30:00
2009-09-07 10:30:00
2009-11-26 10:30:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-18 10:30:00
2010-02-15 10:30:00
2010-04-02 08:15:00
2010-05-31 10:30:00
2010-07-05 10:30:00
2010-09-06 10:30:00
2010-11-25 10:30:00
2010-11-26 12:15:00
2011-01-17 10:30:00
2011-02-21 10:30:00
2011-05-30 10:30:00
2011-07-04 10:30:00
2011-09-05 10:30:00
2011-11-24 10:30:00
2011-11-25 12:15:00
2012-01-16 10:30:00
2012-02-20 10:30:00
2012-04-06 08:15:00
2012-05-28 10:30:00
2012-07-03 12:15:00
2012-07-04 10:30:00
2012-09-03 10:30:00
2012-11-22 10:30:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-21 10:30:00
2013-02-18 10:30:00
2013-05-27 10:30:00
2013-07-03 12:15:00
2013-07-04 10:30:00
2013-09-02 10:30:00
2013-11-28 10:30:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-20 10:30:00
2014-02-17 10:30:00
2014-05-26 12:00:00
2014-07-03 12:15:00
2014-07-04 12:00:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-19 12:00:00
2015-02-16 12:00:00
2015-04-03 08:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-03 12:15:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-03 12:15:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-03 12:15:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 08:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 12:00:00
2022-02-21 12:00:00
2022-05-30 12:00:00
2022-06-20 12:00:00
2022-07-04 12:00:00
2022-09-05 12:00:00
2022-11-24 12:00:00
2022-11-25 12:15:00
2023-01-16 12:00:00
2023-02-20 12:00:00
2023-04-07 08:15:00
2023-05-29 12:00:00
2023-06-19 12:00:00
2023-07-04 12:00:00
2023-09-04 12:00:00
2023-11-23 12:00:00
2023-11-24 12:15:00
2024-01-15 12:00:00
2024-02-19 12:00:00
2024-05-27 12:00:00
2024-06-19 12:00:00
2024-07-04 12:00:00
2024-09-02 12:00:00
2024-11-28 12:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the USD-Denominated Ibovespa Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The USD-Denominated Ibovespa Index Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

J7

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini Japanese Yen Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini Japanese Yen Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini Japanese Yen Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the E-mini Japanese Yen Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The E-mini Japanese Yen Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

LBR

Introduction

This page shows the trading hours, holidays, and time zone of the Lumber Futures contract in the CME Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Lumber Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 09:00:00 to 15:05:00
Tuesday 09:00:00 to 15:05:00
Wednesday 09:00:00 to 15:05:00
Thursday 09:00:00 to 15:05:00
Friday 09:00:00 to 15:05:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Lumber Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-01-16 2017-02-20
2017-05-29 2017-07-04 2017-09-04 2017-11-23 2018-01-15
2018-02-19 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2019-01-21 2019-02-18 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2020-01-20 2020-02-17 2020-05-25 2020-07-03
2020-09-07 2020-11-26 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2022-01-17
2022-02-21 2022-05-30 2022-06-20 2022-07-04 2022-09-05
2022-11-24 2023-01-16 2023-02-20 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2024-01-01 2024-01-15 2024-02-19
2024-05-27 2024-06-19 2024-07-04 2024-09-02 2024-11-28
2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the Lumber Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2010-12-31 12:15:00
2013-03-28 13:55:00
2013-07-03 12:00:00
2013-11-27 15:05:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-04-20 16:00:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-04-02 13:55:00
2015-07-02 12:00:00
2015-11-27 12:00:00
2015-12-24 12:00:00
2015-12-31 13:55:00
2016-03-24 13:55:00
2016-11-25 12:00:00
2016-12-23 12:00:00
2017-04-13 13:55:00
2017-07-03 12:00:00
2017-11-24 12:00:00
2017-12-22 12:00:00
2018-03-29 13:55:00
2018-07-03 12:00:00
2018-11-23 12:00:00
2018-12-24 12:00:00
2018-12-31 13:55:00
2019-04-18 13:55:00
2019-07-03 12:05:00
2019-11-29 12:05:00
2019-12-24 12:05:00
2019-12-31 13:55:00
2020-07-02 12:05:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-11-26 12:05:00
2022-11-25 12:05:00
2023-11-24 12:05:00
2024-03-28 15:05:00
2024-11-27 15:05:00

Late Opens

The following table shows the late opens for the Lumber Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-11-24 17:00:00
2011-12-27 09:00:00
2012-01-03 09:00:00
2012-01-17 09:00:00
2012-02-21 09:00:00
2012-05-29 09:00:00
2012-07-05 09:00:00
2012-09-04 09:00:00
2012-11-22 17:00:00
2012-12-26 09:00:00
2013-01-02 09:00:00
2013-01-22 09:00:00
2013-02-19 09:00:00
2013-05-28 09:00:00
2013-07-05 09:00:00
2013-09-03 09:00:00
2013-11-29 09:00:00
2013-12-26 09:00:00
2014-01-02 09:00:00
2014-01-21 09:00:00
2014-02-18 09:00:00
2014-04-21 09:00:00
2014-05-27 09:00:00
2014-07-07 09:00:00
2014-09-02 09:00:00
2014-11-28 09:00:00
2014-12-26 09:00:00
2015-01-02 09:00:00
2015-01-20 09:00:00
2015-02-17 09:00:00
2015-04-06 09:00:00
2015-05-26 09:00:00
2015-07-06 09:00:00
2015-09-08 09:00:00
2015-11-27 09:00:00
2015-12-28 09:00:00
2016-01-04 09:00:00
2016-01-19 09:00:00
2016-02-16 09:00:00
2016-03-28 09:00:00
2016-05-31 09:00:00
2016-07-05 09:00:00
2016-09-06 09:00:00
2016-11-25 09:00:00
2017-01-16 09:00:00
2017-02-20 09:00:00
2017-04-17 09:00:00
2017-05-30 09:00:00
2017-07-05 09:00:00
2017-09-05 09:00:00
2018-01-16 09:00:00
2018-02-20 09:00:00
2018-04-02 09:00:00
2018-05-29 09:00:00
2018-07-05 09:00:00
2018-09-04 09:00:00
2019-01-22 09:00:00
2019-02-19 09:00:00
2019-04-22 09:00:00
2019-05-28 09:00:00
2019-07-05 09:00:00
2019-09-03 09:00:00
2020-01-21 09:00:00
2020-02-18 09:00:00
2020-04-13 09:00:00
2020-05-26 09:00:00
2020-07-06 09:00:00
2020-09-08 09:00:00
2021-01-19 09:00:00
2021-02-16 09:00:00
2021-04-05 09:00:00
2021-06-01 09:00:00

Time Zone

The Lumber Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

LBS

Introduction

This page shows the trading hours, holidays, and time zone of the Random Length Lumber Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Random Length Lumber Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 06:00:00 to 09:00:00
Tuesday 06:00:00 to 09:00:00
Wednesday 06:00:00 to 09:00:00
Thursday 06:00:00 to 09:00:00
Friday 06:00:00 to 09:00:00

Regular Trading Hours

The following table shows the regular trading hours for the Random Length Lumber Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 09:00:00 to 15:05:00
Tuesday 09:00:00 to 15:05:00
Wednesday 09:00:00 to 15:05:00
Thursday 09:00:00 to 15:05:00
Friday 09:00:00 to 15:05:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Random Length Lumber Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2013-01-01 2013-01-21 2013-02-18 2013-03-29 2013-05-27
2013-07-04 2013-09-02 2013-11-28 2013-12-25 2014-01-01
2014-01-20 2014-02-17 2014-04-18 2014-04-21 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-01 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-25
2019-01-01 2019-01-21 2019-02-18 2019-04-19 2019-05-27
2019-07-04 2019-09-02 2019-11-28 2019-12-25 2020-01-01
2020-01-20 2020-02-17 2020-04-10 2020-05-25 2020-07-03
2020-09-07 2020-11-26 2020-12-25 2021-01-01 2021-01-17
2021-01-18 2021-02-14 2021-02-15 2021-04-02 2021-05-30
2021-05-31 2021-07-04 2021-07-05 2021-09-05 2021-09-06
2021-11-24 2021-11-25 2021-12-24 2021-12-26 2022-01-16
2022-01-17 2022-02-20 2022-02-21 2022-04-15 2022-05-29
2022-05-30 2022-06-19 2022-06-20 2022-07-03 2022-07-04
2022-09-04 2022-09-05 2022-11-23 2022-11-24 2022-12-25
2022-12-26 2023-01-01 2023-01-02 2023-01-16 2023-02-20
2023-04-07 2023-05-29 2023-06-19 2023-07-04 2023-09-04
2023-11-23 2023-12-25 2024-01-01

Early Closes

The following table shows the early closes for the Random Length Lumber Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2013-07-03 12:00:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-07-03 12:00:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-07-02 12:00:00
2015-11-27 12:00:00
2015-12-24 12:00:00
2016-11-27 12:00:00
2016-12-24 12:00:00
2017-07-03 12:00:00
2017-11-24 12:00:00
2017-12-24 12:00:00
2018-07-03 12:00:00
2018-11-23 12:00:00
2018-12-24 12:00:00
2019-07-03 12:00:00
2019-11-29 12:05:00
2019-12-24 12:05:00
2020-07-02 12:05:00
2020-11-26 12:05:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2022-11-25 12:05:00

Late Opens

There are no days with late opens.

Time Zone

The Random Length Lumber Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

LE

Introduction

This page shows the trading hours, holidays, and time zone of the Live Cattle Futures contract in the CME Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Live Cattle Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 13:05:00
Tuesday 08:30:00 to 13:05:00
Wednesday 08:30:00 to 13:05:00
Thursday 08:30:00 to 13:05:00
Friday 08:30:00 to 13:05:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Live Cattle Futures contract in the CME Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-01-16 2017-02-20
2017-05-29 2017-07-04 2017-09-04 2017-11-23 2018-01-15
2018-02-19 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2019-01-21 2019-02-18 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2020-01-20 2020-02-17 2020-05-25 2020-07-03
2020-09-07 2020-11-26 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2022-01-17
2022-02-21 2022-05-30 2022-06-20 2022-07-04 2022-09-05
2022-11-24 2023-01-16 2023-02-20 2023-04-07 2023-05-29
2023-06-19 2023-07-04 2023-09-04 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the Live Cattle Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2010-12-31 12:15:00
2011-11-25 12:15:00
2012-12-24 12:15:00
2013-03-28 13:55:00
2013-07-03 12:15:00
2013-11-27 13:05:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-04-20 16:00:00
2014-05-25 16:00:00
2014-07-03 12:15:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-04-02 13:55:00
2015-07-02 12:15:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2015-12-31 13:55:00
2016-11-25 12:15:00
2016-12-23 12:05:00
2017-07-03 12:15:00
2017-11-24 12:15:00
2017-12-22 12:15:00
2018-07-03 12:15:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-07-03 12:15:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-07-02 12:15:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-11-26 12:05:00
2022-11-25 12:05:00
2023-11-24 12:05:00
2024-03-28 16:00:00
2024-11-27 16:00:00

Late Opens

The following table shows the late opens for the Live Cattle Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-11-24 17:00:00
2011-12-27 09:05:00
2012-01-03 09:05:00
2012-01-17 09:05:00
2012-02-21 09:05:00
2012-05-29 09:05:00
2012-07-05 09:05:00
2012-09-04 09:05:00
2012-11-22 17:00:00
2012-12-26 09:05:00
2013-01-02 09:05:00
2013-01-22 09:05:00
2013-02-19 09:05:00
2013-05-28 09:05:00
2013-07-05 09:05:00
2013-09-03 09:05:00
2013-11-29 09:05:00
2013-12-26 09:05:00
2014-01-02 09:05:00
2014-01-21 09:05:00
2014-02-18 09:05:00
2014-04-21 09:05:00
2014-05-27 09:05:00
2014-07-07 09:05:00
2014-09-02 09:05:00
2014-11-28 08:00:00
2014-12-26 08:00:00
2015-01-02 08:00:00
2015-01-20 09:05:00
2015-02-17 09:05:00
2015-04-06 09:05:00
2015-05-26 09:05:00
2015-07-06 09:05:00
2015-09-08 09:05:00
2015-11-27 08:00:00
2015-12-28 09:05:00
2016-01-04 09:05:00
2016-01-19 09:05:00
2016-02-16 09:05:00
2016-03-28 08:30:00
2016-05-31 08:30:00
2016-07-05 08:30:00
2016-09-06 08:30:00
2016-11-25 08:30:00
2017-01-16 08:30:00
2017-02-20 08:30:00
2017-04-17 08:30:00
2017-05-30 08:30:00
2017-07-05 08:30:00
2017-09-05 08:30:00
2018-01-16 08:30:00
2018-02-20 08:30:00
2018-04-02 08:30:00
2018-05-29 08:30:00
2018-07-05 08:30:00
2018-09-04 08:30:00
2019-01-22 08:30:00
2019-02-19 08:30:00
2019-04-22 08:30:00
2019-05-28 08:30:00
2019-07-05 08:30:00
2019-09-03 08:30:00
2020-01-21 08:30:00
2020-02-18 08:30:00
2020-04-13 08:30:00
2020-05-26 08:30:00
2020-07-06 08:30:00
2020-09-08 08:30:00
2021-01-19 08:30:00
2021-02-16 08:30:00
2021-04-05 08:30:00
2021-06-01 08:30:00

Time Zone

The Live Cattle Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

M2K

Introduction

This page shows the trading hours, holidays, and time zone of the Micro E-mini Russell 2000 Index Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro E-mini Russell 2000 Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro E-mini Russell 2000 Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro E-mini Russell 2000 Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro E-mini Russell 2000 Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00
2024-01-15 13:00:00
2024-02-19 13:00:00
2024-05-27 13:00:00
2024-06-19 13:00:00
2024-07-04 13:00:00
2024-09-02 13:00:00
2024-11-28 13:00:00
2024-12-24 13:15:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro E-mini Russell 2000 Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro E-mini Russell 2000 Index Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

M6A

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Australian Dollar/U.S. Dollar (AUD/USD) Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Australian Dollar/U.S. Dollar (AUD/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Australian Dollar/U.S. Dollar (AUD/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Australian Dollar/U.S. Dollar (AUD/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro Australian Dollar/U.S. Dollar (AUD/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro Australian Dollar/U.S. Dollar (AUD/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro Australian Dollar/U.S. Dollar (AUD/USD) Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

M6B

Introduction

This page shows the trading hours, holidays, and time zone of the Micro British Pound Sterling/U.S. Dollar (GBP/USD) Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro British Pound Sterling/U.S. Dollar (GBP/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro British Pound Sterling/U.S. Dollar (GBP/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro British Pound Sterling/U.S. Dollar (GBP/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro British Pound Sterling/U.S. Dollar (GBP/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro British Pound Sterling/U.S. Dollar (GBP/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro British Pound Sterling/U.S. Dollar (GBP/USD) Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

M6C

Introduction

This page shows the trading hours, holidays, and time zone of the Micro USD/CAD Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro USD/CAD Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro USD/CAD Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro USD/CAD Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro USD/CAD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro USD/CAD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro USD/CAD Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

M6E

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Euro/U.S. Dollar (EUR/USD) Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Euro/U.S. Dollar (EUR/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Euro/U.S. Dollar (EUR/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Euro/U.S. Dollar (EUR/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro Euro/U.S. Dollar (EUR/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro Euro/U.S. Dollar (EUR/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro Euro/U.S. Dollar (EUR/USD) Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

M6J

Introduction

This page shows the trading hours, holidays, and time zone of the Micro USD/JPY Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro USD/JPY Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro USD/JPY Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro USD/JPY Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro USD/JPY Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro USD/JPY Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro USD/JPY Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

M6S

Introduction

This page shows the trading hours, holidays, and time zone of the Micro USD/CHF Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro USD/CHF Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro USD/CHF Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro USD/CHF Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro USD/CHF Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro USD/CHF Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro USD/CHF Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

MBT

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Bitcoin Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Bitcoin Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Bitcoin Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Bitcoin Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro Bitcoin Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:45:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:45:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:45:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:45:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro Bitcoin Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2018-01-15 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro Bitcoin Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

MCD

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Canadian Dollar/U.S.Dollar(CAD/USD) Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Canadian Dollar/U.S.Dollar(CAD/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Canadian Dollar/U.S.Dollar(CAD/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Canadian Dollar/U.S.Dollar(CAD/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro Canadian Dollar/U.S.Dollar(CAD/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro Canadian Dollar/U.S.Dollar(CAD/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro Canadian Dollar/U.S.Dollar(CAD/USD) Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

MES

Introduction

This page shows the trading hours, holidays, and time zone of the Micro E-mini Standard and Poor's 500 Stock Price Index Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro E-mini Standard and Poor's 500 Stock Price Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro E-mini Standard and Poor's 500 Stock Price Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro E-mini Standard and Poor's 500 Stock Price Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro E-mini Standard and Poor's 500 Stock Price Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00
2024-01-15 13:00:00
2024-02-19 13:00:00
2024-05-27 13:00:00
2024-06-19 13:00:00
2024-07-04 13:00:00
2024-09-02 13:00:00
2024-11-28 13:00:00
2024-12-24 13:15:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro E-mini Standard and Poor's 500 Stock Price Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro E-mini Standard and Poor's 500 Stock Price Index Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

MET

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Ether Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Ether Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Ether Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Ether Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro Ether Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:45:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:45:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:45:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro Ether Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2018-01-15 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro Ether Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

MIR

Introduction

This page shows the trading hours, holidays, and time zone of the Micro INR/USD Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro INR/USD Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro INR/USD Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro INR/USD Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro INR/USD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro INR/USD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro INR/USD Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

MJY

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Japanese Yen/U.S. Dollar (JPY/USD) Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Japanese Yen/U.S. Dollar (JPY/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Japanese Yen/U.S. Dollar (JPY/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Japanese Yen/U.S. Dollar (JPY/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro Japanese Yen/U.S. Dollar (JPY/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-02 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:00:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:12:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-17 16:00:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 12:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00

Late Opens

There are no days with late opens.

Time Zone

The Micro Japanese Yen/U.S. Dollar (JPY/USD) Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

MNH

Introduction

This page shows the trading hours, holidays, and time zone of the Micro USD/CNH Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro USD/CNH Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro USD/CNH Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro USD/CNH Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro USD/CNH Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro USD/CNH Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro USD/CNH Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

MNQ

Introduction

This page shows the trading hours, holidays, and time zone of the Micro E-mini Nasdaq-100 Index Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro E-mini Nasdaq-100 Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro E-mini Nasdaq-100 Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro E-mini Nasdaq-100 Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro E-mini Nasdaq-100 Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00
2024-01-15 13:00:00
2024-02-19 13:00:00
2024-05-27 13:00:00
2024-06-19 13:00:00
2024-07-04 13:00:00
2024-09-02 13:00:00
2024-11-28 13:00:00
2024-12-24 13:15:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro E-mini Nasdaq-100 Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro E-mini Nasdaq-100 Index Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

MSF

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Swiss Franc/U.S. Dollar (CHF/USD) Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Swiss Franc/U.S. Dollar (CHF/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Swiss Franc/U.S. Dollar (CHF/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Swiss Franc/U.S. Dollar (CHF/USD) Futures contract in the CME Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Micro Swiss Franc/U.S. Dollar (CHF/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2009-01-16 15:15:00
2009-01-19 12:00:00
2009-02-13 15:15:00
2009-02-16 12:00:00
2009-04-09 15:15:00
2009-05-22 15:15:00
2009-05-25 12:00:00
2009-07-03 12:00:00
2009-09-04 15:15:00
2009-09-07 12:00:00
2009-10-09 15:15:00
2009-11-26 12:00:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-01-15 15:15:00
2010-01-18 12:00:00
2010-02-12 15:15:00
2010-02-15 12:00:00
2010-04-02 10:15:00
2010-05-28 15:15:00
2010-05-31 12:00:00
2010-07-02 15:15:00
2010-07-05 12:00:00
2010-09-03 15:15:00
2010-09-06 12:00:00
2010-10-08 15:15:00
2010-11-25 12:00:00
2010-11-26 12:15:00
2010-12-31 12:15:00
2011-01-14 15:15:00
2011-01-17 12:00:00
2011-02-18 15:15:00
2011-02-21 12:00:00
2011-05-27 15:15:00
2011-05-30 12:00:00
2011-07-01 15:15:00
2011-07-04 12:00:00
2011-09-02 15:15:00
2011-09-05 12:00:00
2011-10-07 15:15:00
2011-11-24 12:00:00
2011-11-25 12:15:00
2012-01-13 15:15:00
2012-01-16 12:00:00
2012-02-17 15:15:00
2012-02-20 12:00:00
2012-04-06 10:15:00
2012-05-25 15:15:00
2012-05-28 12:00:00
2012-07-04 12:00:00
2012-08-31 15:15:00
2012-09-03 12:00:00
2012-10-05 15:15:00
2012-11-22 12:00:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-01-18 15:15:00
2013-01-21 12:00:00
2013-02-15 15:15:00
2013-02-18 12:00:00
2013-05-24 15:15:00
2013-05-27 12:00:00
2013-07-04 12:00:00
2013-08-30 15:15:00
2013-09-02 12:00:00
2013-11-28 12:00:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-01-17 15:15:00
2014-01-20 12:00:00
2014-02-14 15:15:00
2014-02-17 12:00:00
2014-05-23 15:15:00
2014-05-26 12:00:00
2014-07-04 12:00:00
2014-08-29 15:15:00
2014-09-01 12:00:00
2014-11-27 12:00:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-01-16 15:15:00
2015-01-19 12:00:00
2015-02-13 15:15:00
2015-02-16 12:00:00
2015-04-03 10:15:00
2015-05-22 15:15:00
2015-05-25 12:00:00
2015-07-03 12:00:00
2015-09-07 12:00:00
2015-11-26 12:00:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-01-18 12:00:00
2016-02-15 12:00:00
2016-05-30 12:00:00
2016-07-04 12:00:00
2016-09-05 12:00:00
2016-11-24 12:00:00
2016-11-25 12:15:00
2017-01-16 12:00:00
2017-02-20 12:00:00
2017-05-29 12:00:00
2017-07-04 12:00:00
2017-09-04 12:00:00
2017-11-23 12:00:00
2017-11-24 12:15:00
2018-01-15 12:00:00
2018-02-19 12:00:00
2018-05-28 12:00:00
2018-07-04 12:00:00
2018-09-03 12:00:00
2018-11-22 12:00:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-01-21 12:00:00
2019-02-18 12:00:00
2019-05-27 12:00:00
2019-07-04 12:00:00
2019-09-02 12:00:00
2019-11-28 12:00:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-04-02 10:15:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:15:00
2022-01-17 16:00:00
2022-02-21 16:00:00
2022-05-30 16:00:00
2022-06-20 16:00:00
2022-07-04 16:00:00
2022-09-05 16:00:00
2022-11-24 16:00:00
2022-11-25 12:15:00
2023-01-16 16:00:00
2023-02-20 16:00:00
2023-04-07 10:15:00
2023-05-29 16:00:00
2023-06-19 16:00:00
2023-07-04 16:00:00
2023-09-04 16:00:00
2023-11-23 16:00:00
2023-11-24 12:15:00
2024-01-15 16:00:00
2024-02-19 16:00:00
2024-03-28 16:00:00
2024-05-27 16:00:00
2024-06-19 16:00:00
2024-07-04 16:00:00
2024-09-02 16:00:00
2024-11-28 16:00:00
2024-12-24 12:15:00
2024-12-31 16:00:00

Late Opens

The following table shows the late opens for the Micro Swiss Franc/U.S. Dollar (CHF/USD) Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2009-01-19 17:00:00
2009-02-16 17:00:00
2009-05-25 17:00:00
2009-09-07 17:00:00
2009-11-26 17:00:00
2010-01-18 17:00:00
2010-02-15 17:00:00
2010-05-31 17:00:00
2010-07-05 17:00:00
2010-09-06 17:00:00
2010-11-25 17:00:00
2011-01-17 17:00:00
2011-02-21 17:00:00
2011-05-30 17:00:00
2011-07-04 17:00:00
2011-09-05 17:00:00
2011-11-24 17:00:00
2012-01-16 17:00:00
2012-02-20 17:00:00
2012-05-28 17:00:00
2012-07-04 17:00:00
2012-09-03 17:00:00
2012-11-22 17:00:00
2013-01-21 17:00:00
2013-02-18 17:00:00
2013-05-27 17:00:00
2013-07-04 17:00:00
2013-09-02 17:00:00
2013-11-28 17:00:00
2014-01-20 17:00:00
2014-02-17 17:00:00
2014-05-26 17:00:00
2014-09-01 17:00:00
2014-11-27 17:00:00
2015-01-19 17:00:00
2015-02-16 17:00:00
2015-05-25 17:00:00
2015-09-07 17:00:00
2015-11-26 17:00:00
2016-01-18 17:00:00
2016-02-15 17:00:00
2016-05-30 17:00:00
2016-07-04 17:00:00
2016-09-05 17:00:00
2016-11-24 17:00:00
2017-01-16 17:00:00
2017-02-20 17:00:00
2017-05-29 17:00:00
2017-07-04 17:00:00
2017-09-04 17:00:00
2017-11-23 17:00:00
2018-01-15 17:00:00
2018-02-19 17:00:00
2018-05-28 17:00:00
2018-07-04 17:00:00
2018-09-03 17:00:00
2018-11-22 17:00:00
2019-01-21 17:00:00
2019-02-18 17:00:00
2019-05-27 17:00:00
2019-07-04 17:00:00
2019-09-02 17:00:00
2019-11-28 17:00:00
2020-01-20 17:00:00
2020-02-17 17:00:00
2020-05-25 17:00:00
2020-07-03 17:00:00
2020-09-07 17:00:00
2020-11-26 17:00:00
2021-01-18 17:00:00
2021-02-15 17:00:00
2021-05-31 17:00:00
2021-07-05 17:00:00
2021-09-06 17:00:00
2021-11-25 17:00:00
2022-01-17 17:00:00
2022-02-21 17:00:00
2022-05-30 17:00:00
2022-06-20 17:00:00
2022-07-04 17:00:00
2022-09-05 17:00:00
2022-11-24 17:00:00
2023-01-16 17:00:00
2023-02-20 17:00:00
2023-05-29 17:00:00
2023-06-19 17:00:00
2023-07-04 17:00:00
2023-09-04 17:00:00
2023-11-23 17:00:00
2023-12-25 17:00:00
2024-01-01 17:00:00
2024-01-15 17:00:00
2024-02-19 17:00:00
2024-05-27 17:00:00
2024-06-19 17:00:00
2024-07-04 17:00:00
2024-09-02 17:00:00
2024-11-28 17:00:00
2024-12-25 17:00:00
2025-01-01 17:00:00

Time Zone

The Micro Swiss Franc/U.S. Dollar (CHF/USD) Futures contract in the CME Future market trades in the America/Chicago time zone.

 

CME

NIY

Introduction

This page shows the trading hours, holidays, and time zone of the Nikkei/YEN Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Nikkei/YEN Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Nikkei/YEN Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Nikkei/YEN Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Nikkei/YEN Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00

Late Opens

The following table shows the late opens for the Nikkei/YEN Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00

Time Zone

The Nikkei/YEN Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

NKD

Introduction

This page shows the trading hours, holidays, and time zone of the Nikkei/USD Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the Nikkei/USD Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Nikkei/USD Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Nikkei/USD Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the Nikkei/USD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00
2024-01-15 13:00:00
2024-02-19 13:00:00
2024-05-27 13:00:00
2024-06-19 13:00:00
2024-07-04 13:00:00
2024-09-02 13:00:00
2024-11-28 13:00:00
2024-12-24 13:15:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Nikkei/USD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Nikkei/USD Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

NQ

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini Nasdaq-100 Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini Nasdaq-100 Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini Nasdaq-100 Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini Nasdaq-100 Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini Nasdaq-100 Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00
2024-01-15 13:00:00
2024-02-19 13:00:00
2024-05-27 13:00:00
2024-06-19 13:00:00
2024-07-04 13:00:00
2024-09-02 13:00:00
2024-11-28 13:00:00
2024-12-24 13:15:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the E-mini Nasdaq-100 Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The E-mini Nasdaq-100 Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

RS1

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini Russell 1000 future contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini Russell 1000 future contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini Russell 1000 future contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini Russell 1000 future contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini Russell 1000 future contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00

Late Opens

The following table shows the late opens for the E-mini Russell 1000 future contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00

Time Zone

The E-mini Russell 1000 future contract in the CME Future market trades in the America/New York time zone.

 

CME

RTY

Introduction

This page shows the trading hours, holidays, and time zone of the E-mini Russell 2000 Index Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the E-mini Russell 2000 Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the E-mini Russell 2000 Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the E-mini Russell 2000 Index Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the E-mini Russell 2000 Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00
2024-01-15 13:00:00
2024-02-19 13:00:00
2024-05-27 13:00:00
2024-06-19 13:00:00
2024-07-04 13:00:00
2024-09-02 13:00:00
2024-11-28 13:00:00
2024-12-24 13:15:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the E-mini Russell 2000 Index Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The E-mini Russell 2000 Index Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

RX

Introduction

This page shows the trading hours, holidays, and time zone of the DJRE Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the DJRE Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the DJRE Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the DJRE Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the DJRE Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00

Late Opens

The following table shows the late opens for the DJRE Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00

Time Zone

The DJRE Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

SDA

Introduction

This page shows the trading hours, holidays, and time zone of the SP500 S&P 500 Annual Dividend Index future contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the SP500 S&P 500 Annual Dividend Index future contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the SP500 S&P 500 Annual Dividend Index future contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the SP500 S&P 500 Annual Dividend Index future contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the SP500 S&P 500 Annual Dividend Index future contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00

Late Opens

The following table shows the late opens for the SP500 S&P 500 Annual Dividend Index future contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00

Time Zone

The SP500 S&P 500 Annual Dividend Index future contract in the CME Future market trades in the America/New York time zone.

 

CME

TPD

Introduction

This page shows the trading hours, holidays, and time zone of the TOPIX USD Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the TOPIX USD Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the TOPIX USD Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the TOPIX USD Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the TOPIX USD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00

Late Opens

The following table shows the late opens for the TOPIX USD Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00

Time Zone

The TOPIX USD Futures contract in the CME Future market trades in the America/New York time zone.

 

CME

TPY

Introduction

This page shows the trading hours, holidays, and time zone of the TOPIX JPY Futures contract in the CME Future market.

Pre-market Hours

The following table shows the pre-market hours for the TOPIX JPY Futures contract in the CME Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the TOPIX JPY Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the TOPIX JPY Futures contract in the CME Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the CME Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-01-01 2011-04-22
2011-12-26 2012-01-02 2012-10-29 2012-10-30 2012-12-25
2013-01-01 2013-03-29 2013-12-25 2014-01-01 2014-04-18
2014-12-25 2015-01-01 2015-12-25 2016-01-01 2016-03-25
2016-12-25 2016-12-26 2017-01-02 2017-04-14 2017-12-25
2018-01-01 2018-03-30 2018-12-05 2018-12-25 2019-01-01
2019-04-19 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-12-24 2022-01-01 2022-04-15 2022-12-26
2023-01-02 2023-12-24 2023-12-31 2024-03-29

Early Closes

The following table shows the early closes for the TOPIX JPY Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 11:30:00
2009-02-16 11:30:00
2009-05-25 11:30:00
2009-07-03 11:30:00
2009-09-07 11:30:00
2009-11-26 11:30:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2010-01-18 11:30:00
2010-02-15 11:30:00
2010-04-02 09:15:00
2010-05-31 11:30:00
2010-07-05 11:30:00
2010-09-06 11:30:00
2010-11-25 11:30:00
2010-11-26 13:15:00
2011-01-17 11:30:00
2011-02-21 11:30:00
2011-05-30 11:30:00
2011-07-04 11:30:00
2011-09-05 11:30:00
2011-11-24 11:30:00
2011-11-25 13:15:00
2012-01-16 11:30:00
2012-02-20 11:30:00
2012-04-06 09:15:00
2012-05-28 11:30:00
2012-07-03 13:15:00
2012-07-04 11:30:00
2012-09-03 11:30:00
2012-11-22 11:30:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-01-21 11:30:00
2013-02-18 11:30:00
2013-05-27 11:30:00
2013-07-03 13:15:00
2013-07-04 11:30:00
2013-09-02 11:30:00
2013-11-28 11:30:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-20 11:30:00
2014-02-17 11:30:00
2014-05-26 13:00:00
2014-07-03 13:15:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 09:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2015-12-24 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-03 13:15:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-03 13:15:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-03 13:15:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:15:00
2020-12-24 13:15:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-04-02 09:15:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:15:00
2022-01-17 13:00:00
2022-02-21 13:00:00
2022-05-30 13:00:00
2022-06-20 13:00:00
2022-07-04 13:00:00
2022-09-05 13:00:00
2022-11-24 13:00:00
2022-11-25 13:15:00
2023-01-16 13:00:00
2023-02-20 13:00:00
2023-04-07 09:15:00
2023-05-29 13:00:00
2023-06-19 13:00:00
2023-07-04 13:00:00
2023-09-04 13:00:00
2023-11-23 13:00:00
2023-11-24 13:15:00

Late Opens

The following table shows the late opens for the TOPIX JPY Futures contract in the CME Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00

Time Zone

The TOPIX JPY Futures contract in the CME Future market trades in the America/New York time zone.

 

Market Hours

COMEX

Introduction

This page shows the trading hours, holidays, and time zone of the COMEX Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the COMEX Future market:

Weekday Time (America/Chicago)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 24:00:00
Tuesday 00:00:00 to 24:00:00
Wednesday 00:00:00 to 24:00:00
Thursday 00:00:00 to 24:00:00
Friday 00:00:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the COMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The COMEX Future market trades in the following time zones:

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall COMEX Future market:

Symbol Name
AUP Aluminum MW U.S. Transaction Premium Platts (25MT) Futures
EDP Aluminium European Premium Duty-Paid (Metal Bulletin) Futures
GC Gold Futures
HG Copper Futures
MGC Micro Gold Futures
MGT Micro Gold TAS Futures
SI Silver Futures
SIL Micro Silver Futures

 

COMEX

AUP

Introduction

This page shows the trading hours, holidays, and time zone of the Aluminum MW U.S. Transaction Premium Platts (25MT) Futures contract in the COMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Aluminum MW U.S. Transaction Premium Platts (25MT) Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Aluminum MW U.S. Transaction Premium Platts (25MT) Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Aluminum MW U.S. Transaction Premium Platts (25MT) Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Aluminum MW U.S. Transaction Premium Platts (25MT) Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Aluminum MW U.S. Transaction Premium Platts (25MT) Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Aluminum MW U.S. Transaction Premium Platts (25MT) Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Aluminum MW U.S. Transaction Premium Platts (25MT) Futures contract in the COMEX Future market trades in the America/New York time zone.

 

COMEX

EDP

Introduction

This page shows the trading hours, holidays, and time zone of the Aluminium European Premium Duty-Paid (Metal Bulletin) Futures contract in the COMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Aluminium European Premium Duty-Paid (Metal Bulletin) Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Aluminium European Premium Duty-Paid (Metal Bulletin) Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Aluminium European Premium Duty-Paid (Metal Bulletin) Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Aluminium European Premium Duty-Paid (Metal Bulletin) Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Aluminium European Premium Duty-Paid (Metal Bulletin) Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Aluminium European Premium Duty-Paid (Metal Bulletin) Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Aluminium European Premium Duty-Paid (Metal Bulletin) Futures contract in the COMEX Future market trades in the America/New York time zone.

 

COMEX

GC

Introduction

This page shows the trading hours, holidays, and time zone of the Gold Futures contract in the COMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Gold Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Gold Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Gold Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the COMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold Futures contract in the COMEX Future market trades in the America/New York time zone.

 

COMEX

HG

Introduction

This page shows the trading hours, holidays, and time zone of the Copper Futures contract in the COMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Copper Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Copper Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Copper Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the COMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Copper Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2011-12-31 16:15:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2016-12-23 17:00:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2017-12-22 17:00:00
2017-12-26 17:00:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00

Late Opens

There are no days with late opens.

Time Zone

The Copper Futures contract in the COMEX Future market trades in the America/New York time zone.

 

COMEX

MGC

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Gold Futures contract in the COMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Gold Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Gold Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Gold Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro Gold Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro Gold Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro Gold Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro Gold Futures contract in the COMEX Future market trades in the America/New York time zone.

 

COMEX

MGT

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Gold TAS Futures contract in the COMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Gold TAS Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Gold TAS Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Gold TAS Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro Gold TAS Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro Gold TAS Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro Gold TAS Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro Gold TAS Futures contract in the COMEX Future market trades in the America/New York time zone.

 

COMEX

SI

Introduction

This page shows the trading hours, holidays, and time zone of the Silver Futures contract in the COMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Silver Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Silver Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Silver Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the COMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver Futures contract in the COMEX Future market trades in the America/New York time zone.

 

COMEX

SIL

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Silver Futures contract in the COMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Silver Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Silver Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Silver Futures contract in the COMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro Silver Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro Silver Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro Silver Futures contract in the COMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro Silver Futures contract in the COMEX Future market trades in the America/New York time zone.

 

Market Hours

ICE

Introduction

This page shows the trading hours, holidays, and time zone of the ICE Future market.

Historical data for backtesting is unavailable for ICE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the ICE Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 24:00:00
Tuesday 00:00:00 to 24:00:00
Wednesday 00:00:00 to 24:00:00
Thursday 00:00:00 to 24:00:00
Friday 00:00:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the ICE Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2023-11-23 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-03-29 2024-05-27 2024-06-19
2024-07-04 2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The ICE Future market trades in the America/New York time zone.

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall ICE Future market:

Symbol Name
B Brent Crude Futures
CC Cocoa Futures
CT Cotton No. 2 Futures
DX US Dollar Index Futures
G Low Sulfur Gasoil
KC Coffee C Arabica Futures
OJ Frozen Concentrated Orange Juice
SB Sugar No. 11 Futures

 

ICE

B

Introduction

This page shows the trading hours, holidays, and time zone of the Brent Crude Futures contract in the ICE Future market.

Historical data for backtesting is unavailable for ICE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Brent Crude Futures contract in the ICE Future market:

Weekday Time (America/New York)
Sunday 20:00:00 to 24:00:00
Monday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Tuesday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Wednesday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Thursday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Friday 00:00:00 to 18:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Brent Crude Futures contract in the ICE Future market:

Date ( yyyy-mm-dd )
2023-01-02 2023-04-07 2023-12-25 2024-01-01

Early Closes

The following table shows the early closes for the Brent Crude Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2013-01-21 13:30:00
2013-02-18 13:30:00
2013-05-27 13:30:00
2013-07-04 13:30:00
2013-09-02 13:30:00
2013-11-28 13:30:00
2013-11-29 14:00:00
2013-12-24 14:00:00
2013-12-31 15:00:00
2014-01-20 13:30:00
2014-02-17 13:30:00
2014-05-26 13:30:00
2014-07-04 13:30:00
2014-09-01 13:30:00
2014-11-27 13:30:00
2014-11-28 14:00:00
2014-12-24 14:00:00
2014-12-31 15:00:00
2015-01-19 13:30:00
2015-02-16 13:30:00
2015-06-03 13:30:00
2015-07-03 13:30:00
2015-09-07 13:30:00
2015-11-26 13:30:00
2015-11-27 14:00:00
2015-12-24 14:00:00
2015-12-31 15:00:00
2016-01-18 13:30:00
2016-02-15 13:30:00
2016-05-30 13:30:00
2016-07-04 13:30:00
2016-09-05 13:30:00
2016-11-26 13:30:00
2016-11-27 14:00:00
2016-12-24 14:00:00
2016-12-30 15:00:00
2017-09-04 13:30:00
2017-11-23 13:30:00
2017-11-24 14:00:00
2017-12-22 17:00:00
2017-12-29 17:00:00
2018-07-04 13:30:00
2018-09-03 13:30:00
2018-11-22 13:30:00
2018-11-23 14:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-05-27 13:30:00
2019-07-04 13:30:00
2019-09-02 13:30:00
2019-11-28 13:30:00
2019-11-29 14:00:00
2019-12-24 14:00:00
2019-12-31 15:00:00
2020-05-25 13:30:00
2020-07-03 13:30:00
2020-09-07 13:30:00
2020-11-26 13:30:00
2020-11-27 14:00:00
2020-12-24 14:00:00
2020-12-31 15:00:00

Late Opens

There are no days with late opens.

Time Zone

The Brent Crude Futures contract in the ICE Future market trades in the America/New York time zone.

 

ICE

CC

Introduction

This page shows the trading hours, holidays, and time zone of the Cocoa Futures contract in the ICE Future market.

Historical data for backtesting is unavailable for ICE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Cocoa Futures contract in the ICE Future market:

Weekday Time (America/New York)
Monday 04:45:00 to 13:30:00
Tuesday 04:45:00 to 13:30:00
Wednesday 04:45:00 to 13:30:00
Thursday 04:45:00 to 13:30:00
Friday 04:45:00 to 13:30:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the ICE Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2023-11-23 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-03-29 2024-05-27 2024-06-19
2024-07-04 2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Cocoa Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2008-11-26 14:15:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2008-12-26 14:15:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:05:00
2016-11-25 13:00:00
2017-12-24 13:05:00
2019-12-24 13:05:00

Late Opens

The following table shows the late opens for the Cocoa Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-12-28 07:30:00
2010-12-27 07:30:00
2010-12-28 07:30:00
2011-12-27 07:30:00
2012-04-09 07:30:00
2012-12-26 07:30:00
2013-01-02 07:30:00
2013-04-01 07:30:00
2013-12-26 08:00:00
2014-01-02 08:00:00
2014-04-21 07:30:00
2014-12-26 08:00:00
2015-01-02 08:00:00
2015-04-06 07:30:00
2015-12-28 08:00:00
2016-12-27 08:00:00
2017-04-17 07:30:00
2017-12-26 08:00:00
2018-04-02 07:30:00
2018-12-26 08:00:00
2019-04-22 07:30:00
2019-12-26 08:00:00

Time Zone

The Cocoa Futures contract in the ICE Future market trades in the America/New York time zone.

 

ICE

CT

Introduction

This page shows the trading hours, holidays, and time zone of the Cotton No. 2 Futures contract in the ICE Future market.

Historical data for backtesting is unavailable for ICE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

The following table shows the pre-market hours for the Cotton No. 2 Futures contract in the ICE Future market:

Weekday Time (America/New York)
Sunday 19:30:00 to 21:00:00
Monday 19:30:00 to 21:00:00
Tuesday 19:30:00 to 21:00:00
Wednesday 19:30:00 to 21:00:00
Thursday 19:30:00 to 21:00:00

Regular Trading Hours

The following table shows the regular trading hours for the Cotton No. 2 Futures contract in the ICE Future market:

Weekday Time (America/New York)
Sunday 21:00:00 to 24:00:00
Monday 00:00:00 to 14:20:00, 21:00:00 to 24:00:00
Tuesday 00:00:00 to 14:20:00, 21:00:00 to 24:00:00
Wednesday 00:00:00 to 14:20:00, 21:00:00 to 24:00:00
Thursday 00:00:00 to 14:20:00, 21:00:00 to 24:00:00
Friday 00:00:00 to 14:20:00

Post-market Hours

The following table shows the post-market hours for the Cotton No. 2 Futures contract in the ICE Future market:

Weekday Time (America/New York)
Monday 14:50:00 to 18:00:00
Tuesday 14:50:00 to 18:00:00
Wednesday 14:50:00 to 18:00:00
Thursday 14:50:00 to 18:00:00
Friday 14:50:00 to 18:00:00

Holidays

The following table shows the dates of holidays for the ICE Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2023-11-23 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-03-29 2024-05-27 2024-06-19
2024-07-04 2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Cotton No. 2 Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2008-11-26 14:15:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2008-12-26 14:15:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:05:00
2016-11-25 13:00:00
2017-11-23 13:30:00
2017-11-24 13:30:00
2017-12-24 13:05:00
2019-11-29 13:30:00
2019-12-24 13:05:00

Late Opens

The following table shows the late opens for the Cotton No. 2 Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-12-28 07:30:00
2010-12-27 07:30:00
2010-12-28 07:30:00
2011-12-27 07:30:00
2012-12-26 07:30:00
2013-01-02 07:30:00
2013-07-05 08:00:00
2013-11-29 08:00:00
2013-12-26 08:00:00
2014-01-02 08:00:00
2014-07-07 08:00:00
2014-11-28 08:00:00
2014-12-26 08:00:00
2015-01-02 08:00:00
2015-11-27 08:00:00
2015-12-28 08:00:00
2016-11-25 08:00:00
2017-11-24 08:00:00
2017-12-26 08:00:00
2018-11-23 08:00:00
2018-12-26 08:00:00
2019-11-29 08:00:00
2019-12-26 08:00:00

Time Zone

The Cotton No. 2 Futures contract in the ICE Future market trades in the America/New York time zone.

 

ICE

DX

Introduction

This page shows the trading hours, holidays, and time zone of the US Dollar Index Futures contract in the ICE Future market.

Historical data for backtesting is unavailable for ICE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US Dollar Index Futures contract in the ICE Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 20:00:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 20:00:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 20:00:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 20:00:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US Dollar Index Futures contract in the ICE Future market:

Date ( yyyy-mm-dd )
2023-01-02 2023-12-25 2024-01-01

Early Closes

The following table shows the early closes for the US Dollar Index Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2007-12-24 13:15:00
2007-12-31 16:15:00
2008-01-21 13:00:00
2008-02-18 13:00:00
2008-03-20 16:15:00
2008-07-03 16:15:00
2008-07-04 13:00:00
2008-08-29 16:15:00
2008-09-01 13:00:00
2008-11-26 17:00:00
2008-11-27 13:00:00
2008-11-28 13:15:00
2008-12-24 13:15:00
2008-12-26 17:00:00
2008-12-31 17:00:00
2009-01-02 17:00:00
2009-01-16 16:15:00
2009-01-19 13:00:00
2009-02-13 16:15:00
2009-02-16 13:00:00
2009-04-09 16:15:00
2009-05-22 16:15:00
2009-05-25 13:00:00
2009-07-02 16:15:00
2009-07-03 13:00:00
2009-09-04 16:15:00
2009-09-07 13:00:00
2009-10-09 16:15:00
2009-11-25 17:00:00
2009-11-26 13:00:00
2009-11-27 13:15:00
2009-12-24 13:15:00
2009-12-31 17:00:00
2010-01-15 16:15:00
2010-01-18 13:00:00
2010-02-12 16:15:00
2010-02-15 13:00:00
2010-04-02 11:15:00
2010-05-28 16:15:00
2010-05-31 13:00:00
2010-07-02 16:15:00
2010-07-05 13:00:00
2010-09-03 16:15:00
2010-09-06 13:00:00
2010-10-08 16:15:00
2010-11-25 13:00:00
2010-11-26 13:15:00
2010-12-23 17:00:00
2010-12-31 13:15:00
2011-01-14 16:15:00
2011-01-17 13:00:00
2011-02-18 16:15:00
2011-02-21 13:00:00
2011-05-27 16:15:00
2011-05-30 13:00:00
2011-07-01 16:15:00
2011-07-04 13:00:00
2011-09-02 16:15:00
2011-09-05 13:00:00
2011-10-07 16:15:00
2011-11-24 13:00:00
2011-11-25 13:15:00
2012-02-17 16:15:00
2012-02-20 13:00:00
2012-04-06 11:15:00
2012-05-25 16:15:00
2012-05-28 13:00:00
2012-07-04 13:00:00
2012-08-31 16:15:00
2012-09-03 13:00:00
2012-10-05 16:15:00
2012-11-22 13:00:00
2012-11-23 13:15:00
2012-12-24 13:15:00
2013-02-15 16:15:00
2013-02-18 13:00:00
2013-05-24 16:15:00
2013-05-27 13:00:00
2013-07-04 13:00:00
2013-08-30 16:15:00
2013-09-02 13:00:00
2013-11-28 13:00:00
2013-11-29 13:15:00
2013-12-24 13:15:00
2014-01-17 16:15:00
2014-01-20 13:00:00
2014-02-14 16:15:00
2014-02-17 13:00:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:15:00
2014-12-24 13:15:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-04-03 11:15:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:15:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:15:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:15:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:15:00
2018-12-24 13:15:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:15:00
2019-12-24 13:15:00
2020-01-20 13:00:00

Late Opens

The following table shows the late opens for the US Dollar Index Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2008-12-26 06:00:00
2009-01-02 06:00:00
2011-12-27 06:00:00
2012-01-03 06:00:00
2012-12-26 06:00:00
2013-01-02 06:00:00
2013-12-26 06:00:00
2014-01-02 06:00:00

Time Zone

The US Dollar Index Futures contract in the ICE Future market trades in the America/New York time zone.

 

ICE

G

Introduction

This page shows the trading hours, holidays, and time zone of the Low Sulfur Gasoil contract in the ICE Future market.

Historical data for backtesting is unavailable for ICE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Low Sulfur Gasoil contract in the ICE Future market:

Weekday Time (America/New York)
Sunday 20:00:00 to 24:00:00
Monday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Tuesday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Wednesday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Thursday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Friday 00:00:00 to 18:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Low Sulfur Gasoil contract in the ICE Future market:

Date ( yyyy-mm-dd )
2023-01-02 2023-04-07 2023-12-25 2024-01-01

Early Closes

The following table shows the early closes for the Low Sulfur Gasoil contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2013-01-21 13:30:00
2013-02-18 13:30:00
2013-05-27 13:30:00
2013-07-04 13:30:00
2013-09-02 13:30:00
2013-11-28 13:30:00
2013-11-29 14:00:00
2013-12-24 14:00:00
2013-12-31 15:00:00
2014-01-20 13:30:00
2014-02-17 13:30:00
2014-05-26 13:30:00
2014-07-04 13:30:00
2014-09-01 13:30:00
2014-11-27 13:30:00
2014-11-28 14:00:00
2014-12-24 14:00:00
2014-12-31 15:00:00
2015-01-19 13:30:00
2015-02-16 13:30:00
2015-06-03 13:30:00
2015-07-03 13:30:00
2015-09-07 13:30:00
2015-11-26 13:30:00
2015-11-27 14:00:00
2015-12-24 14:00:00
2015-12-31 15:00:00
2016-01-18 13:30:00
2016-02-15 13:30:00
2016-05-30 13:30:00
2016-07-04 13:30:00
2016-09-05 13:30:00
2016-11-26 13:30:00
2016-11-27 14:00:00
2016-12-24 14:00:00
2016-12-30 15:00:00
2017-09-04 13:30:00
2017-11-23 13:30:00
2017-11-24 14:00:00
2017-12-22 17:00:00
2017-12-29 17:00:00
2018-07-04 13:30:00
2018-09-03 13:30:00
2018-11-22 13:30:00
2018-11-23 14:00:00
2018-12-24 17:00:00
2018-12-31 17:00:00
2019-05-27 13:30:00
2019-07-04 13:30:00
2019-09-02 13:30:00
2019-11-28 13:30:00
2019-11-29 14:00:00
2019-12-24 14:00:00
2019-12-31 15:00:00
2020-05-25 13:30:00
2020-07-03 13:30:00
2020-09-07 13:30:00
2020-11-26 13:30:00
2020-11-27 14:00:00
2020-12-24 14:00:00
2020-12-31 15:00:00

Late Opens

There are no days with late opens.

Time Zone

The Low Sulfur Gasoil contract in the ICE Future market trades in the America/New York time zone.

 

ICE

KC

Introduction

This page shows the trading hours, holidays, and time zone of the Coffee C Arabica Futures contract in the ICE Future market.

Historical data for backtesting is unavailable for ICE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Coffee C Arabica Futures contract in the ICE Future market:

Weekday Time (America/New York)
Monday 04:15:00 to 13:30:00
Tuesday 04:15:00 to 13:30:00
Wednesday 04:15:00 to 13:30:00
Thursday 04:15:00 to 13:30:00
Friday 04:15:00 to 13:30:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the ICE Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2023-11-23 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-03-29 2024-05-27 2024-06-19
2024-07-04 2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Coffee C Arabica Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2008-11-26 14:15:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2008-12-26 14:15:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:05:00
2016-11-25 13:00:00
2017-12-24 13:05:00
2019-12-24 13:05:00

Late Opens

The following table shows the late opens for the Coffee C Arabica Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-12-28 07:30:00
2010-12-27 07:30:00
2010-12-28 07:30:00
2011-12-27 07:30:00
2012-04-09 07:30:00
2012-12-26 07:30:00
2013-01-02 07:30:00
2013-04-01 07:30:00
2013-12-26 08:00:00
2014-01-02 08:00:00
2014-04-21 07:30:00
2014-12-26 08:00:00
2015-01-02 08:00:00
2015-04-06 07:30:00
2015-12-28 08:00:00
2016-12-27 08:00:00
2017-04-17 07:30:00
2017-12-26 08:00:00
2018-04-02 07:30:00
2018-12-26 08:00:00
2019-04-22 07:30:00
2019-12-26 08:00:00

Time Zone

The Coffee C Arabica Futures contract in the ICE Future market trades in the America/New York time zone.

 

ICE

OJ

Introduction

This page shows the trading hours, holidays, and time zone of the Frozen Concentrated Orange Juice contract in the ICE Future market.

Historical data for backtesting is unavailable for ICE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Frozen Concentrated Orange Juice contract in the ICE Future market:

Weekday Time (America/New York)
Monday 08:00:00 to 14:00:00
Tuesday 08:00:00 to 14:00:00
Wednesday 08:00:00 to 14:00:00
Thursday 08:00:00 to 14:00:00
Friday 08:00:00 to 14:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the ICE Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2023-11-23 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-03-29 2024-05-27 2024-06-19
2024-07-04 2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Frozen Concentrated Orange Juice contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2008-11-26 14:15:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2008-12-26 14:15:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:05:00
2016-11-25 13:00:00
2017-11-23 13:30:00
2017-11-24 13:30:00
2017-12-24 13:05:00
2019-11-29 13:30:00
2019-12-24 13:05:00

Late Opens

The following table shows the late opens for the Frozen Concentrated Orange Juice contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2012-12-26 07:30:00

Time Zone

The Frozen Concentrated Orange Juice contract in the ICE Future market trades in the America/New York time zone.

 

ICE

SB

Introduction

This page shows the trading hours, holidays, and time zone of the Sugar No. 11 Futures contract in the ICE Future market.

Historical data for backtesting is unavailable for ICE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Sugar No. 11 Futures contract in the ICE Future market:

Weekday Time (America/New York)
Monday 03:30:00 to 13:00:00
Tuesday 03:30:00 to 13:00:00
Wednesday 03:30:00 to 13:00:00
Thursday 03:30:00 to 13:00:00
Friday 03:30:00 to 13:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the ICE Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2023-11-23 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-03-29 2024-05-27 2024-06-19
2024-07-04 2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Sugar No. 11 Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2008-11-26 14:15:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2008-12-26 14:15:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00

Late Opens

The following table shows the late opens for the Sugar No. 11 Futures contract in the ICE Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-12-28 07:30:00
2010-12-27 07:30:00
2010-12-28 07:30:00
2011-12-27 07:30:00
2012-04-09 07:30:00
2012-12-26 07:30:00
2013-01-02 07:30:00
2013-04-01 07:30:00
2013-12-26 08:00:00
2014-01-02 08:00:00
2014-04-21 07:30:00
2014-12-26 08:00:00
2015-01-02 08:00:00
2015-04-06 07:30:00
2015-12-28 08:00:00
2016-12-27 08:00:00
2017-04-17 07:30:00
2017-12-26 08:00:00
2018-04-02 07:30:00
2018-12-26 08:00:00
2019-04-22 07:30:00
2019-12-26 08:00:00

Time Zone

The Sugar No. 11 Futures contract in the ICE Future market trades in the America/New York time zone.

 

Market Hours

INDIA

Introduction

This page shows the trading hours, holidays, and time zone of the INDIA Future market.

Historical data for backtesting is unavailable for INDIA. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

The following table shows the pre-market hours for the INDIA Future market:

Weekday Time (Asia/Kolkata)
Monday 09:00:00 to 09:15:00
Tuesday 09:00:00 to 09:15:00
Wednesday 09:00:00 to 09:15:00
Thursday 09:00:00 to 09:15:00
Friday 09:00:00 to 09:15:00

Regular Trading Hours

The following table shows the regular trading hours for the INDIA Future market:

Weekday Time (Asia/Kolkata)
Monday 09:15:00 to 15:30:00
Tuesday 09:15:00 to 15:30:00
Wednesday 09:15:00 to 15:30:00
Thursday 09:15:00 to 15:30:00
Friday 09:15:00 to 15:30:00

Post-market Hours

The following table shows the post-market hours for the INDIA Future market:

Weekday Time (Asia/Kolkata)
Monday 15:40:00 to 16:00:00
Tuesday 15:40:00 to 16:00:00
Wednesday 15:40:00 to 16:00:00
Thursday 15:40:00 to 16:00:00
Friday 15:40:00 to 16:00:00

Holidays

The following table shows the dates of holidays for the INDIA Future market:

Date ( yyyy-mm-dd )
2004-01-26 2004-04-14 2005-01-26 2005-04-14 2005-08-15
2006-01-26 2006-04-14 2006-05-01 2006-08-15 2006-10-02
2006-12-25 2007-01-26 2007-05-01 2007-08-15 2007-10-02
2007-12-25 2008-04-14 2008-05-01 2008-08-15 2008-10-02
2008-12-25 2009-01-26 2009-04-14 2009-05-01 2009-10-02
2009-12-25 2010-01-26 2010-04-14 2011-01-26 2011-03-02
2011-04-12 2011-04-14 2011-04-22 2011-08-15 2011-08-31
2011-09-01 2011-10-06 2011-10-26 2011-10-27 2011-11-07
2011-11-10 2011-12-06 2012-01-26 2012-02-20 2012-03-08
2012-04-05 2012-04-06 2012-05-01 2012-08-15 2012-08-20
2012-09-19 2012-10-02 2012-10-24 2012-11-14 2012-11-28
2012-12-25 2013-03-27 2013-03-29 2013-04-19 2013-04-24
2013-05-01 2013-08-09 2013-08-15 2013-09-09 2013-10-02
2013-10-16 2013-11-04 2013-11-15 2013-12-25 2014-02-27
2014-03-17 2014-04-08 2014-04-14 2014-04-18 2014-04-24
2014-05-01 2014-07-29 2014-08-15 2014-08-29 2014-10-02
2014-10-03 2014-10-06 2014-10-15 2014-10-24 2014-11-04
2014-11-06 2014-12-25 2015-01-26 2015-02-17 2015-03-06
2015-04-02 2015-04-03 2015-04-14 2015-05-01 2015-09-17
2015-09-25 2015-10-02 2015-10-22 2015-11-12 2015-11-25
2015-12-25 2016-01-26 2016-03-07 2016-03-24 2016-03-25
2016-04-14 2016-04-15 2016-04-19 2016-07-06 2016-08-15
2016-09-05 2016-09-13 2016-10-11 2016-10-12 2016-10-31
2016-11-14 2017-01-26 2017-02-24 2017-03-13 2017-04-04
2017-04-14 2017-05-01 2017-06-26 2017-08-15 2017-08-25
2017-10-02 2017-10-20 2017-12-25 2018-01-26 2018-02-13
2018-03-02 2018-03-29 2018-03-30 2018-05-01 2018-08-15
2018-08-22 2018-09-13 2018-09-20 2018-10-02 2018-10-18
2018-11-08 2018-11-23 2018-12-25 2019-03-04 2019-03-21
2019-04-17 2019-04-19 2019-04-29 2019-05-01 2019-06-05
2019-08-12 2019-08-15 2019-09-02 2019-09-10 2019-10-02
2019-10-08 2019-10-21 2019-10-28 2019-11-12 2019-12-25
2020-02-21 2020-03-10 2020-04-02 2020-04-06 2020-04-10
2020-04-14 2020-05-01 2020-05-25 2020-10-02 2020-11-16
2020-11-30 2020-12-25 2021-01-26 2021-03-11 2021-03-29
2021-04-02 2021-04-14 2021-04-21 2021-05-13 2021-07-21
2021-08-19 2021-09-10 2021-10-15 2021-11-05 2021-11-19
2022-01-26 2022-04-14 2022-08-15 2023-01-26 2023-04-14
2023-05-01 2023-08-15 2023-10-02 2023-12-25 2024-01-26
2024-05-01 2024-08-15 2024-10-02 2024-12-25 2025-04-14
2025-05-01

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The INDIA Future market trades in the Asia/Kolkata time zone.

 

Market Hours

NFO

Introduction

This page shows the trading hours, holidays, and time zone of the NFO Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NFO Future market:

Weekday Time (Asia/Kolkata)
Monday 09:15:00 to 15:30:00
Tuesday 09:15:00 to 15:30:00
Wednesday 09:15:00 to 15:30:00
Thursday 09:15:00 to 15:30:00
Friday 09:15:00 to 15:30:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NFO Future market:

Date ( yyyy-mm-dd )
2004-01-26 2004-04-14 2005-01-26 2005-04-14 2005-08-15
2006-01-26 2006-04-14 2006-05-01 2006-08-15 2006-10-02
2006-12-25 2007-01-26 2007-05-01 2007-08-15 2007-10-02
2007-12-25 2008-04-14 2008-05-01 2008-08-15 2008-10-02
2008-12-25 2009-01-26 2009-04-14 2009-05-01 2009-10-02
2009-12-25 2010-01-26 2010-04-14 2011-01-26 2011-03-02
2011-04-12 2011-04-14 2011-04-22 2011-08-15 2011-08-31
2011-09-01 2011-10-06 2011-10-26 2011-10-27 2011-11-07
2011-11-10 2011-12-06 2012-01-26 2012-02-20 2012-03-08
2012-04-05 2012-04-06 2012-05-01 2012-08-15 2012-08-20
2012-09-19 2012-10-02 2012-10-24 2012-11-14 2012-11-28
2012-12-25 2013-03-27 2013-03-29 2013-04-19 2013-04-24
2013-05-01 2013-08-09 2013-08-15 2013-09-09 2013-10-02
2013-10-16 2013-11-04 2013-11-15 2013-12-25 2014-02-27
2014-03-17 2014-04-08 2014-04-14 2014-04-18 2014-04-24
2014-05-01 2014-07-29 2014-08-15 2014-08-29 2014-10-02
2014-10-03 2014-10-06 2014-10-15 2014-10-24 2014-11-04
2014-11-06 2014-12-25 2015-01-26 2015-02-17 2015-03-06
2015-04-02 2015-04-03 2015-04-14 2015-05-01 2015-09-17
2015-09-25 2015-10-02 2015-10-22 2015-11-12 2015-11-25
2015-12-25 2016-01-26 2016-03-07 2016-03-24 2016-03-25
2016-04-14 2016-04-15 2016-04-19 2016-07-06 2016-08-15
2016-09-05 2016-09-13 2016-10-11 2016-10-12 2016-10-31
2016-11-14 2017-01-26 2017-02-24 2017-03-13 2017-04-04
2017-04-14 2017-05-01 2017-06-26 2017-08-15 2017-08-25
2017-10-02 2017-10-20 2017-12-25 2018-01-26 2018-02-13
2018-03-02 2018-03-29 2018-03-30 2018-05-01 2018-08-15
2018-08-22 2018-09-13 2018-09-20 2018-10-02 2018-10-18
2018-11-08 2018-11-23 2018-12-25 2019-03-04 2019-03-21
2019-04-17 2019-04-19 2019-04-29 2019-05-01 2019-06-05
2019-08-12 2019-08-15 2019-09-02 2019-09-10 2019-10-02
2019-10-08 2019-10-21 2019-10-28 2019-11-12 2019-12-25
2020-02-21 2020-03-10 2020-04-02 2020-04-06 2020-04-10
2020-04-14 2020-05-01 2020-05-25 2020-10-02 2020-11-16
2020-11-30 2020-12-25 2021-01-26 2021-03-11 2021-03-29
2021-04-02 2021-04-14 2021-04-21 2021-05-13 2021-07-21
2021-08-19 2021-09-10 2021-10-15 2021-11-05 2021-11-19
2022-01-26 2022-04-14 2022-08-15 2023-01-26 2023-04-14
2023-05-01 2023-08-15 2023-10-02 2023-12-25 2024-01-26
2024-05-01 2024-08-15 2024-10-02 2024-12-25 2025-04-14
2025-05-01

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The NFO Future market trades in the Asia/Kolkata time zone.

 

Market Hours

NYMEX

Introduction

This page shows the trading hours, holidays, and time zone of the NYMEX Future market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 24:00:00
Tuesday 00:00:00 to 24:00:00
Wednesday 00:00:00 to 24:00:00
Thursday 00:00:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NYMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The NYMEX Future market trades in the following time zones:

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall NYMEX Future market:

Symbol Name
1S Propane Non-LDH Mont Belvieu (OPIS) BALMO Futures
22 Argus Propane Far East Index BALMO Futures
A0D Mini European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures
A0F Mini Singapore Fuel Oil 180 cst (Platts) Futures
A1L Gulf Coast ULSD (Platts) Up-Down BALMO Futures
A1M Gulf Coast Jet (Platts) Up-Down BALMO Futures
A1R Propane Non-LDH Mont Belvieu (OPIS) Futures
A32 European Propane CIF ARA (Argus) BALMO Futures
A3G Premium Unleaded Gasoline 10 ppm FOB MED (Platts) Futures
A7E Argus Propane Far East Index Futures
A7I Gasoline Euro-bob Oxy NWE Barges (Argus) Crack Spread BALMO Futures
A7Q Mont Belvieu Natural Gasoline (OPIS) Futures
A8J Mont Belvieu Normal Butane (OPIS) BALMO Futures
A8K Conway Propane (OPIS) Futures
A8O Mont Belvieu LDH Propane (OPIS) BALMO Futures
A91 Argus Propane Far East Index vs. European Propane CIF ARA (Argus) Futures
A9N Argus Propane (Saudi Aramco) Futures
AA6 Group Three ULSD (Platts) vs. NY Harbor ULSD Futures
AA8 Group Three Sub-octane Gasoline (Platts) vs. RBOB Futures
ABS Singapore Fuel Oil 180 cst (Platts) BALMO Futures
ABT Singapore Fuel Oil 380 cst (Platts) BALMO Futures
AC0 Mont Belvieu Ethane (OPIS) Futures
AD0 Mont Belvieu Normal Butane (OPIS) Futures
ADB Brent Crude Oil vs. Dubai Crude Oil (Platts) Futures
AE5 Argus LLS vs. WTI (Argus) Trade Month Futures
AGA Singapore Gasoil (Platts) vs. Low Sulphur Gasoil Futures
AJL Los Angeles CARBOB Gasoline (OPIS) vs. RBOB Gasoline Futures
AJS Los Angeles Jet (OPIS) vs. NY Harbor ULSD Futures
AKL Los Angeles CARB Diesel (OPIS) vs. NY Harbor ULSD Futures
AKZ European Naphtha (Platts) BALMO Futures
APS European Propane CIF ARA (Argus) Futures
AR0 Mont Belvieu Natural Gasoline (OPIS) BALMO Futures
ARE RBOB Gasoline Crack Spread Futures
AVZ Gulf Coast HSFO (Platts) BALMO Futures
AYV Mars (Argus) vs. WTI Trade Month Futures
AYX Mars (Argus) vs. WTI Financial Futures
AZ1 Ethanol T2 FOB Rdam Including Duty (Platts) Futures
B0 Mont Belvieu LDH Propane (OPIS) Futures
B7H Gasoline Euro-bob Oxy NWE Barges (Argus) Futures
BK WTI-Brent Financial Futures
BOO 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread (1000mt) Futures
BR7 Gasoline Euro-bob Oxy NWE Barges (Argus) BALMO Futures
BZ Brent Last Day Financial Futures
CL Crude Oil Futures
CRB Gulf Coast CBOB Gasoline A2 (Platts) vs. RBOB Gasoline Futures
CSW Clearbrook Bakken Sweet (NE2) Monthly Index Futures
CSX WTI Financial Futures
CU Chicago Ethanol (Platts) Futures
D1N Singapore Mogas 92 Unleaded (Platts) Brent Crack Spread Futures
DCB Dubai Crude Oil (Platts) Financial Futures
E6 Japan C&F Naphtha (Platts) BALMO Futures
EN European Naphtha (Platts) Crack Spread Futures
EPN European Propane CIF ARA (Argus) vs. Naphtha Cargoes CIF NWE (Platts) Futures
EVC Singapore Fuel Oil 380 cst (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures
EWG East-West Gasoline Spread (Platts-Argus) Futures
EWN East-West Naphtha: Japan C&F vs. Cargoes CIF NWE Spread (Platts) Futures
EXR RBOB Gasoline vs. Euro-bob Oxy NWE Barges (Argus) (350000 gallons) Futures
FO 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread Futures
FRC Freight Route TC14 (Baltic) Futures
FSS 1% Fuel Oil Cargoes FOB NWE (Platts) vs. 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures
GCU Gulf Coast HSFO (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures
HCL WTI Houston Crude Oil Futures
HH Natural Gas (Henry Hub) Last-day Financial Futures
HO NY Harbor ULSD Futures
HP Natural Gas (Henry Hub) Penultimate Financial Futures
HRC U.S. Midwest Domestic Hot-Rolled Coil Steel (CRU) Index Futures
HTT WTI Houston (Argus) vs. WTI Trade Month Futures
M1B Micro Gasoil 0.1% Barges FOB ARA (Platts) Futures
M35 Micro European 3.5% Fuel Oil Cargoes FOB Med (Platts) Futures
M5F Micro Coal (API 5) fob Newcastle (Argus/McCloskey) Futures
MAF Micro Singapore Fuel Oil 380CST (Platts) Futures
MCL Micro WTI Crude Oil Futures
MEF Micro European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures
NG Henry Hub Natural Gas Futures
PA Palladium Futures
PAM Micro Palladium Futures
PL Platinum Futures
R5O Micro European FOB Rdam Marine Fuel 0.5% Barges (Platts) Futures
RB RBOB Gasoline Futures
S5O Micro Singapore FOB Marine Fuel 0.5% (Platts) Futures
YO No. 11 Sugar Futures

 

NYMEX

1S

Introduction

This page shows the trading hours, holidays, and time zone of the Propane Non-LDH Mont Belvieu (OPIS) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Propane Non-LDH Mont Belvieu (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Propane Non-LDH Mont Belvieu (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Propane Non-LDH Mont Belvieu (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Propane Non-LDH Mont Belvieu (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Propane Non-LDH Mont Belvieu (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Propane Non-LDH Mont Belvieu (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Propane Non-LDH Mont Belvieu (OPIS) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

22

Introduction

This page shows the trading hours, holidays, and time zone of the Argus Propane Far East Index BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Argus Propane Far East Index BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Argus Propane Far East Index BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Argus Propane Far East Index BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Argus Propane Far East Index BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Argus Propane Far East Index BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Argus Propane Far East Index BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Argus Propane Far East Index BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A0D

Introduction

This page shows the trading hours, holidays, and time zone of the Mini European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mini European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mini European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mini European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mini European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mini European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mini European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mini European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A0F

Introduction

This page shows the trading hours, holidays, and time zone of the Mini Singapore Fuel Oil 180 cst (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mini Singapore Fuel Oil 180 cst (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mini Singapore Fuel Oil 180 cst (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mini Singapore Fuel Oil 180 cst (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mini Singapore Fuel Oil 180 cst (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mini Singapore Fuel Oil 180 cst (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mini Singapore Fuel Oil 180 cst (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mini Singapore Fuel Oil 180 cst (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A1L

Introduction

This page shows the trading hours, holidays, and time zone of the Gulf Coast ULSD (Platts) Up-Down BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Gulf Coast ULSD (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Gulf Coast ULSD (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Gulf Coast ULSD (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Gulf Coast ULSD (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Gulf Coast ULSD (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Gulf Coast ULSD (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Gulf Coast ULSD (Platts) Up-Down BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A1M

Introduction

This page shows the trading hours, holidays, and time zone of the Gulf Coast Jet (Platts) Up-Down BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Gulf Coast Jet (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Gulf Coast Jet (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Gulf Coast Jet (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Gulf Coast Jet (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Gulf Coast Jet (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Gulf Coast Jet (Platts) Up-Down BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Gulf Coast Jet (Platts) Up-Down BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A1R

Introduction

This page shows the trading hours, holidays, and time zone of the Propane Non-LDH Mont Belvieu (OPIS) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Propane Non-LDH Mont Belvieu (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Propane Non-LDH Mont Belvieu (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Propane Non-LDH Mont Belvieu (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Propane Non-LDH Mont Belvieu (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Propane Non-LDH Mont Belvieu (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Propane Non-LDH Mont Belvieu (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Propane Non-LDH Mont Belvieu (OPIS) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A32

Introduction

This page shows the trading hours, holidays, and time zone of the European Propane CIF ARA (Argus) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the European Propane CIF ARA (Argus) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the European Propane CIF ARA (Argus) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the European Propane CIF ARA (Argus) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the European Propane CIF ARA (Argus) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the European Propane CIF ARA (Argus) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the European Propane CIF ARA (Argus) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The European Propane CIF ARA (Argus) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A3G

Introduction

This page shows the trading hours, holidays, and time zone of the Premium Unleaded Gasoline 10 ppm FOB MED (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Premium Unleaded Gasoline 10 ppm FOB MED (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Premium Unleaded Gasoline 10 ppm FOB MED (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Premium Unleaded Gasoline 10 ppm FOB MED (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Premium Unleaded Gasoline 10 ppm FOB MED (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Premium Unleaded Gasoline 10 ppm FOB MED (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Premium Unleaded Gasoline 10 ppm FOB MED (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Premium Unleaded Gasoline 10 ppm FOB MED (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A7E

Introduction

This page shows the trading hours, holidays, and time zone of the Argus Propane Far East Index Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Argus Propane Far East Index Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Argus Propane Far East Index Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Argus Propane Far East Index Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Argus Propane Far East Index Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Argus Propane Far East Index Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Argus Propane Far East Index Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Argus Propane Far East Index Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A7I

Introduction

This page shows the trading hours, holidays, and time zone of the Gasoline Euro-bob Oxy NWE Barges (Argus) Crack Spread BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Gasoline Euro-bob Oxy NWE Barges (Argus) Crack Spread BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Gasoline Euro-bob Oxy NWE Barges (Argus) Crack Spread BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Gasoline Euro-bob Oxy NWE Barges (Argus) Crack Spread BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Gasoline Euro-bob Oxy NWE Barges (Argus) Crack Spread BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Gasoline Euro-bob Oxy NWE Barges (Argus) Crack Spread BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Gasoline Euro-bob Oxy NWE Barges (Argus) Crack Spread BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Gasoline Euro-bob Oxy NWE Barges (Argus) Crack Spread BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A7Q

Introduction

This page shows the trading hours, holidays, and time zone of the Mont Belvieu Natural Gasoline (OPIS) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mont Belvieu Natural Gasoline (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mont Belvieu Natural Gasoline (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mont Belvieu Natural Gasoline (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mont Belvieu Natural Gasoline (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mont Belvieu Natural Gasoline (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mont Belvieu Natural Gasoline (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mont Belvieu Natural Gasoline (OPIS) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A8J

Introduction

This page shows the trading hours, holidays, and time zone of the Mont Belvieu Normal Butane (OPIS) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mont Belvieu Normal Butane (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mont Belvieu Normal Butane (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mont Belvieu Normal Butane (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mont Belvieu Normal Butane (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mont Belvieu Normal Butane (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mont Belvieu Normal Butane (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mont Belvieu Normal Butane (OPIS) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A8K

Introduction

This page shows the trading hours, holidays, and time zone of the Conway Propane (OPIS) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Conway Propane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Conway Propane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Conway Propane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Conway Propane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Conway Propane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Conway Propane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Conway Propane (OPIS) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A8O

Introduction

This page shows the trading hours, holidays, and time zone of the Mont Belvieu LDH Propane (OPIS) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mont Belvieu LDH Propane (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mont Belvieu LDH Propane (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mont Belvieu LDH Propane (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mont Belvieu LDH Propane (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mont Belvieu LDH Propane (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mont Belvieu LDH Propane (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mont Belvieu LDH Propane (OPIS) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A91

Introduction

This page shows the trading hours, holidays, and time zone of the Argus Propane Far East Index vs. European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Argus Propane Far East Index vs. European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Argus Propane Far East Index vs. European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Argus Propane Far East Index vs. European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Argus Propane Far East Index vs. European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Argus Propane Far East Index vs. European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Argus Propane Far East Index vs. European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Argus Propane Far East Index vs. European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

A9N

Introduction

This page shows the trading hours, holidays, and time zone of the Argus Propane (Saudi Aramco) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Argus Propane (Saudi Aramco) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Argus Propane (Saudi Aramco) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Argus Propane (Saudi Aramco) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Argus Propane (Saudi Aramco) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Argus Propane (Saudi Aramco) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Argus Propane (Saudi Aramco) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Argus Propane (Saudi Aramco) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AA6

Introduction

This page shows the trading hours, holidays, and time zone of the Group Three ULSD (Platts) vs. NY Harbor ULSD Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Group Three ULSD (Platts) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Group Three ULSD (Platts) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Group Three ULSD (Platts) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Group Three ULSD (Platts) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Group Three ULSD (Platts) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Group Three ULSD (Platts) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Group Three ULSD (Platts) vs. NY Harbor ULSD Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AA8

Introduction

This page shows the trading hours, holidays, and time zone of the Group Three Sub-octane Gasoline (Platts) vs. RBOB Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Group Three Sub-octane Gasoline (Platts) vs. RBOB Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Group Three Sub-octane Gasoline (Platts) vs. RBOB Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Group Three Sub-octane Gasoline (Platts) vs. RBOB Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Group Three Sub-octane Gasoline (Platts) vs. RBOB Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Group Three Sub-octane Gasoline (Platts) vs. RBOB Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Group Three Sub-octane Gasoline (Platts) vs. RBOB Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Group Three Sub-octane Gasoline (Platts) vs. RBOB Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

ABS

Introduction

This page shows the trading hours, holidays, and time zone of the Singapore Fuel Oil 180 cst (Platts) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Singapore Fuel Oil 180 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Singapore Fuel Oil 180 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Singapore Fuel Oil 180 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Singapore Fuel Oil 180 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Singapore Fuel Oil 180 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Singapore Fuel Oil 180 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Singapore Fuel Oil 180 cst (Platts) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

ABT

Introduction

This page shows the trading hours, holidays, and time zone of the Singapore Fuel Oil 380 cst (Platts) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Singapore Fuel Oil 380 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Singapore Fuel Oil 380 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Singapore Fuel Oil 380 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Singapore Fuel Oil 380 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Singapore Fuel Oil 380 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Singapore Fuel Oil 380 cst (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Singapore Fuel Oil 380 cst (Platts) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AC0

Introduction

This page shows the trading hours, holidays, and time zone of the Mont Belvieu Ethane (OPIS) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mont Belvieu Ethane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mont Belvieu Ethane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mont Belvieu Ethane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mont Belvieu Ethane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mont Belvieu Ethane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mont Belvieu Ethane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mont Belvieu Ethane (OPIS) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AD0

Introduction

This page shows the trading hours, holidays, and time zone of the Mont Belvieu Normal Butane (OPIS) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mont Belvieu Normal Butane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mont Belvieu Normal Butane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mont Belvieu Normal Butane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mont Belvieu Normal Butane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mont Belvieu Normal Butane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mont Belvieu Normal Butane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mont Belvieu Normal Butane (OPIS) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

ADB

Introduction

This page shows the trading hours, holidays, and time zone of the Brent Crude Oil vs. Dubai Crude Oil (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Brent Crude Oil vs. Dubai Crude Oil (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Brent Crude Oil vs. Dubai Crude Oil (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Brent Crude Oil vs. Dubai Crude Oil (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Brent Crude Oil vs. Dubai Crude Oil (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Brent Crude Oil vs. Dubai Crude Oil (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Brent Crude Oil vs. Dubai Crude Oil (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Brent Crude Oil vs. Dubai Crude Oil (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AE5

Introduction

This page shows the trading hours, holidays, and time zone of the Argus LLS vs. WTI (Argus) Trade Month Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Argus LLS vs. WTI (Argus) Trade Month Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Argus LLS vs. WTI (Argus) Trade Month Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Argus LLS vs. WTI (Argus) Trade Month Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Argus LLS vs. WTI (Argus) Trade Month Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Argus LLS vs. WTI (Argus) Trade Month Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Argus LLS vs. WTI (Argus) Trade Month Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Argus LLS vs. WTI (Argus) Trade Month Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AGA

Introduction

This page shows the trading hours, holidays, and time zone of the Singapore Gasoil (Platts) vs. Low Sulphur Gasoil Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Singapore Gasoil (Platts) vs. Low Sulphur Gasoil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Singapore Gasoil (Platts) vs. Low Sulphur Gasoil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Singapore Gasoil (Platts) vs. Low Sulphur Gasoil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Singapore Gasoil (Platts) vs. Low Sulphur Gasoil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Singapore Gasoil (Platts) vs. Low Sulphur Gasoil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Singapore Gasoil (Platts) vs. Low Sulphur Gasoil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Singapore Gasoil (Platts) vs. Low Sulphur Gasoil Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AJL

Introduction

This page shows the trading hours, holidays, and time zone of the Los Angeles CARBOB Gasoline (OPIS) vs. RBOB Gasoline Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Los Angeles CARBOB Gasoline (OPIS) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Los Angeles CARBOB Gasoline (OPIS) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Los Angeles CARBOB Gasoline (OPIS) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Los Angeles CARBOB Gasoline (OPIS) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Los Angeles CARBOB Gasoline (OPIS) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Los Angeles CARBOB Gasoline (OPIS) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Los Angeles CARBOB Gasoline (OPIS) vs. RBOB Gasoline Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AJS

Introduction

This page shows the trading hours, holidays, and time zone of the Los Angeles Jet (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Los Angeles Jet (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Los Angeles Jet (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Los Angeles Jet (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Los Angeles Jet (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Los Angeles Jet (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Los Angeles Jet (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Los Angeles Jet (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AKL

Introduction

This page shows the trading hours, holidays, and time zone of the Los Angeles CARB Diesel (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Los Angeles CARB Diesel (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Los Angeles CARB Diesel (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Los Angeles CARB Diesel (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Los Angeles CARB Diesel (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Los Angeles CARB Diesel (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Los Angeles CARB Diesel (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Los Angeles CARB Diesel (OPIS) vs. NY Harbor ULSD Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AKZ

Introduction

This page shows the trading hours, holidays, and time zone of the European Naphtha (Platts) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the European Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the European Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the European Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the European Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the European Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the European Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The European Naphtha (Platts) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

APS

Introduction

This page shows the trading hours, holidays, and time zone of the European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The European Propane CIF ARA (Argus) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AR0

Introduction

This page shows the trading hours, holidays, and time zone of the Mont Belvieu Natural Gasoline (OPIS) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mont Belvieu Natural Gasoline (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mont Belvieu Natural Gasoline (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mont Belvieu Natural Gasoline (OPIS) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mont Belvieu Natural Gasoline (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mont Belvieu Natural Gasoline (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mont Belvieu Natural Gasoline (OPIS) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mont Belvieu Natural Gasoline (OPIS) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

ARE

Introduction

This page shows the trading hours, holidays, and time zone of the RBOB Gasoline Crack Spread Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the RBOB Gasoline Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the RBOB Gasoline Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the RBOB Gasoline Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the RBOB Gasoline Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the RBOB Gasoline Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the RBOB Gasoline Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The RBOB Gasoline Crack Spread Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AVZ

Introduction

This page shows the trading hours, holidays, and time zone of the Gulf Coast HSFO (Platts) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Gulf Coast HSFO (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Gulf Coast HSFO (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Gulf Coast HSFO (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Gulf Coast HSFO (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Gulf Coast HSFO (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Gulf Coast HSFO (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Gulf Coast HSFO (Platts) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AYV

Introduction

This page shows the trading hours, holidays, and time zone of the Mars (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mars (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mars (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mars (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mars (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mars (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mars (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mars (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AYX

Introduction

This page shows the trading hours, holidays, and time zone of the Mars (Argus) vs. WTI Financial Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mars (Argus) vs. WTI Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mars (Argus) vs. WTI Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mars (Argus) vs. WTI Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mars (Argus) vs. WTI Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mars (Argus) vs. WTI Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mars (Argus) vs. WTI Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mars (Argus) vs. WTI Financial Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

AZ1

Introduction

This page shows the trading hours, holidays, and time zone of the Ethanol T2 FOB Rdam Including Duty (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Ethanol T2 FOB Rdam Including Duty (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Ethanol T2 FOB Rdam Including Duty (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Ethanol T2 FOB Rdam Including Duty (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Ethanol T2 FOB Rdam Including Duty (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Ethanol T2 FOB Rdam Including Duty (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Ethanol T2 FOB Rdam Including Duty (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Ethanol T2 FOB Rdam Including Duty (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

B0

Introduction

This page shows the trading hours, holidays, and time zone of the Mont Belvieu LDH Propane (OPIS) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Mont Belvieu LDH Propane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Mont Belvieu LDH Propane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Mont Belvieu LDH Propane (OPIS) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Mont Belvieu LDH Propane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Mont Belvieu LDH Propane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Mont Belvieu LDH Propane (OPIS) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Mont Belvieu LDH Propane (OPIS) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

B7H

Introduction

This page shows the trading hours, holidays, and time zone of the Gasoline Euro-bob Oxy NWE Barges (Argus) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Gasoline Euro-bob Oxy NWE Barges (Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Gasoline Euro-bob Oxy NWE Barges (Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Gasoline Euro-bob Oxy NWE Barges (Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Gasoline Euro-bob Oxy NWE Barges (Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Gasoline Euro-bob Oxy NWE Barges (Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Gasoline Euro-bob Oxy NWE Barges (Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Gasoline Euro-bob Oxy NWE Barges (Argus) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

BK

Introduction

This page shows the trading hours, holidays, and time zone of the WTI-Brent Financial Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the WTI-Brent Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the WTI-Brent Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the WTI-Brent Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the WTI-Brent Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the WTI-Brent Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the WTI-Brent Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The WTI-Brent Financial Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

BOO

Introduction

This page shows the trading hours, holidays, and time zone of the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread (1000mt) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread (1000mt) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread (1000mt) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread (1000mt) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread (1000mt) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread (1000mt) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread (1000mt) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread (1000mt) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

BR7

Introduction

This page shows the trading hours, holidays, and time zone of the Gasoline Euro-bob Oxy NWE Barges (Argus) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Gasoline Euro-bob Oxy NWE Barges (Argus) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Gasoline Euro-bob Oxy NWE Barges (Argus) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Gasoline Euro-bob Oxy NWE Barges (Argus) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Gasoline Euro-bob Oxy NWE Barges (Argus) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Gasoline Euro-bob Oxy NWE Barges (Argus) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Gasoline Euro-bob Oxy NWE Barges (Argus) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Gasoline Euro-bob Oxy NWE Barges (Argus) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

BZ

Introduction

This page shows the trading hours, holidays, and time zone of the Brent Last Day Financial Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Brent Last Day Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Brent Last Day Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Brent Last Day Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Brent Last Day Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Brent Last Day Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Brent Last Day Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Brent Last Day Financial Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

CL

Introduction

This page shows the trading hours, holidays, and time zone of the Crude Oil Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Crude Oil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Crude Oil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Crude Oil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Crude Oil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Crude Oil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Crude Oil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Crude Oil Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

CRB

Introduction

This page shows the trading hours, holidays, and time zone of the Gulf Coast CBOB Gasoline A2 (Platts) vs. RBOB Gasoline Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Gulf Coast CBOB Gasoline A2 (Platts) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Gulf Coast CBOB Gasoline A2 (Platts) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Gulf Coast CBOB Gasoline A2 (Platts) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Gulf Coast CBOB Gasoline A2 (Platts) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Gulf Coast CBOB Gasoline A2 (Platts) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Gulf Coast CBOB Gasoline A2 (Platts) vs. RBOB Gasoline Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Gulf Coast CBOB Gasoline A2 (Platts) vs. RBOB Gasoline Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

CSW

Introduction

This page shows the trading hours, holidays, and time zone of the Clearbrook Bakken Sweet (NE2) Monthly Index Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Clearbrook Bakken Sweet (NE2) Monthly Index Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Clearbrook Bakken Sweet (NE2) Monthly Index Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Clearbrook Bakken Sweet (NE2) Monthly Index Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the NYMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Clearbrook Bakken Sweet (NE2) Monthly Index Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2011-12-31 16:15:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2016-12-23 17:00:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2017-12-22 17:00:00
2017-12-26 17:00:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00

Late Opens

There are no days with late opens.

Time Zone

The Clearbrook Bakken Sweet (NE2) Monthly Index Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

CSX

Introduction

This page shows the trading hours, holidays, and time zone of the WTI Financial Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the WTI Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the WTI Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the WTI Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the WTI Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the WTI Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the WTI Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The WTI Financial Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

CU

Introduction

This page shows the trading hours, holidays, and time zone of the Chicago Ethanol (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Chicago Ethanol (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Chicago Ethanol (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Chicago Ethanol (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Chicago Ethanol (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Chicago Ethanol (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Chicago Ethanol (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Chicago Ethanol (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

D1N

Introduction

This page shows the trading hours, holidays, and time zone of the Singapore Mogas 92 Unleaded (Platts) Brent Crack Spread Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Singapore Mogas 92 Unleaded (Platts) Brent Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Singapore Mogas 92 Unleaded (Platts) Brent Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Singapore Mogas 92 Unleaded (Platts) Brent Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Singapore Mogas 92 Unleaded (Platts) Brent Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Singapore Mogas 92 Unleaded (Platts) Brent Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Singapore Mogas 92 Unleaded (Platts) Brent Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Singapore Mogas 92 Unleaded (Platts) Brent Crack Spread Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

DCB

Introduction

This page shows the trading hours, holidays, and time zone of the Dubai Crude Oil (Platts) Financial Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Dubai Crude Oil (Platts) Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Dubai Crude Oil (Platts) Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Dubai Crude Oil (Platts) Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Dubai Crude Oil (Platts) Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Dubai Crude Oil (Platts) Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Dubai Crude Oil (Platts) Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Dubai Crude Oil (Platts) Financial Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

E6

Introduction

This page shows the trading hours, holidays, and time zone of the Japan C&F Naphtha (Platts) BALMO Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Japan C&F Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Japan C&F Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Japan C&F Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Japan C&F Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Japan C&F Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Japan C&F Naphtha (Platts) BALMO Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Japan C&F Naphtha (Platts) BALMO Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

EN

Introduction

This page shows the trading hours, holidays, and time zone of the European Naphtha (Platts) Crack Spread Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the European Naphtha (Platts) Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the European Naphtha (Platts) Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the European Naphtha (Platts) Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the European Naphtha (Platts) Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the European Naphtha (Platts) Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the European Naphtha (Platts) Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The European Naphtha (Platts) Crack Spread Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

EPN

Introduction

This page shows the trading hours, holidays, and time zone of the European Propane CIF ARA (Argus) vs. Naphtha Cargoes CIF NWE (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the European Propane CIF ARA (Argus) vs. Naphtha Cargoes CIF NWE (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the European Propane CIF ARA (Argus) vs. Naphtha Cargoes CIF NWE (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the European Propane CIF ARA (Argus) vs. Naphtha Cargoes CIF NWE (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the European Propane CIF ARA (Argus) vs. Naphtha Cargoes CIF NWE (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the European Propane CIF ARA (Argus) vs. Naphtha Cargoes CIF NWE (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the European Propane CIF ARA (Argus) vs. Naphtha Cargoes CIF NWE (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The European Propane CIF ARA (Argus) vs. Naphtha Cargoes CIF NWE (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

EVC

Introduction

This page shows the trading hours, holidays, and time zone of the Singapore Fuel Oil 380 cst (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Singapore Fuel Oil 380 cst (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Singapore Fuel Oil 380 cst (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Singapore Fuel Oil 380 cst (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Singapore Fuel Oil 380 cst (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Singapore Fuel Oil 380 cst (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Singapore Fuel Oil 380 cst (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Singapore Fuel Oil 380 cst (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

EWG

Introduction

This page shows the trading hours, holidays, and time zone of the East-West Gasoline Spread (Platts-Argus) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the East-West Gasoline Spread (Platts-Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the East-West Gasoline Spread (Platts-Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the East-West Gasoline Spread (Platts-Argus) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the East-West Gasoline Spread (Platts-Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the East-West Gasoline Spread (Platts-Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the East-West Gasoline Spread (Platts-Argus) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The East-West Gasoline Spread (Platts-Argus) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

EWN

Introduction

This page shows the trading hours, holidays, and time zone of the East-West Naphtha: Japan C&F vs. Cargoes CIF NWE Spread (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the East-West Naphtha: Japan C&F vs. Cargoes CIF NWE Spread (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the East-West Naphtha: Japan C&F vs. Cargoes CIF NWE Spread (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the East-West Naphtha: Japan C&F vs. Cargoes CIF NWE Spread (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the East-West Naphtha: Japan C&F vs. Cargoes CIF NWE Spread (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the East-West Naphtha: Japan C&F vs. Cargoes CIF NWE Spread (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the East-West Naphtha: Japan C&F vs. Cargoes CIF NWE Spread (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The East-West Naphtha: Japan C&F vs. Cargoes CIF NWE Spread (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

EXR

Introduction

This page shows the trading hours, holidays, and time zone of the RBOB Gasoline vs. Euro-bob Oxy NWE Barges (Argus) (350000 gallons) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the RBOB Gasoline vs. Euro-bob Oxy NWE Barges (Argus) (350000 gallons) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the RBOB Gasoline vs. Euro-bob Oxy NWE Barges (Argus) (350000 gallons) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the RBOB Gasoline vs. Euro-bob Oxy NWE Barges (Argus) (350000 gallons) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the RBOB Gasoline vs. Euro-bob Oxy NWE Barges (Argus) (350000 gallons) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the RBOB Gasoline vs. Euro-bob Oxy NWE Barges (Argus) (350000 gallons) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the RBOB Gasoline vs. Euro-bob Oxy NWE Barges (Argus) (350000 gallons) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The RBOB Gasoline vs. Euro-bob Oxy NWE Barges (Argus) (350000 gallons) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

FO

Introduction

This page shows the trading hours, holidays, and time zone of the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The 3.5% Fuel Oil Barges FOB Rdam (Platts) Crack Spread Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

FRC

Introduction

This page shows the trading hours, holidays, and time zone of the Freight Route TC14 (Baltic) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Freight Route TC14 (Baltic) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Freight Route TC14 (Baltic) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Freight Route TC14 (Baltic) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Freight Route TC14 (Baltic) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Freight Route TC14 (Baltic) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Freight Route TC14 (Baltic) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Freight Route TC14 (Baltic) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

FSS

Introduction

This page shows the trading hours, holidays, and time zone of the 1% Fuel Oil Cargoes FOB NWE (Platts) vs. 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the 1% Fuel Oil Cargoes FOB NWE (Platts) vs. 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the 1% Fuel Oil Cargoes FOB NWE (Platts) vs. 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the 1% Fuel Oil Cargoes FOB NWE (Platts) vs. 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the 1% Fuel Oil Cargoes FOB NWE (Platts) vs. 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the 1% Fuel Oil Cargoes FOB NWE (Platts) vs. 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the 1% Fuel Oil Cargoes FOB NWE (Platts) vs. 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The 1% Fuel Oil Cargoes FOB NWE (Platts) vs. 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

GCU

Introduction

This page shows the trading hours, holidays, and time zone of the Gulf Coast HSFO (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Gulf Coast HSFO (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Gulf Coast HSFO (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Gulf Coast HSFO (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Gulf Coast HSFO (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Gulf Coast HSFO (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Gulf Coast HSFO (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Gulf Coast HSFO (Platts) vs. European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

HCL

Introduction

This page shows the trading hours, holidays, and time zone of the WTI Houston Crude Oil Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the WTI Houston Crude Oil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the WTI Houston Crude Oil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the WTI Houston Crude Oil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the NYMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the WTI Houston Crude Oil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2011-12-31 16:15:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2016-12-23 17:00:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2017-12-22 17:00:00
2017-12-26 17:00:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00

Late Opens

There are no days with late opens.

Time Zone

The WTI Houston Crude Oil Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

HH

Introduction

This page shows the trading hours, holidays, and time zone of the Natural Gas (Henry Hub) Last-day Financial Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Natural Gas (Henry Hub) Last-day Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Natural Gas (Henry Hub) Last-day Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Natural Gas (Henry Hub) Last-day Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Natural Gas (Henry Hub) Last-day Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Natural Gas (Henry Hub) Last-day Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Natural Gas (Henry Hub) Last-day Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Natural Gas (Henry Hub) Last-day Financial Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

HO

Introduction

This page shows the trading hours, holidays, and time zone of the NY Harbor ULSD Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the NY Harbor ULSD Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the NY Harbor ULSD Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The NY Harbor ULSD Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

HP

Introduction

This page shows the trading hours, holidays, and time zone of the Natural Gas (Henry Hub) Penultimate Financial Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Natural Gas (Henry Hub) Penultimate Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Natural Gas (Henry Hub) Penultimate Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Natural Gas (Henry Hub) Penultimate Financial Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Natural Gas (Henry Hub) Penultimate Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Natural Gas (Henry Hub) Penultimate Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Natural Gas (Henry Hub) Penultimate Financial Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Natural Gas (Henry Hub) Penultimate Financial Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

HRC

Introduction

This page shows the trading hours, holidays, and time zone of the U.S. Midwest Domestic Hot-Rolled Coil Steel (CRU) Index Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the U.S. Midwest Domestic Hot-Rolled Coil Steel (CRU) Index Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the U.S. Midwest Domestic Hot-Rolled Coil Steel (CRU) Index Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the U.S. Midwest Domestic Hot-Rolled Coil Steel (CRU) Index Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the NYMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the U.S. Midwest Domestic Hot-Rolled Coil Steel (CRU) Index Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2011-12-31 16:15:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2016-12-23 17:00:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2017-12-22 17:00:00
2017-12-26 17:00:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00

Late Opens

There are no days with late opens.

Time Zone

The U.S. Midwest Domestic Hot-Rolled Coil Steel (CRU) Index Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

HTT

Introduction

This page shows the trading hours, holidays, and time zone of the WTI Houston (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the WTI Houston (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the WTI Houston (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the WTI Houston (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the WTI Houston (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the WTI Houston (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the WTI Houston (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The WTI Houston (Argus) vs. WTI Trade Month Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

M1B

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Gasoil 0.1% Barges FOB ARA (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Gasoil 0.1% Barges FOB ARA (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Gasoil 0.1% Barges FOB ARA (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Gasoil 0.1% Barges FOB ARA (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro Gasoil 0.1% Barges FOB ARA (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro Gasoil 0.1% Barges FOB ARA (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro Gasoil 0.1% Barges FOB ARA (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro Gasoil 0.1% Barges FOB ARA (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

M35

Introduction

This page shows the trading hours, holidays, and time zone of the Micro European 3.5% Fuel Oil Cargoes FOB Med (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro European 3.5% Fuel Oil Cargoes FOB Med (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro European 3.5% Fuel Oil Cargoes FOB Med (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro European 3.5% Fuel Oil Cargoes FOB Med (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro European 3.5% Fuel Oil Cargoes FOB Med (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro European 3.5% Fuel Oil Cargoes FOB Med (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro European 3.5% Fuel Oil Cargoes FOB Med (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro European 3.5% Fuel Oil Cargoes FOB Med (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

M5F

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Coal (API 5) fob Newcastle (Argus/McCloskey) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Coal (API 5) fob Newcastle (Argus/McCloskey) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Coal (API 5) fob Newcastle (Argus/McCloskey) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Coal (API 5) fob Newcastle (Argus/McCloskey) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the NYMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the Micro Coal (API 5) fob Newcastle (Argus/McCloskey) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2011-12-31 16:15:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2016-12-23 17:00:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2017-12-22 17:00:00
2017-12-26 17:00:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 12:00:00
2020-02-17 12:00:00
2020-05-25 12:00:00
2020-07-03 12:00:00
2020-09-07 12:00:00
2020-11-26 12:00:00
2020-11-27 12:45:00
2020-12-24 12:45:00
2021-01-18 12:00:00
2021-02-15 12:00:00
2021-05-31 12:00:00
2021-07-05 12:00:00
2021-09-06 12:00:00
2021-11-25 12:00:00
2021-11-26 12:45:00
2022-01-17 13:30:00
2022-02-21 13:30:00
2022-05-30 13:30:00
2022-06-20 13:30:00
2022-07-04 13:30:00
2022-09-05 12:00:00
2022-11-24 13:30:00
2022-11-25 12:45:00

Late Opens

There are no days with late opens.

Time Zone

The Micro Coal (API 5) fob Newcastle (Argus/McCloskey) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

MAF

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Singapore Fuel Oil 380CST (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Singapore Fuel Oil 380CST (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Singapore Fuel Oil 380CST (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Singapore Fuel Oil 380CST (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro Singapore Fuel Oil 380CST (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro Singapore Fuel Oil 380CST (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro Singapore Fuel Oil 380CST (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro Singapore Fuel Oil 380CST (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

MCL

Introduction

This page shows the trading hours, holidays, and time zone of the Micro WTI Crude Oil Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro WTI Crude Oil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro WTI Crude Oil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro WTI Crude Oil Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro WTI Crude Oil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro WTI Crude Oil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro WTI Crude Oil Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro WTI Crude Oil Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

MEF

Introduction

This page shows the trading hours, holidays, and time zone of the Micro European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro European 3.5% Fuel Oil Barges FOB Rdam (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

NG

Introduction

This page shows the trading hours, holidays, and time zone of the Henry Hub Natural Gas Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Henry Hub Natural Gas Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Henry Hub Natural Gas Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Henry Hub Natural Gas Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Henry Hub Natural Gas Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Henry Hub Natural Gas Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Henry Hub Natural Gas Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Henry Hub Natural Gas Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

PA

Introduction

This page shows the trading hours, holidays, and time zone of the Palladium Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Palladium Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Palladium Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Palladium Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the NYMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Palladium Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

PAM

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Palladium Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Palladium Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Palladium Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Palladium Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro Palladium Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro Palladium Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro Palladium Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro Palladium Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

PL

Introduction

This page shows the trading hours, holidays, and time zone of the Platinum Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Platinum Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Platinum Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Platinum Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the NYMEX Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Platinum Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

R5O

Introduction

This page shows the trading hours, holidays, and time zone of the Micro European FOB Rdam Marine Fuel 0.5% Barges (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro European FOB Rdam Marine Fuel 0.5% Barges (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro European FOB Rdam Marine Fuel 0.5% Barges (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro European FOB Rdam Marine Fuel 0.5% Barges (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro European FOB Rdam Marine Fuel 0.5% Barges (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro European FOB Rdam Marine Fuel 0.5% Barges (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro European FOB Rdam Marine Fuel 0.5% Barges (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro European FOB Rdam Marine Fuel 0.5% Barges (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

RB

Introduction

This page shows the trading hours, holidays, and time zone of the RBOB Gasoline Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the RBOB Gasoline Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the RBOB Gasoline Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the RBOB Gasoline Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the RBOB Gasoline Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the RBOB Gasoline Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the RBOB Gasoline Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The RBOB Gasoline Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

S5O

Introduction

This page shows the trading hours, holidays, and time zone of the Micro Singapore FOB Marine Fuel 0.5% (Platts) Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the Micro Singapore FOB Marine Fuel 0.5% (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 09:30:00
Tuesday 00:00:00 to 09:30:00
Wednesday 00:00:00 to 09:30:00
Thursday 00:00:00 to 09:30:00
Friday 00:00:00 to 09:30:00

Regular Trading Hours

The following table shows the regular trading hours for the Micro Singapore FOB Marine Fuel 0.5% (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 09:30:00 to 17:00:00
Tuesday 09:30:00 to 17:00:00
Wednesday 09:30:00 to 17:00:00
Thursday 09:30:00 to 17:00:00
Friday 09:30:00 to 17:00:00

Post-market Hours

The following table shows the post-market hours for the Micro Singapore FOB Marine Fuel 0.5% (Platts) Futures contract in the NYMEX Future market:

Weekday Time (America/New York)
Monday 18:00:00 to 24:00:00
Tuesday 18:00:00 to 24:00:00
Wednesday 18:00:00 to 24:00:00
Thursday 18:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the Micro Singapore FOB Marine Fuel 0.5% (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2015-04-03 2021-04-02

Early Closes

The following table shows the early closes for the Micro Singapore FOB Marine Fuel 0.5% (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2009-01-19 17:15:00
2009-02-16 17:15:00
2009-05-22 16:15:00
2009-05-25 13:15:00
2009-07-03 13:30:00
2009-09-04 16:15:00
2009-09-07 13:15:00
2009-10-09 16:15:00
2009-11-26 13:15:00
2009-11-27 13:45:00
2009-12-24 13:45:00
2010-01-15 16:15:00
2010-01-18 13:15:00
2010-02-12 16:15:00
2010-02-15 13:15:00
2010-05-28 16:15:00
2010-05-31 13:15:00
2010-07-02 16:15:00
2010-07-05 13:15:00
2010-09-03 16:15:00
2010-09-06 13:15:00
2010-10-08 16:15:00
2010-11-25 13:15:00
2010-11-26 13:45:00
2010-12-31 16:15:00
2011-01-14 16:15:00
2011-01-17 13:15:00
2011-02-21 13:15:00
2011-05-30 13:15:00
2011-07-04 13:15:00
2011-09-05 13:15:00
2011-11-24 13:15:00
2011-11-25 13:45:00
2012-01-16 13:15:00
2012-02-20 13:15:00
2012-05-28 13:15:00
2012-07-04 13:15:00
2012-09-03 13:15:00
2012-11-22 13:15:00
2012-11-23 13:45:00
2012-12-24 13:45:00
2013-01-21 13:15:00
2013-02-18 13:15:00
2013-05-27 13:15:00
2013-07-04 13:15:00
2013-09-02 13:15:00
2013-11-28 13:15:00
2013-11-29 13:45:00
2013-12-24 13:45:00
2014-01-20 13:15:00
2014-02-17 13:15:00
2014-05-26 13:00:00
2014-07-04 13:00:00
2014-09-01 13:00:00
2014-11-27 13:00:00
2014-11-28 13:45:00
2014-12-24 13:45:00
2015-01-19 13:00:00
2015-02-16 13:00:00
2015-05-25 13:00:00
2015-07-03 13:00:00
2015-09-07 13:00:00
2015-11-26 13:00:00
2015-11-27 13:45:00
2015-12-24 13:45:00
2016-01-18 13:00:00
2016-02-15 13:00:00
2016-05-30 13:00:00
2016-07-04 13:00:00
2016-09-05 13:00:00
2016-11-24 13:00:00
2016-11-25 13:45:00
2017-01-16 13:00:00
2017-02-20 13:00:00
2017-05-29 13:00:00
2017-07-04 13:00:00
2017-09-04 13:00:00
2017-11-23 13:00:00
2017-11-24 13:45:00
2018-01-15 13:00:00
2018-02-19 13:00:00
2018-05-28 13:00:00
2018-07-04 13:00:00
2018-09-03 13:00:00
2018-11-22 13:00:00
2018-11-23 13:45:00
2018-12-24 13:45:00
2019-01-21 13:00:00
2019-02-18 13:00:00
2019-05-27 13:00:00
2019-07-04 13:00:00
2019-09-02 13:00:00
2019-11-28 13:00:00
2019-11-29 13:45:00
2019-12-24 13:45:00
2020-01-20 13:00:00
2020-02-17 13:00:00
2020-05-25 13:00:00
2020-07-03 13:00:00
2020-09-07 13:00:00
2020-11-26 13:00:00
2020-11-27 13:45:00
2020-12-24 13:45:00
2021-01-18 13:00:00
2021-02-15 13:00:00
2021-05-31 13:00:00
2021-07-05 13:00:00
2021-09-06 13:00:00
2021-11-25 13:00:00
2021-11-26 13:45:00
2022-01-17 14:30:00
2022-02-21 14:30:00
2022-05-30 14:30:00
2022-06-20 14:30:00
2022-07-04 14:30:00
2022-09-05 14:30:00
2022-11-24 14:30:00
2022-11-25 13:45:00
2023-01-16 14:30:00
2023-02-20 14:30:00
2023-05-29 14:30:00
2023-06-19 14:30:00
2023-07-04 14:30:00
2023-09-04 14:30:00
2023-11-23 14:30:00
2023-11-24 13:45:00
2024-01-15 14:30:00
2024-02-19 14:30:00
2024-03-28 17:00:00
2024-05-27 14:30:00
2024-06-19 14:30:00
2024-07-04 14:30:00
2024-09-02 14:30:00
2024-11-28 14:30:00
2024-12-24 13:45:00
2024-12-31 17:00:00

Late Opens

The following table shows the late opens for the Micro Singapore FOB Marine Fuel 0.5% (Platts) Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/New York)
2009-01-19 18:00:00
2009-02-16 18:00:00
2009-05-25 18:00:00
2009-09-07 18:00:00
2009-10-09 18:00:00
2009-11-26 18:00:00
2010-01-18 18:00:00
2010-02-15 18:00:00
2010-05-31 18:00:00
2010-07-05 18:00:00
2010-09-06 18:00:00
2010-11-25 18:00:00
2011-01-17 18:00:00
2011-02-21 18:00:00
2011-05-30 18:00:00
2011-07-04 18:00:00
2011-09-05 18:00:00
2011-11-24 18:00:00
2012-01-16 18:00:00
2012-02-20 18:00:00
2012-05-28 18:00:00
2012-07-04 18:00:00
2012-09-03 18:00:00
2012-11-22 18:00:00
2013-01-21 18:00:00
2013-02-18 18:00:00
2013-05-27 18:00:00
2013-07-04 18:00:00
2013-09-02 18:00:00
2013-11-28 18:00:00
2014-01-20 18:00:00
2014-02-17 18:00:00
2014-05-26 18:00:00
2014-09-01 18:00:00
2014-11-27 18:00:00
2015-01-19 18:00:00
2015-02-16 18:00:00
2015-05-25 18:00:00
2015-09-07 18:00:00
2015-11-26 18:00:00
2016-01-18 18:00:00
2016-02-15 18:00:00
2016-05-30 18:00:00
2016-07-04 18:00:00
2016-09-05 18:00:00
2016-11-24 18:00:00
2017-01-16 18:00:00
2017-02-20 18:00:00
2017-05-29 18:00:00
2017-07-04 18:00:00
2017-09-04 18:00:00
2017-11-23 18:00:00
2018-01-15 18:00:00
2018-02-19 18:00:00
2018-05-28 18:00:00
2018-07-04 18:00:00
2018-09-03 18:00:00
2018-11-22 18:00:00
2019-01-21 18:00:00
2019-02-18 18:00:00
2019-05-27 18:00:00
2019-07-04 18:00:00
2019-09-02 18:00:00
2019-11-28 18:00:00
2020-01-20 18:00:00
2020-02-17 18:00:00
2020-05-25 18:00:00
2020-07-03 18:00:00
2020-09-07 18:00:00
2020-11-26 18:00:00
2021-01-18 18:00:00
2021-02-15 18:00:00
2021-05-31 18:00:00
2021-07-05 18:00:00
2021-09-06 18:00:00
2021-11-25 18:00:00
2022-01-17 18:00:00
2022-02-21 18:00:00
2022-05-30 18:00:00
2022-06-20 18:00:00
2022-07-04 18:00:00
2022-09-05 18:00:00
2022-11-24 18:00:00
2023-01-16 18:00:00
2023-02-20 18:00:00
2023-05-29 18:00:00
2023-06-19 18:00:00
2023-07-04 18:00:00
2023-09-04 18:00:00
2023-11-23 18:00:00
2023-12-25 18:00:00
2024-01-01 18:00:00
2024-01-15 18:00:00
2024-02-19 18:00:00
2024-05-27 18:00:00
2024-06-19 18:00:00
2024-07-04 18:00:00
2024-09-02 18:00:00
2024-11-28 18:00:00
2024-12-25 18:00:00
2025-01-01 18:00:00

Time Zone

The Micro Singapore FOB Marine Fuel 0.5% (Platts) Futures contract in the NYMEX Future market trades in the America/New York time zone.

 

NYMEX

YO

Introduction

This page shows the trading hours, holidays, and time zone of the No. 11 Sugar Futures contract in the NYMEX Future market.

Pre-market Hours

The following table shows the pre-market hours for the No. 11 Sugar Futures contract in the NYMEX Future market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 08:30:00
Tuesday 00:00:00 to 08:30:00
Wednesday 00:00:00 to 08:30:00
Thursday 00:00:00 to 08:30:00
Friday 00:00:00 to 08:30:00

Regular Trading Hours

The following table shows the regular trading hours for the No. 11 Sugar Futures contract in the NYMEX Future market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 16:00:00
Tuesday 08:30:00 to 16:00:00
Wednesday 08:30:00 to 16:00:00
Thursday 08:30:00 to 16:00:00
Friday 08:30:00 to 16:00:00

Post-market Hours

The following table shows the post-market hours for the No. 11 Sugar Futures contract in the NYMEX Future market:

Weekday Time (America/Chicago)
Monday 17:00:00 to 24:00:00
Tuesday 17:00:00 to 24:00:00
Wednesday 17:00:00 to 24:00:00
Thursday 17:00:00 to 24:00:00

Holidays

The following table shows the dates of holidays for the No. 11 Sugar Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd )
2014-07-04 2015-04-03 2015-07-03 2017-01-16 2017-02-20
2017-05-29 2017-07-04 2017-09-04 2017-11-23 2018-01-15
2018-02-19 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2019-01-21 2019-02-18 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2020-01-20 2020-02-17 2020-05-25 2020-07-03
2020-09-07 2020-11-26 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2022-01-17
2022-02-21 2022-05-30 2022-06-20 2022-07-04 2022-09-05
2022-11-24 2023-01-16 2023-02-20 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2024-01-01 2024-01-15 2024-02-19
2024-05-27 2024-06-19 2024-07-04 2024-09-02 2024-11-28
2024-12-25 2025-01-01

Early Closes

The following table shows the early closes for the No. 11 Sugar Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
2010-12-31 12:15:00
2013-03-28 13:55:00
2013-07-03 12:00:00
2013-11-27 15:05:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-01-19 16:00:00
2014-02-16 16:00:00
2014-04-17 13:55:00
2014-04-20 16:00:00
2014-05-25 16:00:00
2014-07-03 12:00:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-04-02 13:55:00
2015-07-02 12:00:00
2015-11-27 12:00:00
2015-12-24 12:00:00
2015-12-31 13:55:00
2016-03-24 13:55:00
2016-11-25 12:00:00
2016-12-23 12:00:00
2017-04-13 13:55:00
2017-07-03 12:00:00
2017-11-24 12:00:00
2017-12-22 12:00:00
2018-03-29 13:55:00
2018-07-03 12:00:00
2018-11-23 12:00:00
2018-12-24 12:00:00
2018-12-31 13:55:00
2019-04-18 13:55:00
2019-07-03 12:05:00
2019-11-29 12:05:00
2019-12-24 12:05:00
2019-12-31 13:55:00
2020-07-02 12:05:00
2020-11-27 12:05:00
2020-12-24 12:05:00
2021-11-26 12:05:00
2022-11-25 12:05:00
2023-11-24 12:05:00
2024-03-28 15:05:00
2024-11-27 15:05:00

Late Opens

The following table shows the late opens for the No. 11 Sugar Futures contract in the NYMEX Future market:

Date ( yyyy-mm-dd ) Time Of Market Open (America/Chicago)
2011-11-24 17:00:00
2011-12-27 09:00:00
2012-01-03 09:00:00
2012-01-17 09:00:00
2012-02-21 09:00:00
2012-05-29 09:00:00
2012-07-05 09:00:00
2012-09-04 09:00:00
2012-11-22 17:00:00
2012-12-26 09:00:00
2013-01-02 09:00:00
2013-01-22 09:00:00
2013-02-19 09:00:00
2013-05-28 09:00:00
2013-07-05 09:00:00
2013-09-03 09:00:00
2013-11-29 09:00:00
2013-12-26 09:00:00
2014-01-02 09:00:00
2014-01-21 09:00:00
2014-02-18 09:00:00
2014-04-21 09:00:00
2014-05-27 09:00:00
2014-07-07 09:00:00
2014-09-02 09:00:00
2014-11-28 09:00:00
2014-12-26 09:00:00
2015-01-02 09:00:00
2015-01-20 09:00:00
2015-02-17 09:00:00
2015-04-06 09:00:00
2015-05-26 09:00:00
2015-07-06 09:00:00
2015-09-08 09:00:00
2015-11-27 09:00:00
2015-12-28 09:00:00
2016-01-04 09:00:00
2016-01-19 09:00:00
2016-02-16 09:00:00
2016-03-28 09:00:00
2016-05-31 09:00:00
2016-07-05 09:00:00
2016-09-06 09:00:00
2016-11-25 09:00:00
2017-01-16 09:00:00
2017-02-20 09:00:00
2017-04-17 09:00:00
2017-05-30 09:00:00
2017-07-05 09:00:00
2017-09-05 09:00:00
2018-01-16 09:00:00
2018-02-20 09:00:00
2018-04-02 09:00:00
2018-05-29 09:00:00
2018-07-05 09:00:00
2018-09-04 09:00:00
2019-01-22 09:00:00
2019-02-19 09:00:00
2019-04-22 09:00:00
2019-05-28 09:00:00
2019-07-05 09:00:00
2019-09-03 09:00:00
2020-01-21 09:00:00
2020-02-18 09:00:00
2020-04-13 09:00:00
2020-05-26 09:00:00
2020-07-06 09:00:00
2020-09-08 09:00:00
2021-01-19 09:00:00
2021-02-16 09:00:00
2021-04-05 09:00:00
2021-06-01 09:00:00

Time Zone

The No. 11 Sugar Futures contract in the NYMEX Future market trades in the America/Chicago time zone.

 

Market Hours

NYSELIFFE

Introduction

This page shows the trading hours, holidays, and time zone of the NYSELIFFE Future market.

Historical data for backtesting is unavailable for NYSELIFFE. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NYSELIFFE Future market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 24:00:00
Tuesday 00:00:00 to 24:00:00
Wednesday 00:00:00 to 24:00:00
Thursday 00:00:00 to 24:00:00
Friday 00:00:00 to 18:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NYSELIFFE Future market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-25 2016-12-26 2017-01-02 2017-01-16
2017-02-20 2017-04-14 2017-05-29 2017-07-04 2017-09-04
2017-11-23 2017-12-25 2018-01-01 2018-01-15 2018-02-19
2018-03-30 2018-05-28 2018-07-04 2018-09-03 2018-11-22
2018-12-05 2018-12-25 2019-01-01 2019-01-21 2019-02-18
2019-04-19 2019-05-27 2019-07-04 2019-09-02 2019-11-28
2019-12-25 2020-01-01 2020-01-20 2020-02-17 2020-04-10
2020-05-25 2020-07-03 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-07-05 2021-09-06 2021-11-25 2021-12-24 2022-01-01
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-06-20
2022-07-04 2022-09-05 2022-11-24 2022-12-26 2023-01-02
2023-01-16 2023-02-20 2023-04-07 2023-05-29 2023-06-19
2023-07-04 2023-09-04 2023-11-23 2023-12-25 2024-01-01
2024-01-15 2024-02-19 2024-03-29 2024-05-27 2024-06-19
2024-07-04 2024-09-02 2024-11-28 2024-12-25

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The NYSELIFFE Future market trades in the America/New York time zone.

 

Market Hours

SGX

Introduction

This page shows the trading hours, holidays, and time zone of the SGX Future market.

Historical data for backtesting is unavailable for SGX. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the SGX Future market:

Weekday Time (Asia/Singapore)
Monday 09:00:00 to 12:00:00, 13:00:00 to 17:00:00
Tuesday 09:00:00 to 12:00:00, 13:00:00 to 17:00:00
Wednesday 09:00:00 to 12:00:00, 13:00:00 to 17:00:00
Thursday 09:00:00 to 12:00:00, 13:00:00 to 17:00:00
Friday 09:00:00 to 12:00:00, 13:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the SGX Future market:

Date ( yyyy-mm-dd )
2016-01-01 2016-02-08 2016-02-09 2016-03-25 2016-05-01
2016-05-21 2016-07-06 2016-08-09 2016-09-12 2016-10-29
2016-12-25 2017-01-01 2017-01-28 2017-01-29 2017-04-14
2017-05-01 2017-05-10 2017-06-25 2017-08-09 2017-09-01
2017-10-18 2017-12-25 2018-01-01 2018-02-16 2018-02-17
2018-03-30 2018-05-01 2018-05-29 2018-06-15 2018-08-09
2018-08-22 2018-11-06 2018-12-25 2019-01-01 2019-02-05
2019-02-06 2019-04-19 2019-05-01 2019-05-20 2019-06-05
2019-08-09 2019-08-12 2019-10-28 2019-12-25 2020-01-01
2020-01-27 2020-04-10 2020-05-01 2020-05-07 2020-05-25
2020-07-31 2020-08-10 2020-11-14 2020-12-25 2021-01-01
2021-02-12 2021-04-02 2021-05-01 2021-08-09 2021-12-25
2022-01-03 2022-01-31 2022-02-01 2022-02-02 2022-04-15
2022-05-02 2022-08-09 2022-12-26 2022-12-31

Early Closes

The following table shows the early closes for the SGX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (Asia/Singapore)
2018-02-15 12:00:00
2018-12-24 12:00:00
2018-12-31 12:00:00
2019-04-02 12:00:00
2019-12-24 12:00:00
2019-12-31 12:00:00
2020-01-24 12:00:00
2020-12-24 12:00:00
2020-12-31 12:00:00
2021-02-11 12:00:00
2021-12-24 12:00:00
2021-12-31 12:00:00
2022-01-31 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The SGX Future market trades in the Asia/Singapore time zone.

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall SGX Future market:

Symbol Name
IN Nifty Indices Futures
NK SGX Nikkei 225 Index Futures
TW MSCI Taiwan Index Futures

 

SGX

IN

Introduction

This page shows the trading hours, holidays, and time zone of the Nifty Indices Futures contract in the SGX Future market.

Historical data for backtesting is unavailable for SGX. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Nifty Indices Futures contract in the SGX Future market:

Weekday Time (Asia/Singapore)
Monday 08:45:00 to 18:15:00, 18:30:00 to 24:00:00
Tuesday 00:00:00 to 06:15:00, 08:45:00 to 18:15:00, 18:30:00 to 24:00:00
Wednesday 00:00:00 to 06:15:00, 08:45:00 to 18:15:00, 18:30:00 to 24:00:00
Thursday 00:00:00 to 06:15:00, 08:45:00 to 18:15:00, 18:30:00 to 24:00:00
Friday 00:00:00 to 06:15:00, 08:45:00 to 18:15:00, 18:30:00 to 24:00:00
Saturday 00:00:00 to 06:15:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Nifty Indices Futures contract in the SGX Future market:

Date ( yyyy-mm-dd )
2016-01-01 2016-02-08 2016-02-09 2016-03-25 2016-05-01
2016-05-21 2016-07-06 2016-08-09 2016-09-12 2016-10-29
2016-12-25 2017-01-01 2017-01-28 2017-01-29 2017-04-14
2017-05-01 2017-05-10 2017-06-25 2017-08-09 2017-09-01
2017-10-18 2017-12-25 2018-01-01 2018-02-16 2018-02-17
2018-03-30 2018-05-01 2018-05-29 2018-06-15 2018-08-09
2018-08-22 2018-11-06 2018-12-25 2019-01-01 2019-02-05
2019-02-06 2019-04-19 2019-05-01 2019-05-20 2019-06-05
2019-08-09 2019-08-12 2019-10-28 2019-12-25 2020-01-01
2020-01-27 2020-04-10 2020-05-01 2020-05-07 2020-05-25
2020-07-31 2020-08-10 2020-11-14 2020-12-25 2021-01-01
2021-02-12 2021-04-02 2021-05-01 2021-08-09 2021-12-25
2022-01-03 2022-01-31 2022-02-01 2022-02-02 2022-04-15
2022-05-02 2022-08-09 2022-12-26 2022-12-31

Early Closes

The following table shows the early closes for the Nifty Indices Futures contract in the SGX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (Asia/Singapore)
2018-02-15 12:00:00
2018-12-24 12:00:00
2018-12-31 12:00:00
2019-04-02 12:00:00
2019-12-24 12:00:00
2019-12-31 12:00:00
2020-01-24 12:00:00
2020-12-24 12:00:00
2020-12-31 12:00:00
2021-02-11 12:00:00
2021-12-24 12:00:00
2021-12-31 12:00:00
2022-01-31 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The Nifty Indices Futures contract in the SGX Future market trades in the Asia/Singapore time zone.

 

SGX

NK

Introduction

This page shows the trading hours, holidays, and time zone of the SGX Nikkei 225 Index Futures contract in the SGX Future market.

Historical data for backtesting is unavailable for SGX. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the SGX Nikkei 225 Index Futures contract in the SGX Future market:

Weekday Time (Asia/Singapore)
Monday 07:15:00 to 14:30:00, 14:45:00 to 24:00:00
Tuesday 00:00:00 to 05:15:00, 07:15:00 to 14:30:00, 14:45:00 to 24:00:00
Wednesday 00:00:00 to 05:15:00, 07:15:00 to 14:30:00, 14:45:00 to 24:00:00
Thursday 00:00:00 to 05:15:00, 07:15:00 to 14:30:00, 14:45:00 to 24:00:00
Friday 00:00:00 to 05:15:00, 07:15:00 to 14:30:00, 14:45:00 to 24:00:00
Saturday 00:00:00 to 05:15:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the SGX Nikkei 225 Index Futures contract in the SGX Future market:

Date ( yyyy-mm-dd )
2016-01-01 2016-02-08 2016-02-09 2016-03-25 2016-05-01
2016-05-21 2016-07-06 2016-08-09 2016-09-12 2016-10-29
2016-12-25 2017-01-01 2017-01-28 2017-01-29 2017-04-14
2017-05-01 2017-05-10 2017-06-25 2017-08-09 2017-09-01
2017-10-18 2017-12-25 2018-01-01 2018-02-16 2018-02-17
2018-03-30 2018-05-01 2018-05-29 2018-06-15 2018-08-09
2018-08-22 2018-11-06 2018-12-25 2019-01-01 2019-02-05
2019-02-06 2019-04-19 2019-05-01 2019-05-20 2019-06-05
2019-08-09 2019-08-12 2019-10-28 2019-12-25 2020-01-01
2020-01-27 2020-04-10 2020-05-01 2020-05-07 2020-05-25
2020-07-31 2020-08-10 2020-11-14 2020-12-25 2021-01-01
2021-02-12 2021-04-02 2021-05-01 2021-08-09 2021-12-25
2022-01-03 2022-01-31 2022-02-01 2022-02-02 2022-04-15
2022-05-02 2022-08-09 2022-12-26 2022-12-31

Early Closes

The following table shows the early closes for the SGX Nikkei 225 Index Futures contract in the SGX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (Asia/Singapore)
2018-02-15 12:00:00
2018-12-24 12:00:00
2018-12-31 12:00:00
2019-04-02 12:00:00
2019-12-24 12:00:00
2019-12-31 12:00:00
2020-01-24 12:00:00
2020-12-24 12:00:00
2020-12-31 12:00:00
2021-02-11 12:00:00
2021-12-24 12:00:00
2021-12-31 12:00:00
2022-01-31 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The SGX Nikkei 225 Index Futures contract in the SGX Future market trades in the Asia/Singapore time zone.

 

SGX

TW

Introduction

This page shows the trading hours, holidays, and time zone of the MSCI Taiwan Index Futures contract in the SGX Future market.

Historical data for backtesting is unavailable for SGX. In live trading, its data is sourced from the brokerage or a third-party data provider.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the MSCI Taiwan Index Futures contract in the SGX Future market:

Weekday Time (Asia/Singapore)
Monday 08:30:00 to 13:50:00, 14:05:00 to 24:00:00
Tuesday 00:00:00 to 05:15:00, 08:30:00 to 13:50:00, 14:05:00 to 24:00:00
Wednesday 00:00:00 to 05:15:00, 08:30:00 to 13:50:00, 14:05:00 to 24:00:00
Thursday 00:00:00 to 05:15:00, 08:30:00 to 13:50:00, 14:05:00 to 24:00:00
Friday 00:00:00 to 05:15:00, 08:30:00 to 13:50:00, 14:05:00 to 24:00:00
Saturday 00:00:00 to 05:15:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the MSCI Taiwan Index Futures contract in the SGX Future market:

Date ( yyyy-mm-dd )
2016-01-01 2016-02-08 2016-02-09 2016-03-25 2016-05-01
2016-05-21 2016-07-06 2016-08-09 2016-09-12 2016-10-29
2016-12-25 2017-01-01 2017-01-28 2017-01-29 2017-04-14
2017-05-01 2017-05-10 2017-06-25 2017-08-09 2017-09-01
2017-10-18 2017-12-25 2018-01-01 2018-02-16 2018-02-17
2018-03-30 2018-05-01 2018-05-29 2018-06-15 2018-08-09
2018-08-22 2018-11-06 2018-12-25 2019-01-01 2019-02-05
2019-02-06 2019-04-19 2019-05-01 2019-05-20 2019-06-05
2019-08-09 2019-08-12 2019-10-28 2019-12-25 2020-01-01
2020-01-27 2020-04-10 2020-05-01 2020-05-07 2020-05-25
2020-07-31 2020-08-10 2020-11-14 2020-12-25 2021-01-01
2021-02-12 2021-04-02 2021-05-01 2021-08-09 2021-12-25
2022-01-03 2022-01-31 2022-02-01 2022-02-02 2022-04-15
2022-05-02 2022-08-09 2022-12-26 2022-12-31

Early Closes

The following table shows the early closes for the MSCI Taiwan Index Futures contract in the SGX Future market:

Date ( yyyy-mm-dd ) Time Of Market Close (Asia/Singapore)
2018-02-15 12:00:00
2018-12-24 12:00:00
2018-12-31 12:00:00
2019-04-02 12:00:00
2019-12-24 12:00:00
2019-12-31 12:00:00
2020-01-24 12:00:00
2020-12-24 12:00:00
2020-12-31 12:00:00
2021-02-11 12:00:00
2021-12-24 12:00:00
2021-12-31 12:00:00
2022-01-31 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The MSCI Taiwan Index Futures contract in the SGX Future market trades in the Asia/Singapore time zone.

 

Asset Classes

Future Options

Future Option contracts give the buyer a window of opportunity to buy or sell the underlying Future contract at a specific price.

See Also

BasicTemplateFutureOptionAlgorithm.py
BasicTemplateFutureOptionAlgorithm.cs

 

Future Options

Requesting Data

Introduction

Request Future Options data in your algorithm to receive a feed of contract prices in the OnData on_data method. For more information about the specific dataset we use for backtests, see the US Future Options dataset listing . To trade Future Options live, you can use the QuantConnect data feed or one of the brokerage data providers . We currently only support American-style Options for Future Options.

Create Subscriptions

Before you can subscribe to a Future Option contract, you may configure the underlying volatility model and you must get the contract Symbol symbol .

Configure the Underlying Futures Contract

In most cases, you should subscribe to the underlying Futures contract before you subscribe to a Futures Option contract. If you don't, LEAN automatically subscribes to the underlying Futures contract with the following settings:

Setting Value
Fill forward Same as the Option contract
Leverage 0
Extended Market Hours Same as the Option contract

In this case, you still need the Futures contract Symbol symbol .

to subscribe to Futures Option contracts. If you don't have access to it, create it.
_futureContractSymbol = QuantConnect.Symbol.CreateFuture(Futures.Indices.SP500EMini,
    Market.CME, new DateTime(2022, 6, 17));
self._future_contract_symbol = Symbol.create_future(Futures.Indices.SP500E_MINI,
    Market.CME, datetime(2022, 6, 17))

For more information about getting the Symbol of Futures contracts, see Create Subscriptions .

To override the initial guess of implied volatility , set and warm up the underlying volatility model .

Get Contract Symbols

To subscribe to a Future Option contract, you need the contract Symbol . You can get the contract Symbol symbol from the CreateOption create_option method or from the OptionChainProvider option_chain_provider . If you use the CreateOption create_option method, you need to provide the contract details.

_optionContractSymbol = QuantConnect.Symbol.CreateOption(_futureContractSymbol,
    Market.CME, OptionStyle.American, OptionRight.Call, 3600, new DateTime(2022, 6, 17))
self._option_contract_symbol = Symbol.create_option(self._future_contract_symbol,
    Market.CME, OptionStyle.AMERICAN, OptionRight.CALL, 3600, datetime(2022, 6, 17))

Another way to get a Future Option contract Symbol is to use the OptionChainProvider option_chain_provider . The GetOptionContractList get_option_contract_list method of OptionChainProvider option_chain_provider returns a list of Symbol objects that reference the available Option contracts for a given underlying Future contract on a given date. The Symbol you pass to the method can reference any of the following Futures contracts:

To filter and select contracts that the GetOptionContractList get_option_contract_list method returns, you can use the following properties of each Symbol object:

Property Description
ID.Date id.date The expiration date of the contract.
ID.StrikePrice id.strike_price The strike price of the contract.
ID.OptionRight id.option_right The contract type. The OptionRight enumeration has the following members:
ID.OptionStyle id.option_style The contract style. The OptionStyle enumeration has the following members:
We currently only support American-style Options for Future Options.
var optionContractSymbols = OptionChainProvider.GetOptionContractList(_futureContractSymbol, Time);
var expiry = optionContractSymbols.Select(symbol => symbol.ID.Date).Min();
var filteredSymbols = optionContractSymbols.Where(symbol => symbol.ID.Date == expiry && symbol.ID.OptionRight == OptionRight.Call);
_optionContractSymbol = filteredSymbols.OrderByDescending(symbol => symbol.ID.StrikePrice).Last();
option_contract_symbols = self.option_chain_provider.get_option_contract_list(self._future_contract_symbol, self.time)
expiry = min([symbol.id.date for symbol in option_contract_symbols])
filtered_symbols = [symbol for symbol in option_contract_symbols if symbol.id.date == expiry and symbol.id.option_right == OptionRight.CALL]
self._option_contract_symbol = sorted(filtered_symbols, key=lambda symbol: symbol.id.strike_price)[0]

Subscribe to Contracts

To create a Future Option contract subscription, pass the contract Symbol symbol to the AddFutureOptionContract add_future_option_contract method. Save a reference to the contract Symbol symbol so you can easily access the Option contract in the OptionChain that LEAN passes to the OnData on_data method. To override the default pricing model of the Option, set a pricing model .

var option = AddFutureOptionContract(_optionContractSymbol);
option.PriceModel = OptionPriceModels.BinomialCoxRossRubinstein();
option = self.add_future_option_contract(self._option_contract_symbol)
option.price_model = OptionPriceModels.binomial_cox_ross_rubinstein()

The AddFutureOptionContract add_future_option_contract method creates a subscription for a single Option contract and adds it to your user-defined universe. To create a dynamic universe of Future Option contracts, add a Future Options universe .

Warm Up Contract Prices

If you subscribe to a Future Option contract with AddFutureOptionContract add_future_option_contract , you'll need to wait until the next Slice to receive data and trade the contract. To trade the contract in the same time step you subscribe to the contract, set the current price of the contract in a security initializer .

var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, seeder));
seeder = FuncSecuritySeeder(self.get_last_known_prices)
self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, seeder))

Supported Assets

To view the supported assets in the US Future Options dataset, see Supported Assets .

Resolutions

The following table shows the available resolutions and data formats for Future Option contract subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK

Second SECOND

Minute MINUTE green check green check
Hour HOUR green check green check
Daily DAILY green check green check

There is only one resolution option, so you don't need to pass a resolution argument to the AddFutureOptionContract add_future_option_contract method.

AddFutureOptionContract(_optionContractSymbol, Resolution.Minute);
self.add_future_option_contract(self._option_contract_symbol, Resolution.MINUTE)

To create custom resolution periods, see Consolidating Data .

Supported Markets

The following Market enumeration members are available for Future Options:

You don't need to pass a Market argument to the AddFutureOptionContract add_future_option_contract method because the contract Symbol already contains the market.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

AddFutureOptionContract(_optionContractSymbol, fillForward: false);
self.add_future_option_contract(self._option_contract_symbol, fill_forward=False)

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. Future Options are already leveraged products, so you can't change their leverage.

Extended Market Hours

By default, your security subscriptions only cover regular trading hours. To subscribe to pre and post-market trading hours for a specific asset, enable the extendedMarketHours extended_market_hours argument when you create the security subscription.

AddFutureOptionContract(_optionContractSymbol, extendedMarketHours: true);
self.add_future_option_contract(self._option_contract_symbol, extended_market_hours=True)

You only receive extended market hours data if you create the subscription with minute, second, or tick resolution. If you create the subscription with daily or hourly resolution, the bars only reflect the regular trading hours.

To view the schedule of regular and extended market hours, see Market Hours .

Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to OnData on_data or the data from history request . If you change the data normalization mode, it won't change the outcome.

Remove Subscriptions

To remove a contract subscription that you created with AddFutureOptionContract , call the RemoveOptionContract remove_option_contract method. This method is an alias for RemoveSecurity remove_security .

RemoveOptionContract(_optionContractSymbol);
self.remove_option_contract(self._option_contract_symbol)

The RemoveOptionContract remove_option_contract method cancels your open orders for the contract and liquidates your holdings.

Properties

The AddFutureOptionContract method returns an Option object, which have the following properties:

Helper Methods

The Option object provides methods you can use for basic calculations. These methods require the underlying price. To get the Option object and the Security object for its underlying in any function, use the Option Symbol symbol to access the value in the Securities securities object.

var option = Securities[_optionContractSymbol];
var underlying = Securities[_optionContractSymbol.Underlying];
var underlyingPrice = underlying.Price;
option = self.securities[self._option_contract_symbol]
underlying = self.securities[self._option_contract_symbol.underlying]
underlying_price = underlying.price

To get the Option payoff , call the GetPayOff get_pay_off method.

var payOff = option.GetPayOff(underlyingPrice);
pay_off = option.get_pay_off(underlying_price)

To get the Option intrinsic value , call the GetIntrinsicValue get_intrinsic_value method.

var intrinsicValue = option.GetIntrinsicValue(underlyingPrice);
intrinsic_value = option.get_intrinsic_value(underlying_price)

To get the Option out-of-the-money amount , call the OutOfTheMoneyAmount out_of_the_money_amount method.

var otmAmount = option.OutOfTheMoneyAmount(underlyingPrice);
otm_amount = option.out_of_the_money_amount(underlying_price)

To check whether the Option can be automatic exercised, call the IsAutoExercised is_auto_exercised method.

var isAutoExercised = option.IsAutoExercised(underlyingPrice);
is_auto_exercised = option.is_auto_exercised(underlying_price)

 

Future Options

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a TradeBar argument, it only receives TradeBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the TradeBars DataDictionary is made up of TradeBar objects. To access individual data points in the dictionary, you can index the dictionary with the Futures Option contract ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for Future Options data, see Resolutions .

Trades

TradeBar objects are price bars that consolidate individual trades from the exchanges. They contain the open, high, low, close, and volume of trading activity over a period of time.

Tradebar decomposition

TradeBar objects have the following properties:

To get the TradeBar objects in the Slice , index the Slice or index the Bars bars property of the Slice with the Option contract Symbol symbol . If the Option contract doesn't actively trade or you are in the same time step as when you added the Option contract subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your Option contract before you index the Slice with the Option contract Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_optionContractSymbol))
    {
        var tradeBar = slice.Bars[_optionContractSymbol];
    }
}
def on_data(self, slice: Slice) -> None:
    trade_bar = slice.bars.get(self._option_contract_symbol)   # None if not found

You can also iterate through the TradeBars dictionary. The keys of the dictionary are the Symbol objects and the values are the TradeBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        var closePrice = tradeBar.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        close_price = trade_bar.close

Quotes

QuoteBar objects are bars that consolidate NBBO quotes from the exchanges. They contain the open, high, low, and close prices of the bid and ask. The Open open , High high , Low low , and Close close properties of the QuoteBar object are the mean of the respective bid and ask prices. If the bid or ask portion of the QuoteBar has no data, the Open open , High high , Low low , and Close close properties of the QuoteBar copy the values of either the Bid bid or Ask ask instead of taking their mean.

Quotebar decomposition

QuoteBar objects have the following properties:

To get the QuoteBar objects in the Slice , index the QuoteBars property of the Slice with the Option contract Symbol symbol . If the Option contract doesn't actively get quotes or you are in the same time step as when you added the Option contract subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your Option contract before you index the Slice with the Option contract Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_optionContractSymbol))
    {
        var quoteBar = slice.QuoteBars[_optionContractSymbol];
    }
}
def on_data(self, slice: Slice) -> None:
    quote_bar = slice.quote_bars.get(self._option_contract_symbol)   # None if not found

You can also iterate through the QuoteBars dictionary. The keys of the dictionary are the Symbol objects and the values are the QuoteBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        var askPrice = quoteBar.Ask.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        ask_price = quote_bar.ask.close

QuoteBar objects let LEAN incorporate spread costs into your simulated trade fills to make backtest results more realistic.

Futures Chains

FuturesChain objects represent an entire chain of contracts for a single underlying Future. They have the following properties:

To get the FuturesChain , index the FuturesChains futures_chains property of the Slice with the continuous contract Symbol .

public override void OnData(Slice slice)
{
    if (slice.FuturesChains.TryGetValue(_futureContractSymbol.Canonical, out var chain))
    {
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.futures_chains.get(self._future_contract_symbol.canonical)
    if chain:
        contracts = chain.contracts

You can also loop through the FuturesChains futures_chains property to get each FuturesChain .

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.FuturesChains)
    {
        var continuousContractSymbol = kvp.Key;
        var chain = kvp.Value;
        var contracts = chain.Contracts;
    }
}

public void OnData(FuturesChains futuresChains)
{
    foreach (var kvp in futuresChains)
    {
        var continuousContractSymbol = kvp.Key;
        var chain = kvp.Value;
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    for continuous_contract_symbol, chain in slice.futures_chains.items():
        contracts = chain.contracts

Futures Contracts

FuturesContract objects represent the data of a single Futures contract in the market. They have the following properties:

To get the Futures contracts in the Slice , use the Contracts contracts property of the FuturesChain .

public override void OnData(Slice slice)
{
    if (slice.FuturesChains.TryGetValue(_futureContractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_futureContractSymbol, out var contract))
        {
            var price = contract.LastPrice;
        }
    }
}

public void OnData(FuturesChains futuresChains)
{
    if (futuresChains.TryGetValue(_futureContractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_futureContractSymbol, out var contract))
        {
            var price = contract.LastPrice;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.FuturesChains.get(self._future_contract_symbol.Canonical)
    if chain:
        contract = chain.Contracts.get(self._future_contract_symbol)
        if contract:
            price = contract.LastPrice

Option Chains

OptionChain objects represent an entire chain of Option contracts for a single underlying security. They have the following properties:

To get the OptionChain , index the OptionChains option_chains property of the Slice with the canonical Symbol .

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_optionContractSymbol.Canonical, out var chain))
    {
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._option_contract_symbol.Canonical)
    if chain:
        contracts = chain.contracts

You can also loop through the OptionChains option_chains property to get each OptionChain .

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.OptionChains)
    {
        var canonicalFOPSymbol = kvp.Key;
        var chain = kvp.Value;
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    for canonical_fop_symbol, chain in slice.option_chains.items():
        contracts = chain.contracts

Option Contracts

OptionContract objects represent the data of a single Option contract in the market. They have the following properties:

To get the Option contracts in the Slice , use the Contracts contracts property of the OptionChain .

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_optionContractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_optionContractSymbol, out var contract))
        {
            var price = contract.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._option_contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._option_contract_symbol)
        if contract:
            price = contract.price

You can also iterate through the FuturesChains futures_chains first.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.FuturesChains)
    {
        var continuousContractSymbol = kvp.Key;
        var futuresChain = kvp.Value;
        
        // Select a Future Contract and create its canonical FOP Symbol
        var futuresContract = futuresChain.First();
        var canonicalFOPSymbol = QuantConnect.Symbol.CreateCanonicalOption(futuresContract.Symbol);
        if (slice.OptionChains.TryGetValue(canonicalFOPSymbol, out var optionChain))
        {
            if (optionChain.Contracts.TryGetValue(_optionContractSymbol, out var optionContract))
            {
                var price = optionContract.Price;
            }
        }
    }
}
def on_data(self, slice: Slice) -> None:
    for continuous_future_symbol, futures_chain in slice.futures_chains.items():
        # Select a Future Contract and create its canonical FOP Symbol
        futures_contract = [contract for contract in futures_chain][0]
        canonical_fop_symbol = Symbol.create_canonical_option(futures_contract.symbol)
        option_chain = slice.option_chains.get(canonical_fop_symbol)
        if option_chain:
            option_contract = option_chain.contracts.get(self._option_contract_symbol)
            if option_contract:
                price = option_contract.price

Greeks and Implied Volatility

To get the Greeks and implied volatility of an Option contract, use the Greeks greeks and implied_volatility members.

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_optionContractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_optionContractSymbol, out var contract))
        {
            var delta = contract.Greeks.Delta;
            var iv = contract.ImpliedVolatility;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._option_contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._option_contract_symbol)
        if contract:
            delta = contract.greeks.delta
            iv = contract.implied_volatility

LEAN only calculates Greeks and implied volatility when you request them because they are expensive operations. If you invoke the Greeks greeks property, the Greeks aren't calculated. However, if you invoke the Greeks.Delta greeks.delta , LEAN calculates the delta. To avoid unecessary computation in your algorithm, only request the Greeks and implied volatility when you need them. For more information about the Greeks and implied volatility, see Options Pricing .

Open Interest

Open interest is the number of outstanding contracts that haven't been settled. It provides a measure of investor interest and the market liquidity, so it's a popular metric to use for contract selection. Open interest is calculated once per day. To get the latest open interest value, use the OpenInterest open_interest property of the Option or OptionContract Optioncontract .

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var openInterest = contract.OpenInterest;
        }
    }
}

public void OnData(OptionChains optionChains)
{
    if (optionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var openInterest = contract.OpenInterest;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.OptionChains.get(self._contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._contract_symbol)
        if contract:
            open_interest = contract.open_interest

 

Future Options

Market Hours

Introduction

The Future Option markets have the same hours as the Futures market. For more information, see the supported contracts and the market hours of Future markets .

 

Asset Classes

Index

There are cash Indices and volatility Indices. The former is a hypothetical portfolio that represents a segment of the financial market and the latter shows the expected level of price fluctuation in an Index Option.

See Also

BasicTemplateIndexAlgorithm.py
BasicTemplateIndexAlgorithm.cs

 

Index

Requesting Data

Introduction

Request Index data in your algorithm to receive a feed of Index prices in the OnData on_data method. For more information about the specific dataset we use for backtests, see the US Cash Indices dataset listing . To trade live with Index data, you can use one of the brokerage data providers .

Create Subscriptions

To create an Index subscription, in the Initialize initialize method, call the AddIndex add_index method. The AddIndex add_index method returns an Index object, which contains a Symbol symbol property. Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

_symbol = AddIndex("VIX").Symbol;
self._symbol = self.add_index("VIX").symbol

To view the supported assets in the US Cash Indices dataset, see the Supported Indices .

Resolutions

The following table shows the available resolutions and data formats for Index subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK

Second SECOND

Minute MINUTE green check
Hour HOUR green check
Daily DAILY green check

The default resolution for Index subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddIndex add_index method.

_symbol = AddIndex("VIX", Resolution.Daily).Symbol;
self._symbol = self.add_index("VIX", Resolution.DAILY).symbol

To create custom resolution periods, see Consolidating Data .

Supported Markets

The only market available for Indices is Market.USA , so you don't need to pass a market argument to the AddIndex add_index method.

_symbol = AddIndex("VIX", market: Market.USA).Symbol;
self._symbol = self.add_index("VIX", market=Market.USA).symbol

The brokerage models have a default market for each asset class. If you set a brokerage model, you may not need to specify the market to use.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

_symbol = AddIndex("VIX", fillForward: false).Symbol;
self._symbol = self.add_index("VIX", fill_forward=False).symbol

Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to OnData on_data or the data from history request . If you change the data normalization mode, it won't change the outcome.

Properties

The AddIndex add_index method returns an Index object, which have the following properties:

 

Index

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a Tick argument, it only receives Tick objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the Ticks DataDictionary is made up of Tick objects. To access individual data points in the dictionary, you can index the dictionary with the Index ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for Index data, see Resolutions .

Bars

You can't trade Indices, but TradeBar objects are bars that represent the open, high, low, and close of an Index price over a period of time.

Trade bar breakdown

TradeBar objects have the following properties:

To get the TradeBar objects in the Slice , index the Slice or index the Bars bars property of the Slice with the Index Symbol . The Slice may not contain data for your Symbol at every time step. To avoid issues, check if the Slice contains data for your Index before you index the Slice with the Index Symbol .

public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        var value = tradeBar.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    if self._symbol in slice.bars:
        trade_bar = slice.bars[self._symbol]
        value = trade_bar.value

 

Index

Market Hours

Introduction

This page shows the trading hours, holidays, and time zone of the US Indices market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US Indices market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 15:20:00
Tuesday 08:30:00 to 15:20:00
Wednesday 08:30:00 to 15:20:00
Thursday 08:30:00 to 15:20:00
Friday 08:30:00 to 15:20:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US Indices market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the US Indices market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
1999-11-26 12:00:00
2000-07-03 12:00:00
2000-11-24 12:00:00
2001-07-03 12:00:00
2001-11-23 12:00:00
2001-12-24 12:00:00
2002-07-05 12:00:00
2002-11-29 12:00:00
2002-12-24 12:00:00
2003-07-03 12:00:00
2003-11-28 12:00:00
2003-12-24 12:00:00
2003-12-26 12:00:00
2004-11-26 12:00:00
2005-11-25 12:00:00
2006-07-03 12:00:00
2006-11-24 12:00:00
2007-07-03 12:00:00
2007-11-23 12:00:00
2007-12-24 12:00:00
2008-07-03 12:00:00
2008-11-28 12:00:00
2008-12-24 12:00:00
2009-11-27 12:00:00
2009-12-24 12:00:00
2010-11-26 12:00:00
2011-11-25 12:00:00
2012-07-03 12:00:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-07-03 12:00:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-07-03 12:00:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-11-27 12:00:00
2015-12-24 12:00:00
2016-11-25 12:00:00
2017-07-03 12:00:00
2017-11-24 12:00:00
2017-12-24 12:00:00
2018-07-03 12:00:00
2018-11-23 12:00:00
2018-12-24 12:00:00
2019-07-03 12:00:00
2019-11-29 12:00:00
2019-12-24 12:00:00
2020-11-27 12:00:00
2020-12-24 12:00:00
2021-11-26 12:00:00
2022-11-25 12:00:00
2023-07-03 12:00:00
2023-11-24 12:00:00
2024-07-03 12:00:00
2024-11-29 12:00:00
2024-12-24 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The US Indices market trades in the following time zones:

Assets With Other Hours

The following table shows the indices that have different trading periods than the overall US Indices market:

Symbol Name
NDX Nasdaq 100 Index
SPX S&P 500 Index
VIX CBOE Volatility Index

 

Market Hours

NDX

Introduction

This page shows the trading hours, holidays, and time zone of the Nasdaq 100 Index market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Nasdaq 100 Index market:

Weekday Time (America/New York)
Monday 09:30:00 to 16:00:00
Tuesday 09:30:00 to 16:00:00
Wednesday 09:30:00 to 16:00:00
Thursday 09:30:00 to 16:00:00
Friday 09:30:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Nasdaq 100 Index market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-06-19

Early Closes

The following table shows the early closes for the Nasdaq 100 Index market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Nasdaq 100 Index market trades in the America/New York time zone.

 

Market Hours

SPX

Introduction

This page shows the trading hours, holidays, and time zone of the S&P 500 Index market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the S&P 500 Index market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 15:15:00
Tuesday 08:30:00 to 15:15:00
Wednesday 08:30:00 to 15:15:00
Thursday 08:30:00 to 15:15:00
Friday 08:30:00 to 15:15:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the S&P 500 Index market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-06-19

Early Closes

The following table shows the early closes for the S&P 500 Index market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
1999-11-26 12:00:00
2000-07-03 12:00:00
2000-11-24 12:00:00
2001-07-03 12:00:00
2001-11-23 12:00:00
2001-12-24 12:00:00
2002-07-05 12:00:00
2002-11-29 12:00:00
2002-12-24 12:00:00
2003-07-03 12:00:00
2003-11-28 12:00:00
2003-12-24 12:00:00
2003-12-26 12:00:00
2004-11-26 12:00:00
2005-11-25 12:00:00
2006-07-03 12:00:00
2006-11-24 12:00:00
2007-07-03 12:00:00
2007-11-23 12:00:00
2007-12-24 12:00:00
2008-07-03 12:00:00
2008-11-28 12:00:00
2008-12-24 12:00:00
2009-11-27 12:00:00
2009-12-24 12:00:00
2010-11-26 12:00:00
2011-11-25 12:00:00
2012-07-03 12:00:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-07-03 12:00:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-07-03 12:00:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-11-27 12:00:00
2015-12-24 12:00:00
2016-11-25 12:00:00
2017-07-03 12:00:00
2017-11-24 12:00:00
2017-12-24 12:00:00
2018-07-03 12:00:00
2018-11-23 12:00:00
2018-12-24 12:00:00
2019-07-03 12:00:00
2019-11-29 12:00:00
2019-12-24 12:00:00
2020-11-27 12:00:00
2020-12-24 12:00:00
2021-11-26 12:00:00
2022-11-25 12:00:00
2023-07-03 12:00:00
2023-11-24 12:00:00
2024-07-03 12:00:00
2024-11-29 12:00:00
2024-12-24 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The S&P 500 Index market trades in the America/Chicago time zone.

 

Market Hours

VIX

Introduction

This page shows the trading hours, holidays, and time zone of the CBOE Volatility Index market.

Pre-market Hours

The following table shows the pre-market hours for the CBOE Volatility Index market:

Weekday Time (America/Chicago)
Monday 02:15:00 to 08:15:00
Tuesday 02:15:00 to 08:15:00
Wednesday 02:15:00 to 08:15:00
Thursday 02:15:00 to 08:15:00
Friday 02:15:00 to 08:15:00

Regular Trading Hours

The following table shows the regular trading hours for the CBOE Volatility Index market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 15:15:00
Tuesday 08:30:00 to 15:15:00
Wednesday 08:30:00 to 15:15:00
Thursday 08:30:00 to 15:15:00
Friday 08:30:00 to 15:15:00

Post-market Hours

The following table shows the post-market hours for the CBOE Volatility Index market:

Weekday Time (America/Chicago)
Monday 15:15:00 to 16:00:00
Tuesday 15:15:00 to 16:00:00
Wednesday 15:15:00 to 16:00:00
Thursday 15:15:00 to 16:00:00
Friday 15:15:00 to 16:00:00

Holidays

The following table shows the dates of holidays for the CBOE Volatility Index market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-06-19

Early Closes

The following table shows the early closes for the CBOE Volatility Index market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
1999-11-26 12:15:00
2000-07-03 12:15:00
2000-11-24 12:15:00
2001-07-03 12:15:00
2001-11-23 12:15:00
2001-12-24 12:15:00
2002-07-05 12:15:00
2002-11-29 12:15:00
2002-12-24 12:15:00
2003-07-03 12:15:00
2003-11-28 12:15:00
2003-12-24 12:15:00
2003-12-26 12:15:00
2004-11-26 12:15:00
2005-11-25 12:15:00
2006-07-03 12:15:00
2006-11-24 12:15:00
2007-07-03 12:15:00
2007-11-23 12:15:00
2007-12-24 12:15:00
2008-07-03 12:15:00
2008-11-28 12:15:00
2008-12-24 12:15:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-11-26 12:15:00
2011-11-25 12:15:00
2012-07-03 12:15:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-07-03 12:15:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-07-03 12:15:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-11-25 12:15:00
2017-07-03 12:15:00
2017-11-24 12:15:00
2017-12-24 12:15:00
2018-07-03 12:15:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-07-03 12:15:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-11-26 12:15:00
2022-11-25 12:15:00
2023-11-24 12:15:00
2024-07-03 12:00:00
2024-11-29 12:00:00
2024-12-24 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The CBOE Volatility Index market trades in the America/Chicago time zone.

 

Asset Classes

Index Options

Index Options are a financial derivative that gives the holder the right (but not the obligation) to buy or sell the value of an underlying Index, such as the S&P 500 index, at the stated exercise price. No actual assets are bought or sold.

See Also

BasicTemplateIndexOptionsAlgorithm.py
BasicTemplateIndexOptionsAlgorithm.cs

 

Index Options

Requesting Data

Introduction

Request Index Options data in your algorithm to receive a feed of contract prices in the OnData on_data method. For more information about the specific dataset we use for backtests, see the US Index Options dataset listing . To trade Index Options live, you can use one of the brokerage data providers . Index Options are exclusively European-style Options.

Create Subscriptions

Before you can subscribe to an Index Option contract, you must configure the underlying Index and get the contract Symbol symbol .

Configure the Underlying Index

In most cases, you should subscribe to the underlying Index before you subscribe to an Index Option contract.

_symbol = AddIndex("SPX").Symbol;
self._symbol = self.add_index("SPX").symbol

If you subscribe to an Index Option contract but don't have a subscription to the underlying Index, LEAN automatically subscribes to the underlying Index and sets its fill forward property to match that of the Index Option contract. In this case, you still need the Index Symbol symbol to subscribe to Index Option contracts. If you don't have access to it, create it.

_symbol = QuantConnect.Symbol.Create("SPX", SecurityType.Index, Market.USA);
self._symbol = Symbol.create("SPX", SecurityType.INDEX, Market.USA)

To override the initial guess of implied volatility , set and warm up the underlying volatility model .

Get Contract Symbols

To get Index Option contract Symbol objects, call the CreateOption create_option method or use the OptionChainProvider option_chain_provider . If you use the CreateOption create_option method, you need to know the specific contract details.

// Standard contracts
_contractSymbol = QuantConnect.Symbol.CreateOption(_symbol, Market.USA,
    OptionStyle.European, OptionRight.Call, 3650, new DateTime(2022, 6, 17));

// Weekly contracts
_weeklyContractSymbol = QuantConnect.Symbol.CreateOption(_symbol, "SPXW", Market.USA,
    OptionStyle.European, OptionRight.Call, 3650, new DateTime(2022, 6, 17));
# Standard contracts
self._contract_symbol = Symbol.create_option(self._symbol, Market.USA,
    OptionStyle.EUROPEAN, OptionRight.CALL, 3650, datetime(2022, 6, 17))

# Weekly contracts
self._weekly_contract_symbol = Symbol.create_option(self._symbol, "SPXW", Market.USA,
    OptionStyle.EUROPEAN, OptionRight.CALL, 3650, datetime(2022, 6, 17))

Another way to get an Index Option contract Symbol is to use the OptionChainProvider option_chain_provider . The GetOptionContractList get_option_contract_list method of OptionChainProvider returns a list of Symbol objects that reference the available Option contracts for a given underlying Index on a given date. To filter and select contracts, you can use the following properties of each Symbol object:

Property Description
ID.Date id.date The expiration date of the contract.
ID.StrikePrice id.strike_price The strike price of the contract.
ID.OptionRight id.option_right The contract type. The OptionRight enumeration has the following members:
ID.OptionStyle id.option_style The contract style. The OptionStyle enumeration has the following members:
We currently only support European-style Options for Index Options.
// Standard contracts
_canonicalSymbol = QuantConnect.Symbol.CreateCanonicalOption(_symbol, Market.USA, "?SPX");
var contractSymbols = OptionChainProvider.GetOptionContractList(_canonicalSymbol, Time);
var expiry = contractSymbols.Select(symbol => symbol.ID.Date).Min();
var filteredSymbols = contractSymbols.Where(symbol => symbol.ID.Date == expiry && symbol.ID.OptionRight == OptionRight.Call);
_contractSymbol = filteredSymbols.OrderByDescending(symbol => symbol.ID.StrikePrice).Last();

// Weekly contracts
_weeklyCanonicalSymbol = QuantConnect.Symbol.CreateCanonicalOption(_symbol, "SPXW", Market.USA, "?SPXW");
var weeklyContractSymbols = OptionChainProvider.GetOptionContractList(_weeklyCanonicalSymbol, Time)
    .Where(symbol => OptionSymbol.IsWeekly(symbol));
var weeklyExpiry = weeklyContractSymbols.Select(symbol => symbol.ID.Date).Min();
filteredSymbols = contractSymbols.Where(symbol => symbol.ID.Date == weeklyExpiry && symbol.ID.OptionRight == OptionRight.Call);
_weeklyContractSymbol = filteredSymbols.OrderByDescending(symbol => symbol.ID.StrikePrice).Last();
# Standard contracts
self._canonical_symbol = Symbol.create_canonical_option(self._symbol, Market.USA, "?SPX")       
contract_symbols = self.option_chain_provider.get_option_contract_list(self._canonical_symbol, self.time)
expiry = min([symbol.id.date for symbol in contract_symbols])
filtered_symbols = [symbol for symbol in contract_symbols if symbol.id.date == expiry and symbol.id.option_right == OptionRight.CALL]
self._contract_symbol = sorted(filtered_symbols, key=lambda symbol: symbol.id.strike_price)[0]

# Weekly contracts
self._weekly_canonical_symbol = Symbol.create_canonical_option(self._symbol, "SPXW", Market.USA, "?SPXW")
weekly_contract_symbols = self.option_chain_provider.get_option_contract_list(self._weekly_canonical_symbol, self.time)
weekly_contract_symbols = [symbol for symbol in weekly_contract_symbols if OptionSymbol.is_weekly(symbol)]
weekly_expiry = min([symbol.id.date for symbol in weekly_contract_symbols])
weekly_filtered_symbols = [symbol for symbol in weekly_contract_symbols if symbol.id.date == weekly_expiry and symbol.id.option_right == OptionRight.CALL]
self._weekly_contract_symbol = sorted(weekly_filtered_symbols, key=lambda symbol: symbol.id.strike_price)[0]

Subscribe to Contracts

To create an Index Option contract subscription, pass the contract Symbol to the AddIndexOptionContract add_index_option_contract method. Save a reference to the contract Symbol so you can easily access the contract in the OptionChain that LEAN passes to the OnData on_data method. To override the default pricing model of the Option, set a pricing model .

var option = AddIndexOptionContract(_contractSymbol);
option.PriceModel = OptionPriceModels.BlackScholes();
option = self.add_index_option_contract(self._contract_symbol)
option.PriceModel = OptionPriceModels.black_scholes()

The AddIndexOptionContract add_index_option_contract method creates a subscription for a single Index Option contract and adds it to your user-defined universe. To create a dynamic universe of Index Option contracts, add an Index Option universe .

Warm Up Contract Prices

If you subscribe to an Index Option contract with AddIndexOptionContract add_index_option_contract , you'll need to wait until the next Slice to receive data and trade the contract. To trade the contract in the same time step you subscribe to the contract, set the current price of the contract in a security initializer .

var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, seeder));
seeder = FuncSecuritySeeder(self.get_last_known_prices)
self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, seeder))

Supported Assets

To view the supported assets in the US Index Options dataset, see Supported Assets .

Resolutions

The following table shows the available resolutions and data formats for Index Option contract subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK

Second SECOND

Minute MINUTE green check green check
Hour HOUR green check green check
Daily DAILY green check green check

The default resolution for Index Option subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddIndexOptionContract add_index_option_contract method.

AddIndexOptionContract(_contractSymbol, Resolution.Hour);
self.add_index_option_contract(self._contract_symbol, Resolution.HOUR)

To create custom resolution periods, see Consolidating Data .

Supported Markets

The following Market enumeration members are available for Index Options:

You don't need to pass a Market market argument to the AddIndexOptionContract add_index_option_contract method because the contract Symbol already contains the market.

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

AddIndexOptionContract(_contractSymbol, fillForward: false);
self.add_index_option_contract(self._contract_symbol, fill_forward=False)

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. Options are already leveraged products, so you can't change their leverage.

Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to OnData on_data or the data from history request . If you change the data normalization mode, it won't change the outcome.

Remove Subscriptions

To remove a contract subscription that you created with AddIndexOptionContract , call the RemoveOptionContract remove_option_contract method. This method is an alias for RemoveSecurity remove_security .

RemoveOptionContract(_contractSymbol);
self.remove_option_contract(self._contract_symbol)

The RemoveOptionContract remove_option_contract method cancels your open orders for the contract and liquidates your holdings.

Properties

The AddIndexOptionContract method returns an Option object, which have the following properties:

Helper Methods

The Option object provides methods you can use for basic calculations. These methods require the underlying price. To get the Option object and the Security object for its underlying in any function, use the Option Symbol symbol to access the value in the Securities securities object.

var option = Securities[_contractSymbol];
var underlying = Securities[_contractSymbol.Underlying];
var underlyingPrice = underlying.Price;
option = self.securities[self._contract_symbol]
underlying = self.securities[self._contract_symbol.underlying]
underlying_price = underlying.price

To get the Option payoff , call the GetPayOff get_pay_off method.

var payOff = option.GetPayOff(underlyingPrice);
pay_off = option.get_pay_off(underlying_price)

To get the Option intrinsic value , call the GetIntrinsicValue get_intrinsic_value method.

var intrinsicValue = option.GetIntrinsicValue(underlyingPrice);
intrinsic_value = option.get_intrinsic_value(underlying_price)

To get the Option out-of-the-money amount , call the OutOfTheMoneyAmount out_of_the_money_amount method.

var otmAmount = option.OutOfTheMoneyAmount(underlyingPrice);
otm_amount = option.out_of_the_money_amount(underlying_price)

To check whether the Option can be automatic exercised, call the IsAutoExercised is_auto_exercised method.

var isAutoExercised = option.IsAutoExercised(underlyingPrice);
is_auto_exercised = option.is_auto_exercised(underlying_price)

Example

The following example shows how to update the Option chain every five minutes. The OptionChainManager class implements the selection logic and manages the contract subscriptions.

namespace QuantConnect.Algorithm.CSharp
{
    public class OptionChainProviderFullExample : QCAlgorithm
    {
        private Dictionary<Symbol, OptionChainManager> _chainManager = new();
        public override void Initialize()
        {
            SetStartDate(2023, 1, 2);
            SetEndDate(2023, 1, 30);
            SetCash(100000);
            UniverseSettings.Asynchronous = true;
            UniverseSettings.MinimumTimeInUniverse = TimeSpan.Zero;
            SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
            var spx = AddIndex("SPX").Symbol;
            _chainManager[QuantConnect.Symbol.CreateCanonicalOption(spx, "SPXW", Market.USA, "?SPXW")] = new(-10, 10, 0, 1);
            PopulateOptionChain();
            Schedule.On(DateRules.EveryDay(spx), TimeRules.AfterMarketOpen(spx, 1), PopulateOptionChain);
            Schedule.On(DateRules.EveryDay(spx), TimeRules.Every(TimeSpan.FromMinutes(5)), Filter);
        }
        
        private void PopulateOptionChain()
        {
            // The contract list is updated daily, so we can get it and apply
            // the expiration filter as soon as the market open
            foreach (var (symbol, manager) in _chainManager)
            {
                manager.SetChain(OptionChainProvider.GetOptionContractList(symbol, Time), Time);
            }
    
            Filter();
        }
        
        private void Filter()
        {
            foreach (var (symbol, manager) in _chainManager)
            {
                manager.Select(this, symbol);
            }
        }
        
        public override void OnData(Slice slice)
        {
            foreach (var (symbol, manager) in _chainManager)
            {
                if (!slice.OptionChains.TryGetValue(symbol, out var chain))
                    continue;
                var expiry = chain.Min(x => x.Expiry);
                var atmCall = chain
                    .Where(x => x.Expiry == expiry && x.Right == OptionRight.Call && Securities[x.Symbol].IsTradable)
                    .OrderBy(x => Math.Abs(chain.Underlying.Price - x.Strike))
                    .FirstOrDefault();

                if (atmCall != null && !Portfolio[atmCall.Symbol].Invested)
                    MarketOrder(atmCall.Symbol, 1);
            }
        }
    }

    internal class OptionChainManager
    {
        private readonly int _minStrike;
        private readonly int _maxStrike;
        private readonly int _minExpiry;
        private readonly int _maxExpiry;
        private List<Symbol> _chain = new();
        private readonly List<Symbol> _symbols = new();

        public OptionChainManager(int minStrike, int maxStrike, int minExpiry, int maxExpiry)
        {
            _minStrike = minStrike;
            _maxStrike = maxStrike;
            _minExpiry = minExpiry;
            _maxExpiry = maxExpiry;
        }

        public void SetChain(IEnumerable<Symbol> symbols, DateTime time)
        {
            _chain = symbols.Where(x =>
            {
                var totalDays = (x.ID.Date - time).TotalDays;
                return _minExpiry <= totalDays && totalDays <= _maxExpiry;
            }).ToList();
        }
        
        public void Select(QCAlgorithm algorithm, Symbol underlyingSymbol)
        {
            if (_chain.IsNullOrEmpty())
                return;
            if (underlyingSymbol.IsCanonical())
                underlyingSymbol = underlyingSymbol.Underlying;

            var strikes = _chain.Select(x => x.ID.StrikePrice).OrderBy(x => x).Distinct().ToList();
            var spot = algorithm.Securities[underlyingSymbol].Price;
            var atm = strikes.OrderBy(x => Math.Abs(spot - x)).FirstOrDefault();
            var index = strikes.IndexOf(atm);
            var minStrike = strikes[Math.Max(0, index + _minStrike)];
            var maxStrike = strikes[Math.Min(strikes.Count - 1, index + _maxStrike)];
            var symbols = _chain.Where(x => minStrike <= x.ID.StrikePrice && x.ID.StrikePrice <= maxStrike).ToList();

            var toRemove = _symbols.Except(symbols).ToList();
            foreach (var symbol in toRemove)
            {
                if (algorithm.RemoveOptionContract(symbol))
                    _symbols.Remove(symbol);
            }
            var toAdd = symbols.Except(_symbols).ToList();
            foreach (var symbol in toAdd)
            {
                _symbols.Add(symbol);
                algorithm.AddOptionContract(symbol);
            }
        }
    }
}
class OptionChainProviderFullExample(QCAlgorithm):

    def initialize(self):
        self.set_start_date(2023, 1, 2)
        self.set_end_date(2023, 1, 30)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        self.universe_settings.minimum_time_in_universe = timedelta(minutes=0)
        self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
        spx = self.add_index("SPX").symbol
        self._chain_manager = {
            Symbol.create_canonical_option(spx, "SPXW", Market.USA, "?SPXW"): OptionChainManager(-10, 10, 0, 1)
        }
        self._populate_option_chain()
        self.schedule.on(self.date_rules.every_day(spx), self.time_rules.after_market_open(spx, 1), self._populate_option_chain)
        self.schedule.on(self.date_rules.every_day(spx), self.time_rules.every(timedelta(minutes=5)), self._filter)

    def _populate_option_chain(self):
        # The contract list is updated daily, so we can get it and apply
        # the expiration filter as soon as the market open
        for symbol, manager in self._chain_manager.items():
            manager.set_chain(self.option_chain_provider.get_option_contract_list(symbol, self.time), self.time)
        self.filter()

    def _filter(self):
        for symbol, manager in self._chain_manager.items():
            manager.select(self, symbol)

    def on_data(self, slice: Slice) -> None:
        for symbol, _ in self._chain_manager.items():
            chain = slice.option_chains.get(symbol)
            if not chain: continue
            if self.portfolio[symbol.underlying].invested:
                self.liquidate(symbol.underlying)

            expiry = min([x.expiry for x in chain])
            contracts = [x for x in chain if x.expiry == expiry and x.right == OptionRight.CALL and self.securities[x.symbol].is_tradable]
            if not contracts: continue
            atm_call = sorted(contracts, key=lambda x: abs(chain.underlying.price-x.strike))[0]

            if not self.portfolio[atm_call.symbol].invested:
                self.market_order(atm_call.symbol, 1)

class OptionChainManager:
    _chain = []
    _symbols = []
        
    def __init__(self, min_strike, max_strike, min_expiry, max_expiry):
        self._min_strike = min_strike
        self._max_strike = max_strike
        self._min_expiry = min_expiry
        self._max_expiry = max_expiry
        
    def set_chain(self, symbols: List[Symbol], time: datetime) -> None:
        self.chain = [x for x in symbols if self._min_expiry <= (x.id.date - time).days <= self._max_expiry]
        
    def select(self, algorithm: QCAlgorithm, symbol: Symbol) -> None:
        if not self._chain:
            return
        if symbol.is_canonical():
            symbol = symbol.underlying
        strikes = sorted(set(x.id.strike_price for x in self._chain))
        spot = algorithm.securities[symbol].price
        atm = sorted(strikes, key=lambda x: abs(spot-x))[0]
        index = strikes.index(atm)
        min_strike = strikes[max(0, index + self._min_strike)]
        max_strike = strikes[min(len(strikes) - 1, index + self._max_strike)]
        symbols = set(x for x in self.chain if min_strike <= x.id.strike_price <= max_strike)
        to_remove = set(self._symbols).difference(symbols)
        for symbol in to_remove:
            if algorithm.remove_option_contract(symbol):
                self._symbols.remove(symbol)
        to_add = symbols.difference(self._symbols)
        for symbol in to_add:
            self._symbols.append(symbol)
            algorithm.add_option_contract(symbol)

 

Index Options

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a TradeBar argument, it only receives TradeBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the TradeBars DataDictionary is made up of TradeBar objects. To access individual data points in the dictionary, you can index the dictionary with the contract ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for Index Options data, see Resolutions .

Trades

TradeBar objects are price bars that consolidate individual trades from the exchanges. They contain the open, high, low, close, and volume of trading activity over a period of time.

Tradebar decomposition

TradeBar objects have the following properties:

To get the TradeBar objects in the Slice , index the Slice or index the Bars bars property of the Slice with the contract Symbol symbol . If the contract doesn't actively trade or you are in the same time step as when you added the contract subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your contract before you index the Slice with the contract Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_contractSymbol))
    {
        var tradeBar = slice.Bars[_contractSymbol];
    }
}
def on_data(self, slice: Slice) -> None:
    trade_bar = slice.bars.get(self._contract_symbol)   # None if not found

You can also iterate through the TradeBars dictionary. The keys of the dictionary are the Symbol objects and the values are the TradeBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        var closePrice = tradeBar.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        close_price = trade_bar.close

Quotes

QuoteBar objects are bars that consolidate NBBO quotes from the exchanges. They contain the open, high, low, and close prices of the bid and ask. The Open open , High high , Low low , and Close close properties of the QuoteBar object are the mean of the respective bid and ask prices. If the bid or ask portion of the QuoteBar has no data, the Open open , High high , Low low , and Close close properties of the QuoteBar copy the values of either the Bid bid or Ask ask instead of taking their mean.

Quotebar decomposition

QuoteBar objects have the following properties:

To get the QuoteBar objects in the Slice , index the QuoteBars property of the Slice with the contract Symbol symbol . If the contract doesn't actively get quotes or you are in the same time step as when you added the contract subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your contract before you index the Slice with the contract Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_contractSymbol))
    {
        var quoteBar = slice.QuoteBars[_contractSymbol];
    }
}
def on_data(self, slice: Slice) -> None:
    quote_bar = slice.quote_bars.get(self._contract_symbol)   # None if not found

You can also iterate through the QuoteBars dictionary. The keys of the dictionary are the Symbol objects and the values are the QuoteBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        var askPrice = quoteBar.Ask.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        ask_price = quote_bar.ask.close

QuoteBar objects let LEAN incorporate spread costs into your simulated trade fills to make backtest results more realistic.

Option Chains

OptionChain objects represent an entire chain of Option contracts for a single underlying security. They have the following properties:

To get the OptionChain , index the OptionChains option_chains property of the Slice with the canonical Symbol .

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._contract_symbol.Canonical)
    if chain:
        contracts = chain.contracts

You can also loop through the OptionChains option_chains property to get each OptionChain .

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.OptionChains)
    {
        var canonicalSymbol = kvp.Key;
        var chain = kvp.Value;
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    for canonical_symbol, chain in slice.option_chains.items():
        contracts = chain.contracts

Option Contracts

OptionContract objects represent the data of a single Option contract in the market. They have the following properties:

To get the Option contracts in the Slice , use the Contracts contracts property of the OptionChain .

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var price = contract.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._contract_symbol)
        if contract:
            price = contract.price

Greeks and Implied Volatility

To get the Greeks and implied volatility of an Option contract, use the Greeks greeks and implied_volatility members.

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var delta = contract.Greeks.Delta;
            var iv = contract.ImpliedVolatility;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._contract_symbol)
        if contract:
            delta = contract.greeks.delta
            iv = contract.implied_volatility

LEAN only calculates Greeks and implied volatility when you request them because they are expensive operations. If you invoke the Greeks greeks property, the Greeks aren't calculated. However, if you invoke the Greeks.Delta greeks.delta , LEAN calculates the delta. To avoid unecessary computation in your algorithm, only request the Greeks and implied volatility when you need them. For more information about the Greeks and implied volatility, see Options Pricing .

Open Interest

Open interest is the number of outstanding contracts that haven't been settled. It provides a measure of investor interest and the market liquidity, so it's a popular metric to use for contract selection. Open interest is calculated once per day. To get the latest open interest value, use the OpenInterest open_interest property of the Option or OptionContract Optioncontract .

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var openInterest = contract.OpenInterest;
        }
    }
}

public void OnData(OptionChains optionChains)
{
    if (optionChains.TryGetValue(_contractSymbol.Canonical, out var chain))
    {
        if (chain.Contracts.TryGetValue(_contractSymbol, out var contract))
        {
            var openInterest = contract.OpenInterest;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.OptionChains.get(self._contract_symbol.canonical)
    if chain:
        contract = chain.contracts.get(self._contract_symbol)
        if contract:
            open_interest = contract.open_interest

 

Index Options

Market Hours

Introduction

This page shows the trading hours, holidays, and time zone of the US Index Option market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US Index Option market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 15:20:00
Tuesday 08:30:00 to 15:20:00
Wednesday 08:30:00 to 15:20:00
Thursday 08:30:00 to 15:20:00
Friday 08:30:00 to 15:20:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US Index Option market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25

Early Closes

The following table shows the early closes for the US Index Option market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
1999-11-26 12:00:00
2000-07-03 12:00:00
2000-11-24 12:00:00
2001-07-03 12:00:00
2001-11-23 12:00:00
2001-12-24 12:00:00
2002-07-05 12:00:00
2002-11-29 12:00:00
2002-12-24 12:00:00
2003-07-03 12:00:00
2003-11-28 12:00:00
2003-12-24 12:00:00
2003-12-26 12:00:00
2004-11-26 12:00:00
2005-11-25 12:00:00
2006-07-03 12:00:00
2006-11-24 12:00:00
2007-07-03 12:00:00
2007-11-23 12:00:00
2007-12-24 12:00:00
2008-07-03 12:00:00
2008-11-28 12:00:00
2008-12-24 12:00:00
2009-11-27 12:00:00
2009-12-24 12:00:00
2010-11-26 12:00:00
2011-11-25 12:00:00
2012-07-03 12:00:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-07-03 12:00:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-07-03 12:00:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-11-27 12:00:00
2015-12-24 12:00:00
2016-11-25 12:00:00
2017-07-03 12:00:00
2017-11-24 12:00:00
2017-12-24 12:00:00
2018-07-03 12:00:00
2018-11-23 12:00:00
2018-12-24 12:00:00
2019-07-03 12:00:00
2019-11-29 12:00:00
2019-12-24 12:00:00
2020-11-27 12:00:00
2020-12-24 12:00:00
2021-11-26 12:00:00
2022-11-25 12:00:00
2023-07-03 12:00:00
2023-11-24 12:00:00
2024-07-03 12:00:00
2024-11-29 12:00:00
2024-12-24 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The US Index Option market trades in the following time zones:

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall US Index Option market:

Symbol Name
NDX Nasdaq 100 Index
SPX S&P 500 Index
VIX CBOE Volatility Index

 

Market Hours

NDX

Introduction

This page shows the trading hours, holidays, and time zone of the Nasdaq 100 Index Option contracts market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Nasdaq 100 Index Option contracts market:

Weekday Time (America/New York)
Monday 09:30:00 to 16:15:00
Tuesday 09:30:00 to 16:15:00
Wednesday 09:30:00 to 16:15:00
Thursday 09:30:00 to 16:15:00
Friday 09:30:00 to 16:15:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Nasdaq 100 Index Option contracts market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-06-19

Early Closes

The following table shows the early closes for the Nasdaq 100 Index Option contracts market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Nasdaq 100 Index Option contracts market trades in the America/New York time zone.

 

Market Hours

SPX

Introduction

This page shows the trading hours, holidays, and time zone of the S&P 500 Index Option contracts market.

Pre-market Hours

The following table shows the pre-market hours for the S&P 500 Index Option contracts market:

Weekday Time (America/Chicago)
Sunday 19:15:00 to 24:00:00
Monday 00:00:00 to 08:15:00
Tuesday 00:00:00 to 08:15:00
Wednesday 00:00:00 to 08:15:00
Thursday 00:00:00 to 08:15:00
Friday 00:00:00 to 08:15:00

Regular Trading Hours

The following table shows the regular trading hours for the S&P 500 Index Option contracts market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 15:15:00
Tuesday 08:30:00 to 15:15:00
Wednesday 08:30:00 to 15:15:00
Thursday 08:30:00 to 15:15:00
Friday 08:30:00 to 15:15:00

Post-market Hours

The following table shows the post-market hours for the S&P 500 Index Option contracts market:

Weekday Time (America/Chicago)
Monday 15:15:00 to 16:00:00, 19:15:00 to 24:00:00
Tuesday 15:15:00 to 16:00:00, 19:15:00 to 24:00:00
Wednesday 15:15:00 to 16:00:00, 19:15:00 to 24:00:00
Thursday 15:15:00 to 16:00:00, 19:15:00 to 24:00:00
Friday 15:15:00 to 16:00:00

Holidays

The following table shows the dates of holidays for the S&P 500 Index Option contracts market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-06-19

Early Closes

The following table shows the early closes for the S&P 500 Index Option contracts market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
1999-11-26 12:00:00
2000-07-03 12:00:00
2000-11-24 12:00:00
2001-07-03 12:00:00
2001-11-23 12:00:00
2001-12-24 12:00:00
2002-07-05 12:00:00
2002-11-29 12:00:00
2002-12-24 12:00:00
2003-07-03 12:00:00
2003-11-28 12:00:00
2003-12-24 12:00:00
2003-12-26 12:00:00
2004-11-26 12:00:00
2005-11-25 12:00:00
2006-07-03 12:00:00
2006-11-24 12:00:00
2007-07-03 12:00:00
2007-11-23 12:00:00
2007-12-24 12:00:00
2008-07-03 12:00:00
2008-11-28 12:00:00
2008-12-24 12:00:00
2009-11-27 12:00:00
2009-12-24 12:00:00
2010-11-26 12:00:00
2011-11-25 12:00:00
2012-07-03 12:00:00
2012-11-23 12:00:00
2012-12-24 12:00:00
2013-07-03 12:00:00
2013-11-29 12:00:00
2013-12-24 12:00:00
2014-07-03 12:00:00
2014-11-28 12:00:00
2014-12-24 12:00:00
2015-11-27 12:00:00
2015-12-24 12:00:00
2016-11-25 12:00:00
2017-07-03 12:00:00
2017-11-24 12:00:00
2017-12-24 12:00:00
2018-07-03 12:00:00
2018-11-23 12:00:00
2018-12-24 12:00:00
2019-07-03 12:00:00
2019-11-29 12:00:00
2019-12-24 12:00:00
2020-11-27 12:00:00
2020-12-24 12:00:00
2021-11-26 12:00:00
2022-11-25 12:00:00
2023-07-03 12:00:00
2023-11-24 12:00:00
2024-07-03 12:00:00
2024-11-29 12:00:00
2024-12-24 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The S&P 500 Index Option contracts market trades in the America/Chicago time zone.

 

Market Hours

VIX

Introduction

This page shows the trading hours, holidays, and time zone of the CBOE Volatility Index Option contracts market.

Pre-market Hours

The following table shows the pre-market hours for the CBOE Volatility Index Option contracts market:

Weekday Time (America/Chicago)
Sunday 19:15:00 to 24:00:00
Monday 00:00:00 to 08:15:00
Tuesday 00:00:00 to 08:15:00
Wednesday 00:00:00 to 08:15:00
Thursday 00:00:00 to 08:15:00
Friday 00:00:00 to 08:15:00

Regular Trading Hours

The following table shows the regular trading hours for the CBOE Volatility Index Option contracts market:

Weekday Time (America/Chicago)
Monday 08:30:00 to 15:15:00
Tuesday 08:30:00 to 15:15:00
Wednesday 08:30:00 to 15:15:00
Thursday 08:30:00 to 15:15:00
Friday 08:30:00 to 15:15:00

Post-market Hours

The following table shows the post-market hours for the CBOE Volatility Index Option contracts market:

Weekday Time (America/Chicago)
Monday 15:15:00 to 16:00:00, 19:15:00 to 24:00:00
Tuesday 15:15:00 to 16:00:00, 19:15:00 to 24:00:00
Wednesday 15:15:00 to 16:00:00, 19:15:00 to 24:00:00
Thursday 15:15:00 to 16:00:00, 19:15:00 to 24:00:00
Friday 15:15:00 to 16:00:00

Holidays

The following table shows the dates of holidays for the CBOE Volatility Index Option contracts market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-06-19

Early Closes

The following table shows the early closes for the CBOE Volatility Index Option contracts market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/Chicago)
1999-11-26 12:15:00
2000-07-03 12:15:00
2000-11-24 12:15:00
2001-07-03 12:15:00
2001-11-23 12:15:00
2001-12-24 12:15:00
2002-07-05 12:15:00
2002-11-29 12:15:00
2002-12-24 12:15:00
2003-07-03 12:15:00
2003-11-28 12:15:00
2003-12-24 12:15:00
2003-12-26 12:15:00
2004-11-26 12:15:00
2005-11-25 12:15:00
2006-07-03 12:15:00
2006-11-24 12:15:00
2007-07-03 12:15:00
2007-11-23 12:15:00
2007-12-24 12:15:00
2008-07-03 12:15:00
2008-11-28 12:15:00
2008-12-24 12:15:00
2009-11-27 12:15:00
2009-12-24 12:15:00
2010-11-26 12:15:00
2011-11-25 12:15:00
2012-07-03 12:15:00
2012-11-23 12:15:00
2012-12-24 12:15:00
2013-07-03 12:15:00
2013-11-29 12:15:00
2013-12-24 12:15:00
2014-07-03 12:15:00
2014-11-28 12:15:00
2014-12-24 12:15:00
2015-11-27 12:15:00
2015-12-24 12:15:00
2016-11-25 12:15:00
2017-07-03 12:15:00
2017-11-24 12:15:00
2017-12-24 12:15:00
2018-07-03 12:15:00
2018-11-23 12:15:00
2018-12-24 12:15:00
2019-07-03 12:15:00
2019-11-29 12:15:00
2019-12-24 12:15:00
2020-11-27 12:15:00
2020-12-24 12:15:00
2021-11-26 12:15:00
2022-11-25 12:15:00
2023-11-24 12:15:00
2024-07-03 12:00:00
2024-11-29 12:00:00
2024-12-24 12:00:00

Late Opens

There are no days with late opens.

Time Zone

The CBOE Volatility Index Option contracts market trades in the America/Chicago time zone.

 

Asset Classes

CFD

A contract for difference (CFD) is a contract between a buyer and a seller that stipulates that the buyer must pay the seller the difference between the current value of an asset and its value at contract time.

See Also

BasicTemplateCfdAlgorithm.py
BasicTemplateCfdAlgorithm.cs

 

CFD

Requesting Data

Introduction

Request Contract for Difference (CFD) data in your algorithm to receive a feed of contract prices in the OnData on_data method. QuantConnect supports CFD trading with OANDA and Interactive Brokers .

OANDA Subscriptions

To create a CFD subscription, in the Initialize initialize method, call the AddCfd add_cfd method. The AddCfd add_cfd method returns a Cfd Security object, which contains a Symbol symbol property. Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

_symbol = AddCfd("XAUUSD").Symbol;
self._symbol = self.add_cfd("XAUUSD").symbol

To view the supported CFD contracts, see Supported Assets . For more information about the specific dataset we use for backtests, see the OANDA CFD dataset listing . To trade OANDA CFDs live, use our QuantConnect data provider .

Interactive Brokers Subscriptions

To create a CFD subscription for Interactive Brokers (IB), in the Initialize initialize method, call the AddCfd add_cfd method and set the market parameter to Market.InteractiveBrokers Market.INTERACTIVE_BROKERS . The AddCfd add_cfd method returns a Cfd Security object, which contains a Symbol symbol property. Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

_symbol = AddCfd("SPY", market: Market.InteractiveBrokers).Symbol;
self._symbol = self.add_cfd("SPY", market=Market.INTERACTIVE_BROKERS).symbol

Historical data for backtesting IB CFDs is unavailable.

In live trading, include the Interactive Brokers data provider when you deploy the algorithm to access IB CFD data. You can use this data provider for paper or real-money accounts. IB provides data for Indexes, Metals, Forex, and Global Stock CFDs. To view the Index and Forex CFD products that IB supports in live trading, see the Interactive Brokers Supported Contracts . To view the Equity CFD products, see the Products Search page on the IB website.

If you live in the EU and can't trade US ETFs due to regulation, you can trade their CFD equivalents in live mode.

var securityType = LiveMode ? SecurityType.Cfd : SecurityType.Equity;
var market = LiveMode ? Market.InteractiveBrokers : Market.USA;
_symbol = QuantConnect.Symbol.Create("SPY", securityType, Market.InteractiveBrokers);
AddSecurity(_symbol);
security_type = SecurityType.CFD if self.live_mode else SecurityType.EQUITY
market=Market.INTERACTIVE_BROKERS if self.live_mode else Market.USA
self._symbol = Symbol.create("SPY", security_type, market)
self.add_security(self._symbol)

Resolutions

The following table shows the available resolutions and data formats for CFD subscriptions:

Resolution TradeBar QuoteBar Trade Tick Quote Tick
Tick TICK green check
Second SECOND
green check
Minute MINUTE
green check
Hour HOUR
green check
Daily DAILY
green check

The default resolution for CFD subscriptions is Resolution.Minute Resolution.MINUTE . To change the resolution, pass a resolution argument to the AddCfd add_cfd method.

_symbol = AddCfd("XAUUSD", Resolution.Daily).Symbol;
self._symbol = self.add_cfd("XAUUSD", Resolution.DAILY).symbol

To create custom resolution periods, see Consolidating Data .

Fill Forward

Fill forward means if there is no data point for the current slice , LEAN uses the previous data point. Fill forward is the default data setting. If you disable fill forward, you may get stale fills or you may see trade volume as zero.

To disable fill forward for a security, set the fillForward fill_forward argument to false when you create the security subscription.

_symbol = AddCfd("XAUUSD", fillForward: false).Symbol;
self._symbol = self.add_cfd("XAUUSD", fill_forward=False).symbol

Margin and Leverage

LEAN models buying power and margin calls to ensure your algorithm stays within the margin requirements. The specific margin available depends on your brokerage destination. To change the amount of leverage you can use for a CFD contract, pass a leverage argument to the AddCfd add_cfd method.

_symbol = AddCfd("XAUUSD", leverage: 35).Symbol;
self._symbol = self.add_cfd("XAUUSD", leverage=35).symbol

Data Normalization

The data normalization mode doesn't affect the data that LEAN passes to OnData on_data or the data from history request . If you change the data normalization mode, it won't change the outcome.

Interactive Brokers Stock CFDs apply corporate actions to the price of the asset, including paying dividends in cash to your account. This behavior is not modeled today and splits in live trading will result in price discontinuities. You should monitor the underlying Equity for events and use the underlying Equity for indicators.

Example

The following strategy purchases ETFs when their fast moving average crosses over the slow moving average. In live mode, the strategy purchases their CFD equivalents.

public class EtfCfdSwapMovingAverageCrossAlgorithm : QCAlgorithm
{
    public override void Initialize()
    {
        SetStartDate(2022, 9, 28);
        SetCash(100000);
                
        var tickers = new[] {"SPY", "BND", "GLD", "QQQ"};
        var securityType = LiveMode ? SecurityType.Cfd : SecurityType.Equity;
        foreach (var ticker in tickers)
        {
            var equity = AddEquity(ticker, Resolution.Daily);
            equity["smaFast"] = SMA(equity.Symbol, 50);
            equity["smaSlow"] = SMA(equity.Symbol, 200);
            equity["targetVehicle"] = LiveMode ? AddCfd(ticker, Resolution.Daily, market: Market.InteractiveBrokers).Symbol : equity.Symbol;
        }
    }
    
    public override void OnData(Slice data)
    {
        foreach (var security in Securities.Values)
        {
            var targetVehicle = security["targetVehicle"] as Symbol;
            if ((SimpleMovingAverage)security["smaFast"]  > (SimpleMovingAverage)security["smaSlow"])
            {
                SetHoldings(targetVehicle, 0.25m);
            }
            else
            {
                SetHoldings(targetVehicle, 0m);
            }
        }   
    }
}
class EtfCfdSwapMovingAverageCrossAlgorithm(QCAlgorithm):

    def initialize(self):
        self.set_start_date(2022, 9, 28)
        self.set_cash(100000)

        tickers = ["SPY", "BND", "GLD", "QQQ"]
        security_type = SecurityType.CFD if self.live_mode else SecurityType.EQUITY
        for ticker in tickers:
            equity = self.add_equity(ticker, Resolution.DAILY)
            equity.sma_fast = self.sma(equity.symbol, 50)
            equity.sma_slow = self.sma(equity.symbol, 200)
            equity.target_vehicle = self.add_cfd(ticker, Resolution.DAILY, market=Market.INTERACTIVE_BROKERS).symbol if self.live_mode else equity.symbol

    def on_data(self, data: Slice):
        for security in self.securities.values():
            if security.sma_fast > security.sma_slow:
                self.set_holdings(security.target_vehicle, 0.25)
            else:
                self.set_holdings(security.target_vehicle, 0)
    

Properties

The AddCfd add_cfd method returns a Cfd object, which have the following properties:

Interactive Brokers Supported Contracts

The following table shows the CFD contracts that IB supports:

 

CFD

Handling Data

Introduction

LEAN passes the data you request to the OnData on_data method so you can make trading decisions. The default OnData on_data method accepts a Slice object, but you can define additional OnData on_data methods that accept different data types. For example, if you define an OnData on_data method that accepts a QuoteBar argument, it only receives QuoteBar objects. The Slice object that the OnData on_data method receives groups all the data together at a single moment in time. To access the Slice outside of the OnData on_data method, use the CurrentSlice current_slice property of your algorithm.

All the data formats use DataDictionary objects to group data by Symbol and provide easy access to information. The plural of the type denotes the collection of objects. For instance, the QuoteBars DataDictionary is made up of QuoteBar objects. To access individual data points in the dictionary, you can index the dictionary with the CFD ticker or Symbol symbol , but we recommend you use the Symbol symbol .

To view the resolutions that are available for CFD data, see Resolutions .

Quotes

QuoteBar objects are bars that consolidate NBBO quotes from the exchanges. They contain the open, high, low, and close prices of the bid and ask. The Open open , High high , Low low , and Close close properties of the QuoteBar object are the mean of the respective bid and ask prices. If the bid or ask portion of the QuoteBar has no data, the Open open , High high , Low low , and Close close properties of the QuoteBar copy the values of either the Bid bid or Ask ask instead of taking their mean.

Quotebar decomposition

QuoteBar objects have the following properties:

To get the QuoteBar objects in the Slice , index the QuoteBars property of the Slice with the CFD Symbol symbol . If the CFD doesn't actively get quotes or you are in the same time step as when you added the CFD subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your CFD before you index the Slice with the CFD Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
    }
}
def on_data(self, slice: Slice) -> None:
    quote_bar = slice.quote_bars.get(self._symbol)   # None if not found

You can also iterate through the QuoteBars dictionary. The keys of the dictionary are the Symbol objects and the values are the QuoteBar objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        var askPrice = quoteBar.Ask.Close;
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        ask_price = quote_bar.ask.close

QuoteBar objects let LEAN incorporate spread costs into your simulated trade fills to make backtest results more realistic.

Ticks

Tick objects represent a single trade or quote at a moment in time. A trade tick is a record of a transaction for the CFD. A quote tick is an offer to buy or sell the CFD at a specific price. Tick objects have the following properties:

Trade ticks have a non-zero value for the Quantity quantity and Price price properties, but they have a zero value for the BidPrice bid_price , BidSize bid_size , AskPrice ask_price , and AskSize ask_size properties. Quote ticks have non-zero values for BidPrice bid_price and BidSize bid_size properties or have non-zero values for AskPrice ask_price and AskSize ask_size properties. To check if a tick is a trade or a quote, use the TickType ticktype property.

In backtests, LEAN groups ticks into one millisecond buckets. In live trading, LEAN groups ticks into ~70-millisecond buckets. To get the Tick objects in the Slice , index the Ticks property of the Slice with a Symbol symbol . If the CFD doesn't actively trade or you are in the same time step as when you added the CFD subscription, the Slice may not contain data for your Symbol symbol . To avoid issues, check if the Slice contains data for your CFD before you index the Slice with the CFD Symbol symbol .

public override void OnData(Slice slice)
{
    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    ticks = slice.ticks.get(self._symbol, [])   # Empty if not found
    for tick in ticks:
        price = tick.price

You can also iterate through the Ticks dictionary. The keys of the dictionary are the Symbol objects and the values are the List<Tick> list[Tick] objects.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            var price = tick.Price;
        }
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            price = tick.price

Tick data is raw and unfiltered, so it can contain bad ticks that skew your trade results. For example, some ticks come from dark pools, which aren't tradable. We recommend you only use tick data if you understand the risks and are able to perform your own online tick filtering.

 

CFD

Market Hours

Market Hours

Interactive Brokers

Introduction

This page shows the trading hours, holidays, and time zone of the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CFD market:

Weekday Time (America/New York)
Monday 09:30:00 to 16:00:00
Tuesday 09:30:00 to 16:00:00
Wednesday 09:30:00 to 16:00:00
Thursday 09:30:00 to 16:00:00
Friday 09:30:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CFD market trades in the following time zones:

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall CFD market:

Symbol Name
AUDCAD AUD/CAD
AUDCHF AUD/CHF
AUDCNH AUD/CNH
AUDHKD AUD/HKD
AUDJPY AUD/JPY
AUDNZD AUD/NZD
AUDSGD AUD/SGD
AUDUSD AUD/USD
AUDZAR AUD/ZAR
CADCHF CAD/CHF
CADCNH CAD/CNH
CADHKD CAD/HKD
CADJPY CAD/JPY
CHFCNH CHF/CNH
CHFCZK CHF/CZK
CHFDKK CHF/DKK
CHFHUF CHF/HUF
CHFJPY CHF/JPY
CHFNOK CHF/NOK
CHFPLN CHF/PLN
CHFSEK CHF/SEK
CHFZAR CHF/ZAR
CNHHKD CNH/HKD
CNHJPY CNH/JPY
DKKJPY DKK/JPY
DKKNOK DKK/NOK
DKKSEK DKK/SEK
EURAUD EUR/AUD
EURCAD EUR/CAD
EURCHF EUR/CHF
EURCNH EUR/CNH
EURCZK EUR/CZK
EURDKK EUR/DKK
EURGBP EUR/GBP
EURHKD EUR/HKD
EURHUF EUR/HUF
EURILS EUR/ILS
EURJPY EUR/JPY
EURMXN EUR/MXN
EURNOK EUR/NOK
EURNZD EUR/NZD
EURPLN EUR/PLN
EURRUB EUR/RUB
EURSEK EUR/SEK
EURSGD EUR/SGD
EURUSD EUR/USD
EURZAR EUR/ZAR
GBPAUD GBP/AUD
GBPCAD GBP/CAD
GBPCHF GBP/CHF
GBPCNH GBP/CNH
GBPCZK GBP/CZK
GBPDKK GBP/DKK
GBPHKD GBP/HKD
GBPHUF GBP/HUF
GBPJPY GBP/JPY
GBPMXN GBP/MXN
GBPNOK GBP/NOK
GBPNZD GBP/NZD
GBPPLN GBP/PLN
GBPSEK GBP/SEK
GBPSGD GBP/SGD
GBPUSD GBP/USD
GBPZAR GBP/ZAR
HKDJPY HKD/JPY
IBAU200 Australia 200
IBCH20 Switzerland 20
IBDE40 Germany 40
IBES35 Spain 35
IBEU50 Europe 50
IBFR40 France 40
IBGB100 UK 100
IBHK50 Hong Kong 50
IBJP225 Japan 225
IBNL25 Netherlands 25
IBUS30 US 30
IBUS500 US 500
IBUST100 US Tech 100
MXNJPY MXN/JPY
NOKJPY NOK/JPY
NOKSEK NOK/SEK
NZDCAD NZD/CAD
NZDCHF NZD/CHF
NZDJPY NZD/JPY
NZDUSD NZD/USD
SEKJPY SEK/JPY
SGDCNH SGD/CNH
SGDJPY SGD/JPY
USDCAD USD/CAD
USDCHF USD/CHF
USDCNH USD/CNH
USDCZK USD/CZK
USDDKK USD/DKK
USDHKD USD/HKD
USDHUF USD/HUF
USDILS USD/ILS
USDJPY USD/JPY
USDMXN USD/MXN
USDNOK USD/NOK
USDPLN USD/PLN
USDRUB USD/RUB
USDSEK USD/SEK
USDSGD USD/SGD
USDZAR USD/ZAR
XAGUSD London Silver
XAUUSD London Gold
ZARJPY ZAR/JPY

 

Market Hours

AUDCAD

Introduction

This page shows the trading hours, holidays, and time zone of the AUD/CAD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the AUD/CAD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the AUD/CAD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the AUD/CAD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The AUD/CAD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

AUDCHF

Introduction

This page shows the trading hours, holidays, and time zone of the AUD/CHF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the AUD/CHF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the AUD/CHF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the AUD/CHF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The AUD/CHF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

AUDCNH

Introduction

This page shows the trading hours, holidays, and time zone of the AUD/CNH contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the AUD/CNH contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the AUD/CNH contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the AUD/CNH contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The AUD/CNH contract in the CFD market trades in the America/New York time zone.

 

Market Hours

AUDHKD

Introduction

This page shows the trading hours, holidays, and time zone of the AUD/HKD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the AUD/HKD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the AUD/HKD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the AUD/HKD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The AUD/HKD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

AUDJPY

Introduction

This page shows the trading hours, holidays, and time zone of the AUD/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the AUD/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the AUD/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the AUD/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The AUD/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

AUDNZD

Introduction

This page shows the trading hours, holidays, and time zone of the AUD/NZD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the AUD/NZD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the AUD/NZD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the AUD/NZD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The AUD/NZD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

AUDSGD

Introduction

This page shows the trading hours, holidays, and time zone of the AUD/SGD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the AUD/SGD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the AUD/SGD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the AUD/SGD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The AUD/SGD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

AUDUSD

Introduction

This page shows the trading hours, holidays, and time zone of the AUD/USD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the AUD/USD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the AUD/USD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the AUD/USD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The AUD/USD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

AUDZAR

Introduction

This page shows the trading hours, holidays, and time zone of the AUD/ZAR contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the AUD/ZAR contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the AUD/ZAR contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the AUD/ZAR contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The AUD/ZAR contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CADCHF

Introduction

This page shows the trading hours, holidays, and time zone of the CAD/CHF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CAD/CHF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CAD/CHF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CAD/CHF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CAD/CHF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CADCNH

Introduction

This page shows the trading hours, holidays, and time zone of the CAD/CNH contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CAD/CNH contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CAD/CNH contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CAD/CNH contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CAD/CNH contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CADHKD

Introduction

This page shows the trading hours, holidays, and time zone of the CAD/HKD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CAD/HKD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CAD/HKD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CAD/HKD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CAD/HKD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CADJPY

Introduction

This page shows the trading hours, holidays, and time zone of the CAD/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CAD/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CAD/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CAD/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CAD/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CHFCNH

Introduction

This page shows the trading hours, holidays, and time zone of the CHF/CNH contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CHF/CNH contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CHF/CNH contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CHF/CNH contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CHF/CNH contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CHFCZK

Introduction

This page shows the trading hours, holidays, and time zone of the CHF/CZK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CHF/CZK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CHF/CZK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CHF/CZK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CHF/CZK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CHFDKK

Introduction

This page shows the trading hours, holidays, and time zone of the CHF/DKK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CHF/DKK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CHF/DKK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CHF/DKK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CHF/DKK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CHFHUF

Introduction

This page shows the trading hours, holidays, and time zone of the CHF/HUF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CHF/HUF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CHF/HUF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CHF/HUF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CHF/HUF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CHFJPY

Introduction

This page shows the trading hours, holidays, and time zone of the CHF/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CHF/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CHF/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CHF/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CHF/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CHFNOK

Introduction

This page shows the trading hours, holidays, and time zone of the CHF/NOK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CHF/NOK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CHF/NOK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CHF/NOK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CHF/NOK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CHFPLN

Introduction

This page shows the trading hours, holidays, and time zone of the CHF/PLN contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CHF/PLN contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CHF/PLN contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CHF/PLN contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CHF/PLN contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CHFSEK

Introduction

This page shows the trading hours, holidays, and time zone of the CHF/SEK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CHF/SEK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CHF/SEK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CHF/SEK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CHF/SEK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CHFZAR

Introduction

This page shows the trading hours, holidays, and time zone of the CHF/ZAR contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CHF/ZAR contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CHF/ZAR contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CHF/ZAR contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CHF/ZAR contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CNHHKD

Introduction

This page shows the trading hours, holidays, and time zone of the CNH/HKD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CNH/HKD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CNH/HKD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CNH/HKD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CNH/HKD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CNHJPY

Introduction

This page shows the trading hours, holidays, and time zone of the CNH/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CNH/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CNH/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the CNH/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The CNH/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

DKKJPY

Introduction

This page shows the trading hours, holidays, and time zone of the DKK/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the DKK/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the DKK/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the DKK/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The DKK/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

DKKNOK

Introduction

This page shows the trading hours, holidays, and time zone of the DKK/NOK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the DKK/NOK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the DKK/NOK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the DKK/NOK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The DKK/NOK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

DKKSEK

Introduction

This page shows the trading hours, holidays, and time zone of the DKK/SEK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the DKK/SEK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the DKK/SEK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the DKK/SEK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The DKK/SEK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURAUD

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/AUD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/AUD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/AUD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/AUD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/AUD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURCAD

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/CAD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/CAD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/CAD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/CAD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/CAD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURCHF

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/CHF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/CHF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/CHF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/CHF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/CHF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURCNH

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/CNH contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/CNH contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/CNH contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/CNH contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/CNH contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURCZK

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/CZK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/CZK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/CZK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/CZK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/CZK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURDKK

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/DKK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/DKK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/DKK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/DKK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/DKK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURGBP

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/GBP contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/GBP contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/GBP contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/GBP contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/GBP contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURHKD

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/HKD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/HKD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/HKD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/HKD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/HKD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURHUF

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/HUF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/HUF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/HUF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/HUF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/HUF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURILS

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/ILS contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/ILS contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/ILS contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/ILS contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/ILS contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURJPY

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURMXN

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/MXN contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/MXN contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/MXN contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/MXN contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/MXN contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURNOK

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/NOK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/NOK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/NOK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/NOK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/NOK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURNZD

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/NZD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/NZD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/NZD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/NZD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/NZD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURPLN

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/PLN contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/PLN contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/PLN contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/PLN contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/PLN contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURRUB

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/RUB contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/RUB contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/RUB contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/RUB contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/RUB contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURSEK

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/SEK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/SEK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/SEK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/SEK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/SEK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURSGD

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/SGD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/SGD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/SGD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/SGD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/SGD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURUSD

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/USD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/USD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/USD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/USD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/USD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

EURZAR

Introduction

This page shows the trading hours, holidays, and time zone of the EUR/ZAR contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the EUR/ZAR contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the EUR/ZAR contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the EUR/ZAR contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The EUR/ZAR contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPAUD

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/AUD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/AUD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/AUD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/AUD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/AUD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPCAD

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/CAD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/CAD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/CAD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/CAD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/CAD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPCHF

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/CHF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/CHF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/CHF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/CHF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/CHF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPCNH

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/CNH contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/CNH contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/CNH contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/CNH contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/CNH contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPCZK

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/CZK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/CZK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/CZK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/CZK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/CZK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPDKK

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/DKK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/DKK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/DKK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/DKK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/DKK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPHKD

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/HKD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/HKD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/HKD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/HKD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/HKD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPHUF

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/HUF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/HUF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/HUF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/HUF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/HUF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPJPY

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPMXN

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/MXN contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/MXN contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/MXN contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/MXN contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/MXN contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPNOK

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/NOK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/NOK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/NOK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/NOK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/NOK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPNZD

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/NZD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/NZD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/NZD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/NZD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/NZD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPPLN

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/PLN contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/PLN contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/PLN contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/PLN contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/PLN contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPSEK

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/SEK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/SEK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/SEK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/SEK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/SEK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPSGD

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/SGD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/SGD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/SGD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/SGD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/SGD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPUSD

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/USD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/USD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/USD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/USD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/USD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

GBPZAR

Introduction

This page shows the trading hours, holidays, and time zone of the GBP/ZAR contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the GBP/ZAR contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the GBP/ZAR contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the GBP/ZAR contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The GBP/ZAR contract in the CFD market trades in the America/New York time zone.

 

Market Hours

HKDJPY

Introduction

This page shows the trading hours, holidays, and time zone of the HKD/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the HKD/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the HKD/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the HKD/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The HKD/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

IBAU200

Introduction

This page shows the trading hours, holidays, and time zone of the Australia 200 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Australia 200 contract in the CFD market:

Weekday Time (UTC)
Sunday 22:50:00 to 24:00:00
Monday 00:00:00 to 05:30:00, 06:10:00 to 21:00:00, 22:50:00 to 24:00:00
Tuesday 00:00:00 to 05:30:00, 06:10:00 to 21:00:00, 22:50:00 to 24:00:00
Wednesday 00:00:00 to 05:30:00, 06:10:00 to 21:00:00, 22:50:00 to 24:00:00
Thursday 00:00:00 to 05:30:00, 06:10:00 to 21:00:00, 22:50:00 to 24:00:00
Friday 00:00:00 to 05:30:00, 06:10:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Australia 200 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the Australia 200 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Australia 200 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBCH20

Introduction

This page shows the trading hours, holidays, and time zone of the Switzerland 20 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Switzerland 20 contract in the CFD market:

Weekday Time (UTC)
Monday 07:00:00 to 21:00:00
Tuesday 07:00:00 to 21:00:00
Wednesday 07:00:00 to 21:00:00
Thursday 07:00:00 to 21:00:00
Friday 07:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Switzerland 20 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the Switzerland 20 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Switzerland 20 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBDE40

Introduction

This page shows the trading hours, holidays, and time zone of the Germany 40 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Germany 40 contract in the CFD market:

Weekday Time (UTC)
Monday 01:15:00 to 21:00:00
Tuesday 01:15:00 to 21:00:00
Wednesday 01:15:00 to 21:00:00
Thursday 01:15:00 to 21:00:00
Friday 01:15:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Germany 40 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the Germany 40 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Germany 40 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBES35

Introduction

This page shows the trading hours, holidays, and time zone of the Spain 35 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Spain 35 contract in the CFD market:

Weekday Time (UTC)
Monday 07:00:00 to 19:00:00
Tuesday 07:00:00 to 19:00:00
Wednesday 07:00:00 to 19:00:00
Thursday 07:00:00 to 19:00:00
Friday 07:00:00 to 19:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Spain 35 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the Spain 35 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Spain 35 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBEU50

Introduction

This page shows the trading hours, holidays, and time zone of the Europe 50 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Europe 50 contract in the CFD market:

Weekday Time (UTC)
Monday 01:15:00 to 21:00:00
Tuesday 01:15:00 to 21:00:00
Wednesday 01:15:00 to 21:00:00
Thursday 01:15:00 to 21:00:00
Friday 01:15:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Europe 50 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the Europe 50 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Europe 50 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBFR40

Introduction

This page shows the trading hours, holidays, and time zone of the France 40 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the France 40 contract in the CFD market:

Weekday Time (UTC)
Monday 07:00:00 to 21:00:00
Tuesday 07:00:00 to 21:00:00
Wednesday 07:00:00 to 21:00:00
Thursday 07:00:00 to 21:00:00
Friday 07:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the France 40 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the France 40 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The France 40 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBGB100

Introduction

This page shows the trading hours, holidays, and time zone of the UK 100 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the UK 100 contract in the CFD market:

Weekday Time (UTC)
Monday 07:00:00 to 21:00:00
Tuesday 07:00:00 to 21:00:00
Wednesday 07:00:00 to 21:00:00
Thursday 07:00:00 to 21:00:00
Friday 07:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the UK 100 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the UK 100 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The UK 100 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBHK50

Introduction

This page shows the trading hours, holidays, and time zone of the Hong Kong 50 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Hong Kong 50 contract in the CFD market:

Weekday Time (UTC)
Monday 01:15:00 to 04:00:00, 05:00:00 to 08:30:00, 09:15:00 to 19:00:00
Tuesday 01:15:00 to 04:00:00, 05:00:00 to 08:30:00, 09:15:00 to 19:00:00
Wednesday 01:15:00 to 04:00:00, 05:00:00 to 08:30:00, 09:15:00 to 19:00:00
Thursday 01:15:00 to 04:00:00, 05:00:00 to 08:30:00, 09:15:00 to 19:00:00
Friday 01:15:00 to 04:00:00, 05:00:00 to 08:30:00, 09:15:00 to 19:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Hong Kong 50 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the Hong Kong 50 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Hong Kong 50 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBJP225

Introduction

This page shows the trading hours, holidays, and time zone of the Japan 225 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Japan 225 contract in the CFD market:

Weekday Time (UTC)
Sunday 23:00:00 to 24:00:00
Monday 00:00:00 to 22:00:00, 23:00:00 to 24:00:00
Tuesday 00:00:00 to 22:00:00, 23:00:00 to 24:00:00
Wednesday 00:00:00 to 22:00:00, 23:00:00 to 24:00:00
Thursday 00:00:00 to 22:00:00, 23:00:00 to 24:00:00
Friday 00:00:00 to 22:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Japan 225 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the Japan 225 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Japan 225 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBNL25

Introduction

This page shows the trading hours, holidays, and time zone of the Netherlands 25 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Netherlands 25 contract in the CFD market:

Weekday Time (UTC)
Monday 07:00:00 to 21:00:00
Tuesday 07:00:00 to 21:00:00
Wednesday 07:00:00 to 21:00:00
Thursday 07:00:00 to 21:00:00
Friday 07:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Netherlands 25 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the Netherlands 25 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The Netherlands 25 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBUS30

Introduction

This page shows the trading hours, holidays, and time zone of the US 30 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US 30 contract in the CFD market:

Weekday Time (UTC)
Sunday 22:0:00 to 24:00:00
Monday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Tuesday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Wednesday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Thursday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Friday 00:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US 30 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the US 30 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The US 30 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBUS500

Introduction

This page shows the trading hours, holidays, and time zone of the US 500 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US 500 contract in the CFD market:

Weekday Time (UTC)
Sunday 22:0:00 to 24:00:00
Monday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Tuesday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Wednesday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Thursday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Friday 00:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US 500 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the US 500 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The US 500 contract in the CFD market trades in the UTC time zone.

 

Market Hours

IBUST100

Introduction

This page shows the trading hours, holidays, and time zone of the US Tech 100 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US Tech 100 contract in the CFD market:

Weekday Time (UTC)
Sunday 22:0:00 to 24:00:00
Monday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Tuesday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Wednesday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Thursday 00:00:00 to 21:00:00, 22:0:00 to 24:00:00
Friday 00:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US Tech 100 contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the US Tech 100 contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The US Tech 100 contract in the CFD market trades in the UTC time zone.

 

Market Hours

MXNJPY

Introduction

This page shows the trading hours, holidays, and time zone of the MXN/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the MXN/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the MXN/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the MXN/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The MXN/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

NOKJPY

Introduction

This page shows the trading hours, holidays, and time zone of the NOK/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NOK/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NOK/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the NOK/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The NOK/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

NOKSEK

Introduction

This page shows the trading hours, holidays, and time zone of the NOK/SEK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NOK/SEK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NOK/SEK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the NOK/SEK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The NOK/SEK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

NZDCAD

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/CAD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/CAD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/CAD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the NZD/CAD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The NZD/CAD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

NZDCHF

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/CHF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/CHF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/CHF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the NZD/CHF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The NZD/CHF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

NZDJPY

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the NZD/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The NZD/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

NZDUSD

Introduction

This page shows the trading hours, holidays, and time zone of the NZD/USD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the NZD/USD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the NZD/USD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the NZD/USD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The NZD/USD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

SEKJPY

Introduction

This page shows the trading hours, holidays, and time zone of the SEK/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the SEK/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the SEK/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the SEK/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The SEK/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

SGDCNH

Introduction

This page shows the trading hours, holidays, and time zone of the SGD/CNH contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the SGD/CNH contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the SGD/CNH contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the SGD/CNH contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The SGD/CNH contract in the CFD market trades in the America/New York time zone.

 

Market Hours

SGDJPY

Introduction

This page shows the trading hours, holidays, and time zone of the SGD/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the SGD/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the SGD/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the SGD/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The SGD/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDCAD

Introduction

This page shows the trading hours, holidays, and time zone of the USD/CAD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/CAD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/CAD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/CAD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/CAD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDCHF

Introduction

This page shows the trading hours, holidays, and time zone of the USD/CHF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/CHF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/CHF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/CHF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/CHF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDCNH

Introduction

This page shows the trading hours, holidays, and time zone of the USD/CNH contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/CNH contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/CNH contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/CNH contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/CNH contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDCZK

Introduction

This page shows the trading hours, holidays, and time zone of the USD/CZK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/CZK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/CZK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/CZK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/CZK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDDKK

Introduction

This page shows the trading hours, holidays, and time zone of the USD/DKK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/DKK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/DKK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/DKK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/DKK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDHKD

Introduction

This page shows the trading hours, holidays, and time zone of the USD/HKD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/HKD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/HKD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/HKD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/HKD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDHUF

Introduction

This page shows the trading hours, holidays, and time zone of the USD/HUF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/HUF contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/HUF contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/HUF contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/HUF contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDILS

Introduction

This page shows the trading hours, holidays, and time zone of the USD/ILS contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/ILS contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/ILS contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/ILS contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/ILS contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDJPY

Introduction

This page shows the trading hours, holidays, and time zone of the USD/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDMXN

Introduction

This page shows the trading hours, holidays, and time zone of the USD/MXN contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/MXN contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/MXN contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/MXN contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/MXN contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDNOK

Introduction

This page shows the trading hours, holidays, and time zone of the USD/NOK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/NOK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/NOK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/NOK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/NOK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDPLN

Introduction

This page shows the trading hours, holidays, and time zone of the USD/PLN contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/PLN contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/PLN contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/PLN contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/PLN contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDRUB

Introduction

This page shows the trading hours, holidays, and time zone of the USD/RUB contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/RUB contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/RUB contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/RUB contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/RUB contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDSEK

Introduction

This page shows the trading hours, holidays, and time zone of the USD/SEK contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/SEK contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/SEK contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/SEK contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/SEK contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDSGD

Introduction

This page shows the trading hours, holidays, and time zone of the USD/SGD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/SGD contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/SGD contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/SGD contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/SGD contract in the CFD market trades in the America/New York time zone.

 

Market Hours

USDZAR

Introduction

This page shows the trading hours, holidays, and time zone of the USD/ZAR contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the USD/ZAR contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the USD/ZAR contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the USD/ZAR contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The USD/ZAR contract in the CFD market trades in the America/New York time zone.

 

Market Hours

XAGUSD

Introduction

This page shows the trading hours, holidays, and time zone of the London Silver contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the London Silver contract in the CFD market:

Weekday Time (UTC)
Sunday 22:00:00 to 24:00:00
Monday 00:00:00 to 21:00:00, 22:00:00 to 24:00:00
Tuesday 00:00:00 to 21:00:00, 22:00:00 to 24:00:00
Wednesday 00:00:00 to 21:00:00, 22:00:00 to 24:00:00
Thursday 00:00:00 to 21:00:00, 22:00:00 to 24:00:00
Friday 00:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the London Silver contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the London Silver contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The London Silver contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUUSD

Introduction

This page shows the trading hours, holidays, and time zone of the London Gold contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the London Gold contract in the CFD market:

Weekday Time (UTC)
Sunday 22:00:00 to 24:00:00
Monday 00:00:00 to 21:00:00, 22:00:00 to 24:00:00
Tuesday 00:00:00 to 21:00:00, 22:00:00 to 24:00:00
Wednesday 00:00:00 to 21:00:00, 22:00:00 to 24:00:00
Thursday 00:00:00 to 21:00:00, 22:00:00 to 24:00:00
Friday 00:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the London Gold contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the London Gold contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (UTC)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The London Gold contract in the CFD market trades in the UTC time zone.

 

Market Hours

ZARJPY

Introduction

This page shows the trading hours, holidays, and time zone of the ZAR/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the ZAR/JPY contract in the CFD market:

Weekday Time (America/New York)
Sunday 17:15:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the ZAR/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
1998-01-01 1998-01-19 1998-02-16 1998-04-10 1998-05-25
1998-07-03 1998-09-07 1998-11-26 1998-12-25 1999-01-01
1999-01-18 1999-02-15 1999-04-02 1999-05-31 1999-07-05
1999-09-06 1999-11-25 1999-12-24 2000-01-17 2000-02-21
2000-04-21 2000-05-29 2000-07-04 2000-09-04 2000-11-23
2000-12-25 2001-01-01 2001-01-15 2001-02-19 2001-04-13
2001-05-28 2001-07-04 2001-09-03 2001-09-11 2001-09-12
2001-09-13 2001-09-14 2001-11-22 2001-12-25 2002-01-01
2002-01-21 2002-02-18 2002-03-29 2002-05-27 2002-07-04
2002-09-02 2002-11-28 2002-12-25 2003-01-01 2003-01-20
2003-02-17 2003-04-18 2003-05-26 2003-07-04 2003-09-01
2003-11-27 2003-12-25 2004-01-01 2004-01-19 2004-02-16
2004-04-09 2004-05-31 2004-06-11 2004-07-05 2004-09-06
2004-11-25 2004-12-24 2005-01-17 2005-02-21 2005-03-25
2005-05-30 2005-07-04 2005-09-05 2005-11-24 2005-12-26
2006-01-02 2006-01-16 2006-02-20 2006-04-14 2006-05-29
2006-07-04 2006-09-04 2006-11-23 2006-12-25 2007-01-01
2007-01-02 2007-01-15 2007-02-19 2007-04-06 2007-05-28
2007-07-04 2007-09-03 2007-11-22 2007-12-25 2008-01-01
2008-01-21 2008-02-18 2008-03-21 2008-05-26 2008-07-04
2008-09-01 2008-11-27 2008-12-25 2009-01-01 2009-01-19
2009-02-16 2009-04-10 2009-05-25 2009-07-03 2009-09-07
2009-11-26 2009-12-25 2010-01-01 2010-01-18 2010-02-15
2010-04-02 2010-05-31 2010-07-05 2010-09-06 2010-11-25
2010-12-24 2011-01-01 2011-01-17 2011-02-21 2011-04-22
2011-05-30 2011-07-04 2011-09-05 2011-11-24 2011-12-26
2012-01-02 2012-01-16 2012-02-20 2012-04-06 2012-05-28
2012-07-04 2012-09-03 2012-10-29 2012-10-30 2012-11-22
2012-12-25 2013-01-01 2013-01-21 2013-02-18 2013-03-29
2013-05-27 2013-07-04 2013-09-02 2013-11-28 2013-12-25
2014-01-01 2014-01-20 2014-02-17 2014-04-18 2014-05-26
2014-07-04 2014-09-01 2014-11-27 2014-12-25 2015-01-01
2015-01-19 2015-02-16 2015-04-03 2015-05-25 2015-07-03
2015-09-07 2015-11-26 2015-12-25 2016-01-01 2016-01-18
2016-02-15 2016-03-25 2016-05-30 2016-07-04 2016-09-05
2016-11-24 2016-12-26 2017-01-02 2017-01-16 2017-02-20
2017-04-14 2017-05-29 2017-07-04 2017-09-04 2017-11-23
2017-12-25 2018-01-01 2018-01-15 2018-02-19 2018-03-30
2018-05-28 2018-07-04 2018-09-03 2018-11-22 2018-12-05
2018-12-25 2019-01-01 2019-01-21 2019-02-18 2019-04-19
2019-05-27 2019-07-04 2019-09-02 2019-11-28 2019-12-25
2020-01-01 2020-01-20 2020-02-17 2020-04-10 2020-05-25
2020-07-03 2020-09-07 2020-11-26 2020-12-25 2021-01-01
2021-01-18 2021-02-15 2021-04-02 2021-05-31 2021-07-05
2021-09-06 2021-11-25 2021-12-24 2022-01-01 2022-01-17
2022-02-21 2022-04-15 2022-05-30 2022-06-20 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02 2023-01-16
2023-02-20 2023-04-07 2023-05-29 2023-06-19 2023-07-04
2023-09-04 2023-11-23 2023-12-25 2024-01-01 2024-01-15
2024-02-19 2024-03-29 2024-05-27 2024-06-19 2024-07-04
2024-09-02 2024-11-28 2024-12-25 2025-01-01 2025-01-20
2025-02-17 2025-04-18

Early Closes

The following table shows the early closes for the ZAR/JPY contract in the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
1999-11-26 13:00:00
2000-07-03 13:00:00
2000-11-24 13:00:00
2001-07-03 13:00:00
2001-11-23 13:00:00
2001-12-24 13:00:00
2002-07-05 13:00:00
2002-11-29 13:00:00
2002-12-24 13:00:00
2003-07-03 13:00:00
2003-11-28 13:00:00
2003-12-24 13:00:00
2003-12-26 13:00:00
2004-11-26 13:00:00
2005-11-25 13:00:00
2006-07-03 13:00:00
2006-11-24 13:00:00
2007-07-03 13:00:00
2007-11-23 13:00:00
2007-12-24 13:00:00
2008-07-03 13:00:00
2008-11-28 13:00:00
2008-12-24 13:00:00
2009-11-27 13:00:00
2009-12-24 13:00:00
2010-11-26 13:00:00
2011-11-25 13:00:00
2012-07-03 13:00:00
2012-11-23 13:00:00
2012-12-24 13:00:00
2013-07-03 13:00:00
2013-11-29 13:00:00
2013-12-24 13:00:00
2014-07-03 13:00:00
2014-11-28 13:00:00
2014-12-24 13:00:00
2015-11-27 13:00:00
2015-12-24 13:00:00
2016-11-25 13:00:00
2017-07-03 13:00:00
2017-11-24 13:00:00
2017-12-24 13:00:00
2018-07-03 13:00:00
2018-11-23 13:00:00
2018-12-24 13:00:00
2019-07-03 13:00:00
2019-11-29 13:00:00
2019-12-24 13:00:00
2020-11-27 13:00:00
2020-12-24 13:00:00
2021-11-26 13:00:00
2022-11-25 13:00:00
2023-07-03 13:00:00
2023-11-24 13:00:00
2024-07-03 13:00:00
2024-11-29 13:00:00
2024-12-24 13:00:00

Late Opens

There are no days with late opens.

Time Zone

The ZAR/JPY contract in the CFD market trades in the America/New York time zone.

 

Market Hours

Oanda

Introduction

This page shows the trading hours, holidays, and time zone of the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the CFD market:

Weekday Time (America/New York)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 24:00:00
Tuesday 00:00:00 to 24:00:00
Wednesday 00:00:00 to 24:00:00
Thursday 00:00:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the CFD market:

Date ( yyyy-mm-dd )
2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

The following table shows the early closes for the CFD market:

Date ( yyyy-mm-dd ) Time Of Market Close (America/New York)
2018-12-31 17:00:00

Late Opens

There are no days with late opens.

Time Zone

The CFD market trades in the following time zones:

Assets With Other Hours

The following table shows the contracts that have different trading periods than the overall CFD market:

Symbol Name
AU200AUD Australia 200
BCOUSD Brent Crude Oil
CH20CHF Swiss 20
CORNUSD Corn
DE10YBEUR Bund
DE30EUR Germany 30
EU50EUR Europe 50
FR40EUR France 40
HK33HKD Hong Kong 33
JP225USD Japan 225
NAS100USD US Nas 100
NATGASUSD Natural Gas
NL25EUR Netherlands 25
SG30SGD Singapore 30
SOYBNUSD Soybeans
SPX500USD US SPX 500
SUGARUSD Sugar
UK100GBP UK 100
UK10YBGBP UK 10Y Gilt
US2000USD US Russ 2000
US30USD US Wall St 30
USB02YUSD US 2Y T-Note
USB05YUSD US 5Y T-Note
USB10YUSD US 10Y T-Note
USB30YUSD US T-Bond
WHEATUSD Wheat
WTICOUSD West Texas Oil
XAGAUD Silver/AUD
XAGCAD Silver/CAD
XAGCHF Silver/CHF
XAGEUR Silver/EUR
XAGGBP Silver/GBP
XAGHKD Silver/HKD
XAGJPY Silver/JPY
XAGNZD Silver/NZD
XAGSGD Silver/SGD
XAGUSD London Silver
XAUAUD Gold/AUD
XAUCAD Gold/CAD
XAUCHF Gold/CHF
XAUEUR Gold/EUR
XAUGBP Gold/GBP
XAUHKD Gold/HKD
XAUJPY Gold/JPY
XAUNZD Gold/NZD
XAUSGD Gold/SGD
XAUUSD London Gold
XAUXAG Gold/Silver
XCUUSD Copper
XPDUSD Palladium
XPTUSD Platinum

 

Market Hours

AU200AUD

Introduction

This page shows the trading hours, holidays, and time zone of the Australia 200 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Australia 200 contract in the CFD market:

Weekday Time (Australia/Sydney)
Monday 09:50:00 to 16:30:00, 17:10:00 to 24:00:00
Tuesday 00:00:00 to 08:00:00, 09:50:00 to 16:30:00, 17:10:00 to 24:00:00
Wednesday 00:00:00 to 08:00:00, 09:50:00 to 16:30:00, 17:10:00 to 24:00:00
Thursday 00:00:00 to 08:00:00, 09:50:00 to 16:30:00, 17:10:00 to 24:00:00
Friday 00:00:00 to 08:00:00, 09:50:00 to 16:30:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Australia 200 contract in the CFD market:

Date ( yyyy-mm-dd )
2004-04-09 2004-12-26 2004-12-27 2005-03-25 2005-12-25
2005-12-26 2006-04-14 2006-12-25 2007-01-26 2007-04-06
2007-12-25 2008-03-21 2008-04-25 2008-12-25 2008-12-26
2009-04-10 2009-12-25 2010-01-01 2010-04-02 2010-12-26
2010-12-27 2011-04-22 2011-04-25 2011-12-25 2011-12-26
2011-12-27 2012-01-02 2012-01-26 2012-04-06 2012-04-09
2012-04-25 2012-12-24 2012-12-25 2012-12-31 2013-01-28
2013-03-29 2013-12-25 2014-01-27 2014-04-18 2014-04-25
2014-12-25 2014-12-26 2015-04-03 2015-12-24 2015-12-25
2015-12-31 2016-01-01 2016-03-25 2016-12-23 2016-12-25
2016-12-26 2016-12-30 2017-04-14 2017-12-25 2018-03-30
2018-12-24 2018-12-25 2018-12-31 2019-01-01 2019-01-28
2019-04-19 2019-04-22 2019-04-25 2019-06-10 2019-12-25
2019-12-26 2020-01-01 2020-01-27 2020-04-10 2020-04-13
2020-04-25 2020-06-08 2020-12-25 2020-12-26 2020-12-28
2021-01-01 2021-01-26 2021-04-02 2021-04-05 2021-04-26
2021-06-14 2021-12-25 2021-12-26 2021-12-27 2021-12-28
2022-01-03 2022-01-26 2022-04-15 2022-04-18 2022-04-25
2022-06-13 2022-12-25 2022-12-26 2022-12-27 2023-01-02
2023-01-26 2023-04-07 2023-04-10 2023-04-25 2023-06-12
2023-12-25 2023-12-26 2024-01-01 2024-01-26 2024-03-29
2024-04-01 2024-04-25 2024-06-10 2024-12-25 2024-12-26
2025-01-01 2025-01-27 2025-04-18 2025-04-21 2025-04-25
2025-06-09

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Australia 200 contract in the CFD market trades in the Australia/Sydney time zone.

 

Market Hours

BCOUSD

Introduction

This page shows the trading hours, holidays, and time zone of the Brent Crude Oil contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Brent Crude Oil contract in the CFD market:

Weekday Time (America/New York)
Sunday 20:00:00 to 24:00:00
Monday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Tuesday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Wednesday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Thursday 00:00:00 to 18:00:00, 20:00:00 to 24:00:00
Friday 00:00:00 to 18:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Brent Crude Oil contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2017-12-25 2018-01-01 2018-03-30 2018-12-25
2019-01-01 2019-12-25 2020-01-01 2020-04-10 2020-12-25
2021-01-01 2021-04-02 2022-04-15 2022-12-25 2022-12-26
2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Brent Crude Oil contract in the CFD market trades in the America/New York time zone.

 

Market Hours

CH20CHF

Introduction

This page shows the trading hours, holidays, and time zone of the Swiss 20 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Swiss 20 contract in the CFD market:

Weekday Time (Europe/Zurich)
Monday 08:00:00 to 22:00:00
Tuesday 08:00:00 to 22:00:00
Wednesday 08:00:00 to 22:00:00
Thursday 08:00:00 to 22:00:00
Friday 08:00:00 to 22:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Swiss 20 contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-04-14 2017-04-17 2017-05-01 2017-05-25
2017-06-05 2017-08-01 2017-12-25 2017-12-26 2018-01-01
2018-03-30 2018-04-02 2018-05-01 2018-05-10 2018-05-21
2018-08-01 2018-12-25 2018-12-26 2019-01-01 2019-04-19
2019-04-22 2019-05-01 2019-05-30 2019-06-10 2019-08-01
2019-12-25 2019-12-26 2020-01-01 2020-04-10 2020-04-13
2020-05-01 2020-06-01 2020-12-25 2021-01-01 2021-04-02
2021-04-05 2021-05-13 2021-05-24 2021-12-24 2021-12-31
2022-04-15 2022-04-18 2022-05-26 2022-06-06 2022-08-01
2022-12-26 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Swiss 20 contract in the CFD market trades in the Europe/Zurich time zone.

 

Market Hours

CORNUSD

Introduction

This page shows the trading hours, holidays, and time zone of the Corn contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Corn contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Tuesday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Wednesday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Thursday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Friday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Corn contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-25 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-07-03 2020-09-07 2020-11-26
2020-12-25 2021-01-01 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2021-12-24
2021-12-31 2022-01-17 2022-02-21 2022-04-15 2022-05-13
2022-07-04 2022-09-05 2022-11-24 2022-12-25 2022-12-26
2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Corn contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

DE10YBEUR

Introduction

This page shows the trading hours, holidays, and time zone of the Bund contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Bund contract in the CFD market:

Weekday Time (Europe/Berlin)
Monday 01:15:00 to 22:00:00
Tuesday 01:15:00 to 22:00:00
Wednesday 01:15:00 to 22:00:00
Thursday 01:15:00 to 22:00:00
Friday 01:15:00 to 22:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Bund contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2017-04-17 2017-05-01 2017-06-05 2017-10-03
2017-10-31 2017-12-25 2017-12-26 2018-01-01 2018-03-30
2018-04-02 2018-05-01 2018-05-21 2018-10-03 2018-10-31
2018-12-25 2018-12-26 2019-01-01 2019-04-19 2019-04-22
2019-05-01 2019-06-10 2019-10-03 2019-10-31 2019-12-25
2019-12-26 2020-01-01 2020-04-10 2020-04-13 2020-05-01
2020-06-01 2020-12-25 2021-01-01 2021-04-02 2021-04-05
2021-05-01 2021-05-24 2021-12-24 2021-12-31 2022-04-15
2022-04-18 2022-05-01 2022-06-06 2022-10-03 2022-10-31
2022-12-26 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Bund contract in the CFD market trades in the Europe/Berlin time zone.

 

Market Hours

DE30EUR

Introduction

This page shows the trading hours, holidays, and time zone of the Germany 30 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Germany 30 contract in the CFD market:

Weekday Time (Europe/Berlin)
Monday 01:15:00 to 22:00:00
Tuesday 01:15:00 to 22:00:00
Wednesday 01:15:00 to 22:00:00
Thursday 01:15:00 to 22:00:00
Friday 01:15:00 to 22:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Germany 30 contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2017-04-17 2017-05-01 2017-06-05 2017-10-03
2017-10-31 2017-12-25 2017-12-26 2018-01-01 2018-03-30
2018-04-02 2018-05-01 2018-05-21 2018-10-03 2018-10-31
2018-12-25 2018-12-26 2019-01-01 2019-04-19 2019-04-22
2019-05-01 2019-06-10 2019-10-03 2019-10-31 2019-12-25
2019-12-26 2020-01-01 2020-04-10 2020-04-13 2020-05-01
2020-06-01 2020-12-25 2021-01-01 2021-04-02 2021-04-05
2021-05-01 2021-05-24 2021-12-24 2021-12-31 2022-04-15
2022-04-18 2022-05-01 2022-06-06 2022-10-03 2022-10-31
2022-12-26 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Germany 30 contract in the CFD market trades in the Europe/Berlin time zone.

 

Market Hours

EU50EUR

Introduction

This page shows the trading hours, holidays, and time zone of the Europe 50 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Europe 50 contract in the CFD market:

Weekday Time (Europe/Berlin)
Monday 01:15:00 to 22:00:00
Tuesday 01:15:00 to 22:00:00
Wednesday 01:15:00 to 22:00:00
Thursday 01:15:00 to 22:00:00
Friday 01:15:00 to 22:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Europe 50 contract in the CFD market:

Date ( yyyy-mm-dd )
2003-04-18 2003-04-21 2003-05-01 2003-12-25 2003-12-26
2004-01-01 2004-04-09 2004-04-12 2004-12-26 2005-03-25
2005-03-28 2005-05-01 2005-12-25 2005-12-26 2006-01-01
2006-04-14 2006-04-17 2006-05-01 2006-12-25 2006-12-26
2007-01-01 2007-04-06 2007-04-09 2007-05-01 2007-12-25
2007-12-26 2008-01-01 2008-03-21 2008-03-24 2008-05-01
2008-12-25 2008-12-26 2009-01-01 2009-04-10 2009-04-13
2009-05-01 2009-12-25 2010-01-01 2010-04-02 2010-04-05
2010-12-26 2011-04-22 2011-04-25 2011-05-01 2011-12-25
2011-12-26 2012-01-01 2012-04-06 2012-04-09 2012-05-01
2012-12-25 2013-01-01 2013-03-29 2013-04-01 2013-05-01
2013-12-25 2013-12-26 2014-01-01 2014-04-18 2014-04-21
2014-05-01 2014-12-25 2014-12-26 2015-01-01 2015-04-03
2015-04-06 2015-05-01 2015-12-25 2016-01-01 2016-03-25
2016-03-28 2016-05-01 2016-12-25 2016-12-26 2017-01-01
2017-04-14 2017-04-14 2017-04-17 2017-05-01 2017-12-25
2017-12-26 2018-01-01 2018-03-30 2018-04-02 2018-05-01
2018-12-25 2018-12-26 2019-01-01 2019-04-19 2019-04-22
2019-05-01 2019-12-25 2019-12-26 2020-01-01 2020-04-10
2020-04-13 2020-05-01 2020-12-25 2020-12-26 2021-01-01
2021-04-02 2021-04-05 2021-05-01 2021-12-25 2021-12-26
2022-01-01 2022-04-15 2022-04-18 2022-05-01 2022-12-25
2022-12-26 2023-01-01 2023-01-02 2023-04-07 2023-04-10
2023-05-01 2023-12-25 2023-12-26 2024-01-01 2024-03-29
2024-04-01 2024-05-01 2024-12-25 2024-12-26 2025-01-01
2025-04-18 2025-04-21 2025-05-01

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Europe 50 contract in the CFD market trades in the Europe/Berlin time zone.

 

Market Hours

FR40EUR

Introduction

This page shows the trading hours, holidays, and time zone of the France 40 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the France 40 contract in the CFD market:

Weekday Time (Europe/Paris)
Monday 08:00:00 to 22:00:00
Tuesday 08:00:00 to 22:00:00
Wednesday 08:00:00 to 22:00:00
Thursday 08:00:00 to 22:00:00
Friday 08:00:00 to 22:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the France 40 contract in the CFD market:

Date ( yyyy-mm-dd )
2003-04-18 2003-04-21 2003-05-01 2003-12-25 2003-12-26
2004-01-01 2004-04-09 2004-04-12 2004-12-26 2005-03-25
2005-03-28 2005-05-01 2005-12-25 2005-12-26 2006-01-01
2006-04-14 2006-04-17 2006-05-01 2006-12-25 2006-12-26
2007-01-01 2007-04-06 2007-04-09 2007-05-01 2007-12-25
2007-12-26 2008-01-01 2008-03-21 2008-03-24 2008-05-01
2008-12-25 2008-12-26 2009-01-01 2009-04-10 2009-04-13
2009-05-01 2009-12-25 2010-01-01 2010-04-02 2010-04-05
2010-12-26 2011-04-22 2011-04-25 2011-05-01 2011-12-25
2011-12-26 2012-01-01 2012-04-06 2012-04-09 2012-05-01
2012-12-25 2013-01-01 2013-03-29 2013-04-01 2013-05-01
2013-12-25 2013-12-26 2014-01-01 2014-04-18 2014-04-21
2014-05-01 2014-12-25 2014-12-26 2015-01-01 2015-04-03
2015-04-06 2015-05-01 2015-12-25 2016-01-01 2016-03-25
2016-03-28 2016-05-01 2016-12-25 2016-12-26 2017-01-01
2017-04-14 2017-04-17 2017-05-01 2017-12-25 2017-12-26
2018-01-01 2018-03-30 2018-04-02 2018-05-01 2018-12-25
2018-12-26 2019-01-01 2019-04-19 2019-04-22 2019-05-01
2019-12-25 2019-12-26 2020-01-01 2020-04-10 2020-04-13
2020-05-01 2020-12-25 2020-12-26 2021-01-01 2021-04-02
2021-04-05 2021-05-01 2021-12-25 2021-12-26 2022-01-01
2022-04-15 2022-04-18 2022-05-01 2022-12-25 2022-12-26
2023-01-01 2023-01-02 2023-04-07 2023-04-10 2023-05-01
2023-12-25 2023-12-26 2024-01-01 2024-03-29 2024-04-01
2024-05-01 2024-12-25 2024-12-26 2025-01-01 2025-04-18
2025-04-21 2025-05-01

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The France 40 contract in the CFD market trades in the Europe/Paris time zone.

 

Market Hours

HK33HKD

Introduction

This page shows the trading hours, holidays, and time zone of the Hong Kong 33 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Hong Kong 33 contract in the CFD market:

Weekday Time (Asia/Hong Kong)
Monday 09:15:00 to 12:00:00, 13:00:00 to 16:30:00, 17:15:00 to 24:00:00
Tuesday 00:00:00 to 03:00:00, 09:15:00 to 12:00:00, 13:00:00 to 16:30:00, 17:15:00 to 24:00:00
Wednesday 00:00:00 to 03:00:00, 09:15:00 to 12:00:00, 13:00:00 to 16:30:00, 17:15:00 to 24:00:00
Thursday 00:00:00 to 03:00:00, 09:15:00 to 12:00:00, 13:00:00 to 16:30:00, 17:15:00 to 24:00:00
Friday 00:00:00 to 03:00:00, 09:15:00 to 12:00:00, 13:00:00 to 16:30:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Hong Kong 33 contract in the CFD market:

Date ( yyyy-mm-dd )
2003-01-31 2003-02-02 2003-02-03 2003-04-18 2003-04-21
2003-05-01 2003-05-08 2003-06-04 2003-07-01 2003-09-12
2003-10-01 2003-12-25 2003-12-26 2004-01-01 2004-01-22
2004-01-23 2004-04-05 2004-04-09 2004-04-12 2004-05-26
2004-06-22 2004-07-01 2004-09-29 2004-10-01 2004-10-22
2004-12-26 2004-12-27 2005-02-09 2005-02-10 2005-02-11
2005-03-25 2005-03-28 2005-04-05 2005-05-02 2005-05-16
2005-07-01 2005-09-19 2005-10-11 2005-12-25 2005-12-26
2005-12-27 2006-01-02 2006-01-29 2006-01-30 2006-01-31
2006-04-05 2006-04-14 2006-04-17 2006-05-01 2006-05-05
2006-05-31 2006-10-02 2006-10-30 2006-12-25 2006-12-26
2007-01-01 2007-02-18 2007-02-19 2007-02-20 2007-04-05
2007-04-06 2007-04-09 2007-05-01 2007-05-24 2007-06-19
2007-07-02 2007-09-26 2007-10-01 2007-10-19 2007-12-25
2007-12-26 2008-01-01 2008-02-07 2008-02-08 2008-03-21
2008-03-24 2008-04-04 2008-05-01 2008-05-12 2008-06-09
2008-07-01 2008-08-06 2008-08-22 2008-09-15 2008-10-01
2008-10-07 2008-12-25 2008-12-26 2009-01-01 2009-01-26
2009-01-27 2009-01-28 2009-04-10 2009-04-13 2009-05-01
2009-05-28 2009-07-01 2009-10-01 2009-10-04 2009-10-26
2009-12-25 2010-01-01 2010-02-14 2010-02-15 2010-02-16
2010-04-02 2010-04-05 2010-04-06 2010-05-21 2010-06-16
2010-07-01 2010-09-23 2010-10-01 2010-12-26 2010-12-27
2011-02-03 2011-02-04 2011-04-05 2011-04-22 2011-04-25
2011-05-02 2011-05-10 2011-06-06 2011-07-01 2011-09-13
2011-09-29 2011-10-05 2011-12-25 2011-12-26 2011-12-27
2012-01-02 2012-01-23 2012-01-24 2012-01-25 2012-12-25
2013-01-01 2013-02-10 2013-02-11 2013-02-12 2013-02-13
2013-03-29 2013-04-01 2013-04-04 2013-05-01 2013-05-17
2013-06-12 2013-07-01 2013-08-14 2013-09-20 2013-10-01
2013-10-14 2013-12-25 2013-12-26 2014-01-01 2014-01-31
2014-02-02 2014-02-03 2014-04-18 2014-04-21 2014-05-01
2014-05-06 2014-06-02 2014-07-01 2014-09-09 2014-10-01
2014-10-02 2014-12-25 2014-12-26 2015-01-01 2015-02-19
2015-02-20 2015-04-03 2015-04-06 2015-05-01 2015-05-25
2015-12-24 2015-12-25 2015-12-31 2016-01-01 2016-02-08
2016-02-09 2016-03-25 2016-07-01 2016-09-16 2016-12-25
2016-12-26 2017-01-29 2017-01-30 2017-04-14 2017-12-25
2018-02-16 2018-02-18 2018-03-30 2018-12-24 2018-12-25
2018-12-31 2019-01-01 2019-02-05 2019-02-05 2019-02-06
2019-02-06 2019-02-07 2019-04-05 2019-04-19 2019-04-22
2019-05-01 2019-05-13 2019-06-07 2019-07-01 2019-09-14
2019-10-01 2019-10-07 2019-12-25 2019-12-26 2020-01-01
2020-01-25 2020-01-26 2020-01-27 2020-01-28 2020-04-04
2020-04-10 2020-04-13 2020-04-30 2020-05-01 2020-06-25
2020-07-01 2020-10-01 2020-10-02 2020-10-26 2020-12-25
2020-12-26 2021-01-01 2021-02-12 2021-02-13 2021-02-14
2021-02-15 2021-04-02 2021-04-05 2021-04-06 2021-05-01
2021-05-19 2021-06-14 2021-07-01 2021-09-22 2021-10-01
2021-10-14 2021-12-25 2021-12-26 2021-12-27 2022-01-01
2022-02-01 2022-02-02 2022-02-03 2022-04-05 2022-04-15
2022-04-18 2022-05-02 2022-05-09 2022-06-03 2022-07-01
2022-09-11 2022-10-01 2022-10-04 2022-12-25 2022-12-26
2022-12-27 2023-01-02 2023-01-22 2023-01-23 2023-01-24
2023-01-25 2023-04-05 2023-04-07 2023-04-10 2023-05-01
2023-05-26 2023-06-22 2023-07-01 2023-09-30 2023-10-02
2023-10-23 2023-12-25 2023-12-26 2024-01-01 2024-02-10
2024-02-11 2024-02-12 2024-02-13 2024-03-29 2024-04-01
2024-04-04 2024-05-01 2024-05-15 2024-06-10 2024-07-01
2024-09-18 2024-10-01 2024-10-11 2024-12-25 2024-12-26
2025-01-01 2025-01-29 2025-01-30 2025-01-31 2025-04-04
2025-04-18 2025-04-21 2025-05-01 2025-05-05 2025-05-31

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Hong Kong 33 contract in the CFD market trades in the Asia/Hong Kong time zone.

 

Market Hours

JP225USD

Introduction

This page shows the trading hours, holidays, and time zone of the Japan 225 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Japan 225 contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 00:00:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Japan 225 contract in the CFD market:

Date ( yyyy-mm-dd )
2003-04-18 2003-05-26 2003-07-04 2003-09-01 2003-11-27
2003-12-25 2004-01-01 2004-01-19 2004-02-16 2004-04-09
2004-05-31 2004-06-11 2004-09-06 2004-11-25 2004-12-24
2005-01-17 2005-02-21 2005-03-25 2005-05-30 2005-07-04
2005-12-26 2006-01-02 2006-04-14 2006-12-25 2007-01-01
2007-12-25 2008-01-01 2008-03-21 2008-12-25 2009-01-01
2009-04-10 2009-12-25 2010-01-01 2010-12-24 2011-04-22
2011-12-26 2012-01-02 2012-12-25 2013-01-01 2013-03-29
2013-12-25 2014-01-01 2014-04-18 2015-12-25 2016-01-01
2016-03-25 2017-04-14 2018-03-30 2019-01-01 2019-01-02
2019-01-03 2019-01-14 2019-02-11 2019-03-21 2019-04-29
2019-05-03 2019-05-04 2019-05-06 2019-07-15 2019-08-12
2019-09-16 2019-09-23 2019-10-14 2019-11-04 2019-11-23
2019-12-23 2019-12-31 2020-01-01 2020-01-02 2020-01-03
2020-01-13 2020-02-11 2020-03-20 2020-04-29 2020-05-04
2020-05-04 2020-05-05 2020-07-20 2020-08-11 2020-09-21
2020-09-22 2020-10-12 2020-11-03 2020-11-23 2020-12-23
2020-12-31 2021-01-01 2021-01-02 2021-01-04 2021-01-11
2021-02-11 2021-03-20 2021-04-29 2021-05-03 2021-05-04
2021-05-05 2021-07-19 2021-08-11 2021-09-20 2021-09-23
2021-10-11 2021-11-03 2021-11-23 2021-12-23 2021-12-31
2022-01-01 2022-01-03 2022-01-03 2022-01-10 2022-02-11
2022-03-21 2022-04-29 2022-05-03 2022-05-04 2022-05-05
2022-07-18 2022-08-11 2022-09-19 2022-09-23 2022-10-10
2022-11-03 2022-11-23 2022-12-23 2022-12-25 2022-12-26
2022-12-31 2023-01-01 2023-01-02 2023-01-02 2023-01-03
2023-01-09 2023-02-11 2023-03-21 2023-04-29 2023-05-03
2023-05-04 2023-05-05 2023-07-17 2023-08-11 2023-09-18
2023-09-23 2023-10-09 2023-11-03 2023-11-23 2023-12-23
2024-01-01 2024-01-01 2024-01-02 2024-01-03 2024-01-08
2024-02-12 2024-03-20 2024-04-29 2024-05-03 2024-05-04
2024-05-06 2024-07-15 2024-08-12 2024-09-16 2024-09-23
2024-10-14 2024-11-04 2024-11-23 2024-12-23 2024-12-31
2025-01-01 2025-01-02 2025-01-03 2025-01-13 2025-02-11
2025-03-20 2025-04-29 2025-05-03 2025-05-05 2025-05-05

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Japan 225 contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

NAS100USD

Introduction

This page shows the trading hours, holidays, and time zone of the US Nas 100 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US Nas 100 contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US Nas 100 contract in the CFD market:

Date ( yyyy-mm-dd )
2003-04-18 2003-07-04 2003-12-25 2004-01-01 2004-04-09
2004-06-11 2004-12-24 2005-03-25 2006-04-14 2006-12-25
2007-01-01 2007-12-25 2008-01-01 2008-03-21 2008-12-25
2009-01-01 2009-04-10 2009-12-25 2010-01-01 2010-12-24
2011-04-22 2011-12-26 2012-01-02 2012-12-25 2013-01-01
2013-03-29 2013-12-25 2014-01-01 2014-04-18 2015-12-25
2016-03-25 2017-04-14 2018-03-30 2019-01-01 2019-04-19
2019-12-25 2020-01-01 2020-04-10 2020-12-25 2021-01-01
2021-04-02 2021-12-24 2022-01-01 2022-04-15 2022-12-25
2022-12-26 2023-01-01 2023-01-02 2023-04-07 2023-12-25
2024-01-01 2024-03-29 2024-12-25 2025-01-01 2025-04-18

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The US Nas 100 contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

NATGASUSD

Introduction

This page shows the trading hours, holidays, and time zone of the Natural Gas contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Natural Gas contract in the CFD market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Natural Gas contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-29 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-09-06 2021-11-25 2021-12-24 2022-01-17 2022-02-21
2022-04-15 2022-05-30 2022-07-04 2022-09-05 2022-11-24
2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Natural Gas contract in the CFD market trades in the America/New York time zone.

 

Market Hours

NL25EUR

Introduction

This page shows the trading hours, holidays, and time zone of the Netherlands 25 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Netherlands 25 contract in the CFD market:

Weekday Time (Europe/Amsterdam)
Monday 08:00:00 to 22:00:00
Tuesday 08:00:00 to 22:00:00
Wednesday 08:00:00 to 22:00:00
Thursday 08:00:00 to 22:00:00
Friday 08:00:00 to 22:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Netherlands 25 contract in the CFD market:

Date ( yyyy-mm-dd )
2008-03-21 2008-03-24 2008-05-01 2008-12-25 2008-12-26
2009-01-01 2009-04-10 2009-04-13 2009-05-01 2009-12-25
2010-01-01 2010-04-02 2010-04-05 2010-12-26 2011-04-22
2011-04-25 2011-05-01 2011-12-25 2011-12-26 2012-01-01
2012-04-06 2012-04-09 2012-05-01 2012-12-25 2013-01-01
2013-03-29 2013-04-01 2013-05-01 2013-12-25 2013-12-26
2014-01-01 2014-04-18 2014-04-21 2014-05-01 2014-12-25
2014-12-26 2015-01-01 2015-04-03 2015-04-06 2015-05-01
2015-12-25 2016-01-01 2016-03-25 2016-03-28 2016-05-01
2016-12-25 2016-12-26 2017-01-01 2017-04-14 2017-04-17
2017-05-01 2017-12-25 2017-12-26 2018-01-01 2018-03-30
2018-04-02 2018-05-01 2018-12-25 2018-12-26 2019-01-01
2019-04-19 2019-04-22 2019-05-01 2019-12-25 2019-12-26
2020-01-01 2020-04-10 2020-04-13 2020-05-01 2020-12-25
2020-12-26 2021-01-01 2021-04-02 2021-04-05 2021-05-01
2021-12-25 2021-12-26 2022-01-01 2022-04-15 2022-04-18
2022-05-01 2022-12-25 2022-12-26 2023-01-01 2023-01-02
2023-04-07 2023-04-10 2023-05-01 2023-12-25 2023-12-26
2024-01-01 2024-03-29 2024-04-01 2024-05-01 2024-12-25
2024-12-26 2025-01-01 2025-04-18 2025-04-21 2025-05-01

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Netherlands 25 contract in the CFD market trades in the Europe/Amsterdam time zone.

 

Market Hours

SG30SGD

Introduction

This page shows the trading hours, holidays, and time zone of the Singapore 30 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Singapore 30 contract in the CFD market:

Weekday Time (Asia/Singapore)
Monday 08:30:00 to 17:20:00, 17:50:00 to 24:00:00
Tuesday 00:00:00 to 04:45:00, 08:30:00 to 17:20:00, 17:50:00 to 24:00:00
Wednesday 00:00:00 to 04:45:00, 08:30:00 to 17:20:00, 17:50:00 to 24:00:00
Thursday 00:00:00 to 04:45:00, 08:30:00 to 17:20:00, 17:50:00 to 24:00:00
Friday 00:00:00 to 04:45:00, 08:30:00 to 17:20:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Singapore 30 contract in the CFD market:

Date ( yyyy-mm-dd )
2010-02-15 2011-02-13 2012-01-23 2013-02-11 2014-01-31
2015-02-19 2016-02-08 2017-01-02 2017-01-30 2017-04-14
2017-05-01 2017-05-10 2017-06-26 2017-08-09 2017-09-01
2017-10-18 2017-12-25 2018-01-01 2018-02-16 2018-02-16
2018-03-30 2018-05-01 2018-08-09 2018-12-25 2019-01-01
2019-02-05 2019-02-05 2019-04-19 2019-05-01 2019-08-09
2019-12-25 2020-01-01 2020-01-25 2020-01-27 2020-04-10
2020-05-01 2020-08-10 2020-12-25 2021-01-01 2021-02-12
2021-04-02 2021-05-01 2021-08-09 2021-12-25 2022-01-01
2022-02-01 2022-04-15 2022-05-02 2022-08-09 2022-12-26
2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Singapore 30 contract in the CFD market trades in the Asia/Singapore time zone.

 

Market Hours

SOYBNUSD

Introduction

This page shows the trading hours, holidays, and time zone of the Soybeans contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Soybeans contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Tuesday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Wednesday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Thursday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Friday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Soybeans contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-25 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-07-03 2020-09-07 2020-11-26
2020-12-25 2021-01-01 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2021-12-24
2021-12-31 2022-01-17 2022-02-21 2022-04-15 2022-05-13
2022-07-04 2022-09-05 2022-11-24 2022-12-25 2022-12-26
2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Soybeans contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

SPX500USD

Introduction

This page shows the trading hours, holidays, and time zone of the US SPX 500 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US SPX 500 contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US SPX 500 contract in the CFD market:

Date ( yyyy-mm-dd )
2003-04-18 2003-07-04 2003-12-25 2004-01-01 2004-04-09
2004-06-11 2004-12-24 2005-03-25 2006-04-14 2006-12-25
2007-01-01 2007-12-25 2008-01-01 2008-03-21 2008-12-25
2009-01-01 2009-04-10 2009-12-25 2010-01-01 2010-12-24
2011-04-22 2011-12-26 2012-01-02 2012-12-25 2013-01-01
2013-03-29 2013-12-25 2014-01-01 2014-04-18 2015-12-25
2016-03-25 2017-04-14 2018-03-30 2019-01-01 2019-04-19
2019-12-25 2020-01-01 2020-04-10 2020-12-25 2021-01-01
2021-04-02 2021-12-24 2022-01-01 2022-04-15 2022-12-25
2022-12-26 2023-01-01 2023-01-02 2023-04-07 2023-12-25
2024-01-01 2024-03-29 2024-12-25 2025-01-01 2025-04-18

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The US SPX 500 contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

SUGARUSD

Introduction

This page shows the trading hours, holidays, and time zone of the Sugar contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Sugar contract in the CFD market:

Weekday Time (America/New York)
Monday 03:30:00 to 13:00:00
Tuesday 03:30:00 to 13:00:00
Wednesday 03:30:00 to 13:00:00
Thursday 03:30:00 to 13:00:00
Friday 03:30:00 to 13:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Sugar contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-25 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-07-03 2020-09-07 2020-11-26
2020-12-25 2021-01-01 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2021-12-24
2022-01-17 2022-02-21 2022-04-15 2022-05-30 2022-07-04
2022-09-05 2022-11-24 2022-12-26 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Sugar contract in the CFD market trades in the America/New York time zone.

 

Market Hours

UK100GBP

Introduction

This page shows the trading hours, holidays, and time zone of the UK 100 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the UK 100 contract in the CFD market:

Weekday Time (Europe/London)
Monday 01:00:00 to 21:00:00
Tuesday 01:00:00 to 21:00:00
Wednesday 01:00:00 to 21:00:00
Thursday 01:00:00 to 21:00:00
Friday 01:00:00 to 21:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the UK 100 contract in the CFD market:

Date ( yyyy-mm-dd )
2003-04-18 2003-04-21 2003-05-05 2003-05-26 2003-08-25
2003-12-25 2003-12-26 2004-01-01 2004-04-09 2004-04-12
2004-05-03 2004-05-31 2004-08-30 2004-12-26 2004-12-27
2004-12-28 2005-01-03 2005-03-25 2005-03-28 2005-05-02
2005-05-30 2005-08-29 2005-12-25 2005-12-26 2005-12-27
2006-01-02 2006-04-14 2006-04-17 2006-05-01 2006-05-29
2006-08-28 2006-12-25 2006-12-26 2007-01-01 2007-04-06
2007-04-09 2007-05-07 2007-05-28 2007-08-27 2007-12-25
2007-12-26 2008-01-01 2008-03-21 2008-03-24 2008-05-05
2008-05-26 2008-08-25 2008-12-25 2008-12-26 2009-01-01
2009-04-10 2009-04-13 2009-05-04 2009-05-25 2009-08-31
2009-12-25 2009-12-28 2010-01-01 2010-04-02 2010-04-05
2010-05-03 2010-05-31 2010-08-30 2010-12-26 2010-12-27
2010-12-28 2011-01-03 2011-04-22 2011-04-25 2011-05-02
2011-05-30 2011-08-29 2011-12-25 2011-12-26 2011-12-27
2012-01-02 2012-12-25 2013-01-01 2013-03-29 2013-04-01
2013-05-06 2013-05-27 2013-08-26 2013-12-25 2013-12-26
2014-01-01 2014-04-18 2014-04-21 2014-05-05 2014-05-26
2014-08-25 2014-12-25 2014-12-26 2015-01-01 2015-04-03
2015-04-06 2015-05-04 2015-05-25 2015-08-31 2015-12-25
2016-01-01 2016-03-25 2016-12-25 2016-12-26 2017-04-14
2017-12-25 2018-03-30 2018-12-25 2019-01-01 2019-04-19
2019-04-22 2019-05-06 2019-05-27 2019-08-26 2019-12-25
2019-12-26 2020-01-01 2020-04-10 2020-04-13 2020-05-04
2020-05-25 2020-08-31 2020-12-25 2020-12-26 2020-12-28
2021-01-01 2021-04-02 2021-04-05 2021-05-03 2021-05-31
2021-08-30 2021-12-25 2021-12-26 2021-12-27 2021-12-28
2022-01-03 2022-04-15 2022-04-18 2022-05-02 2022-05-30
2022-08-29 2022-12-25 2022-12-26 2022-12-27 2023-01-02
2023-04-07 2023-04-10 2023-05-01 2023-05-29 2023-08-28
2023-12-25 2023-12-26 2024-01-01 2024-03-29 2024-04-01
2024-05-06 2024-05-27 2024-08-26 2024-12-25 2024-12-26
2025-01-01 2025-04-18 2025-04-21 2025-05-05 2025-05-26

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The UK 100 contract in the CFD market trades in the Europe/London time zone.

 

Market Hours

UK10YBGBP

Introduction

This page shows the trading hours, holidays, and time zone of the UK 10Y Gilt contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the UK 10Y Gilt contract in the CFD market:

Weekday Time (Europe/London)
Monday 08:00:00 to 18:00:00
Tuesday 08:00:00 to 18:00:00
Wednesday 08:00:00 to 18:00:00
Thursday 08:00:00 to 18:00:00
Friday 08:00:00 to 18:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the UK 10Y Gilt contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2017-04-17 2017-05-01 2017-12-25 2017-12-26
2018-01-01 2018-03-20 2018-04-02 2018-05-01 2018-12-25
2018-12-26 2019-01-01 2019-04-19 2019-04-22 2019-05-01
2019-12-25 2019-12-26 2020-01-01 2020-04-10 2020-04-13
2020-05-01 2020-12-25 2021-01-01 2021-04-02 2021-04-05
2022-04-15 2022-04-18 2022-12-26 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The UK 10Y Gilt contract in the CFD market trades in the Europe/London time zone.

 

Market Hours

US2000USD

Introduction

This page shows the trading hours, holidays, and time zone of the US Russ 2000 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US Russ 2000 contract in the CFD market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 16:15:00, 16:30:00 to 17:00:00, 18:00:00 to 24:00:00
Tuesday 00:00:00 to 16:15:00, 16:30:00 to 17:00:00, 18:00:00 to 24:00:00
Wednesday 00:00:00 to 16:15:00, 16:30:00 to 17:00:00, 18:00:00 to 24:00:00
Thursday 00:00:00 to 16:15:00, 16:30:00 to 17:00:00, 18:00:00 to 24:00:00
Friday 00:00:00 to 16:15:00, 16:30:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US Russ 2000 contract in the CFD market:

Date ( yyyy-mm-dd )
2003-04-18 2003-12-25 2004-01-01 2004-04-09 2004-06-11
2004-12-24 2005-03-25 2006-04-14 2006-12-25 2007-01-01
2007-12-25 2008-01-01 2008-03-21 2008-12-25 2009-01-01
2009-04-10 2009-12-25 2010-01-01 2010-12-24 2011-04-22
2011-12-26 2012-01-02 2012-12-25 2013-01-01 2013-03-29
2013-12-25 2014-01-01 2014-04-18 2014-12-25 2015-01-01
2015-12-25 2016-01-01 2016-03-25 2017-04-14 2018-03-30
2019-01-01 2019-04-19 2019-12-25 2020-01-01 2020-04-10
2020-12-25 2021-01-01 2021-04-02 2021-12-24 2022-01-01
2022-04-15 2022-12-25 2022-12-26 2023-01-01 2023-01-02
2023-04-07 2023-12-25 2024-01-01 2024-03-29 2024-12-25
2025-01-01 2025-04-18

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The US Russ 2000 contract in the CFD market trades in the America/New York time zone.

 

Market Hours

US30USD

Introduction

This page shows the trading hours, holidays, and time zone of the US Wall St 30 contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US Wall St 30 contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 00:00:00 to 15:15:00, 15:30:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US Wall St 30 contract in the CFD market:

Date ( yyyy-mm-dd )
2003-04-18 2003-05-26 2003-07-04 2003-09-01 2003-11-27
2003-12-25 2004-01-01 2004-01-19 2004-02-16 2004-04-09
2004-05-31 2004-06-11 2004-07-05 2004-09-06 2004-11-25
2004-12-24 2005-01-17 2005-02-21 2005-03-25 2005-05-30
2005-07-04 2005-09-05 2005-11-24 2005-12-26 2006-01-02
2006-01-16 2006-02-20 2006-04-14 2006-11-23 2006-12-25
2007-01-01 2007-01-15 2007-02-19 2007-11-22 2007-12-25
2008-01-01 2008-03-21 2008-12-25 2009-01-01 2009-04-10
2009-12-25 2010-01-01 2010-12-24 2011-04-22 2011-12-26
2012-01-02 2012-12-25 2013-01-01 2013-03-29 2013-12-25
2014-01-01 2014-04-18 2015-12-25 2016-03-25 2017-04-14
2018-03-30 2019-01-01 2019-04-19 2019-12-25 2020-01-01
2020-04-10 2020-12-25 2021-01-01 2021-04-02 2021-12-24
2022-01-01 2022-04-15 2022-12-26 2023-01-01 2023-01-02
2023-04-07 2023-12-25 2024-01-01 2024-03-29 2024-12-25
2025-01-01 2025-04-18

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The US Wall St 30 contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

USB02YUSD

Introduction

This page shows the trading hours, holidays, and time zone of the US 2Y T-Note contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US 2Y T-Note contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 00:00:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US 2Y T-Note contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-25 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-07-03 2020-09-07 2020-11-26
2020-12-25 2021-01-01 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2021-12-24
2021-12-31 2022-01-17 2022-02-21 2022-04-15 2022-05-13
2022-07-04 2022-09-05 2022-11-24 2022-12-25 2022-12-26
2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The US 2Y T-Note contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

USB05YUSD

Introduction

This page shows the trading hours, holidays, and time zone of the US 5Y T-Note contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US 5Y T-Note contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 00:00:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US 5Y T-Note contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-25 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-07-03 2020-09-07 2020-11-26
2020-12-25 2021-01-01 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2021-12-24
2021-12-31 2022-01-17 2022-02-21 2022-04-15 2022-05-13
2022-07-04 2022-09-05 2022-11-24 2022-12-25 2022-12-26
2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The US 5Y T-Note contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

USB10YUSD

Introduction

This page shows the trading hours, holidays, and time zone of the US 10Y T-Note contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US 10Y T-Note contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 00:00:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US 10Y T-Note contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-25 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-07-03 2020-09-07 2020-11-26
2020-12-25 2021-01-01 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2021-12-24
2021-12-31 2022-01-17 2022-02-21 2022-04-15 2022-05-13
2022-07-04 2022-09-05 2022-11-24 2022-12-25 2022-12-26
2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The US 10Y T-Note contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

USB30YUSD

Introduction

This page shows the trading hours, holidays, and time zone of the US T-Bond contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the US T-Bond contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 17:00:00 to 24:00:00
Monday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Tuesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Wednesday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Thursday 00:00:00 to 16:00:00, 17:00:00 to 24:00:00
Friday 00:00:00 to 16:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the US T-Bond contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-25 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-07-03 2020-09-07 2020-11-26
2020-12-25 2021-01-01 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2021-12-24
2021-12-31 2022-01-17 2022-02-21 2022-04-15 2022-05-13
2022-07-04 2022-09-05 2022-11-24 2022-12-25 2022-12-26
2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The US T-Bond contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

WHEATUSD

Introduction

This page shows the trading hours, holidays, and time zone of the Wheat contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Wheat contract in the CFD market:

Weekday Time (America/Chicago)
Sunday 19:00:00 to 24:00:00
Monday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Tuesday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Wednesday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Thursday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00, 19:00:00 to 24:00:00
Friday 00:00:00 to 07:45:00, 08:30:00 to 13:20:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Wheat contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-25 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-07-03 2020-09-07 2020-11-26
2020-12-25 2021-01-01 2021-01-18 2021-02-15 2021-04-02
2021-05-31 2021-07-05 2021-09-06 2021-11-25 2021-12-24
2021-12-31 2022-01-17 2022-02-21 2022-04-15 2022-05-13
2022-07-04 2022-09-05 2022-11-24 2022-12-25 2022-12-26
2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Wheat contract in the CFD market trades in the America/Chicago time zone.

 

Market Hours

WTICOUSD

Introduction

This page shows the trading hours, holidays, and time zone of the West Texas Oil contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the West Texas Oil contract in the CFD market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the West Texas Oil contract in the CFD market:

Date ( yyyy-mm-dd )
2017-01-02 2017-01-16 2017-02-20 2017-04-14 2017-05-29
2017-07-04 2017-09-04 2017-11-23 2017-12-25 2018-01-01
2018-01-15 2018-02-19 2018-03-30 2018-05-28 2018-07-04
2018-09-03 2018-11-22 2018-12-29 2019-01-01 2019-01-21
2019-02-18 2019-04-19 2019-05-27 2019-07-04 2019-09-02
2019-11-28 2019-12-25 2020-01-01 2020-01-20 2020-02-17
2020-04-10 2020-05-25 2020-09-07 2020-11-26 2020-12-25
2021-01-01 2021-01-18 2021-02-15 2021-04-02 2021-05-31
2021-09-06 2021-11-25 2021-12-24 2022-01-17 2022-02-21
2022-04-15 2022-05-30 2022-07-04 2022-09-05 2022-11-24
2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The West Texas Oil contract in the CFD market trades in the America/New York time zone.

 

Market Hours

XAGAUD

Introduction

This page shows the trading hours, holidays, and time zone of the Silver/AUD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Silver/AUD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Silver/AUD contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver/AUD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAGCAD

Introduction

This page shows the trading hours, holidays, and time zone of the Silver/CAD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Silver/CAD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Silver/CAD contract in the CFD market:

Date ( yyyy-mm-dd )
2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver/CAD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAGCHF

Introduction

This page shows the trading hours, holidays, and time zone of the Silver/CHF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Silver/CHF contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Silver/CHF contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver/CHF contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAGEUR

Introduction

This page shows the trading hours, holidays, and time zone of the Silver/EUR contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Silver/EUR contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Silver/EUR contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver/EUR contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAGGBP

Introduction

This page shows the trading hours, holidays, and time zone of the Silver/GBP contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Silver/GBP contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Silver/GBP contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver/GBP contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAGHKD

Introduction

This page shows the trading hours, holidays, and time zone of the Silver/HKD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Silver/HKD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Silver/HKD contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver/HKD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAGJPY

Introduction

This page shows the trading hours, holidays, and time zone of the Silver/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Silver/JPY contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Silver/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver/JPY contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAGNZD

Introduction

This page shows the trading hours, holidays, and time zone of the Silver/NZD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Silver/NZD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Silver/NZD contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver/NZD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAGSGD

Introduction

This page shows the trading hours, holidays, and time zone of the Silver/SGD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Silver/SGD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Silver/SGD contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Silver/SGD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAGUSD

Introduction

This page shows the trading hours, holidays, and time zone of the London Silver contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the London Silver contract in the CFD market:

Weekday Time (America/New York)
Sunday 18:03:00 to 24:00:00
Monday 00:00:00 to 16:58:00, 18:03:00 to 24:00:00
Tuesday 00:00:00 to 16:58:00, 18:03:00 to 24:00:00
Wednesday 00:00:00 to 16:58:00, 18:03:00 to 24:00:00
Thursday 00:00:00 to 16:58:00, 18:03:00 to 24:00:00
Friday 00:00:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the London Silver contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The London Silver contract in the CFD market trades in the America/New York time zone.

 

Market Hours

XAUAUD

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/AUD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/AUD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/AUD contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/AUD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUCAD

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/CAD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/CAD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/CAD contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/CAD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUCHF

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/CHF contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/CHF contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/CHF contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/CHF contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUEUR

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/EUR contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/EUR contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/EUR contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/EUR contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUGBP

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/GBP contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/GBP contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/GBP contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/GBP contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUHKD

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/HKD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/HKD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/HKD contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/HKD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUJPY

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/JPY contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/JPY contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/JPY contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/JPY contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUNZD

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/NZD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/NZD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 17:58:00, 18:03:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/NZD contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/NZD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUSGD

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/SGD contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/SGD contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/SGD contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/SGD contract in the CFD market trades in the UTC time zone.

 

Market Hours

XAUUSD

Introduction

This page shows the trading hours, holidays, and time zone of the London Gold contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the London Gold contract in the CFD market:

Weekday Time (America/New York)
Sunday 18:03:00 to 24:00:00
Monday 00:00:00 to 16:58:00, 18:03:00 to 24:00:00
Tuesday 00:00:00 to 16:58:00, 18:03:00 to 24:00:00
Wednesday 00:00:00 to 16:58:00, 18:03:00 to 24:00:00
Thursday 00:00:00 to 16:58:00, 18:03:00 to 24:00:00
Friday 00:00:00 to 16:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the London Gold contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The London Gold contract in the CFD market trades in the America/New York time zone.

 

Market Hours

XAUXAG

Introduction

This page shows the trading hours, holidays, and time zone of the Gold/Silver contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Gold/Silver contract in the CFD market:

Weekday Time (UTC)
Sunday 23:10:00 to 24:00:00
Monday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Tuesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Wednesday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Thursday 00:00:00 to 21:58:00, 23:10:00 to 24:00:00
Friday 00:00:00 to 21:58:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Gold/Silver contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Gold/Silver contract in the CFD market trades in the UTC time zone.

 

Market Hours

XCUUSD

Introduction

This page shows the trading hours, holidays, and time zone of the Copper contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Copper contract in the CFD market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Copper contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Copper contract in the CFD market trades in the America/New York time zone.

 

Market Hours

XPDUSD

Introduction

This page shows the trading hours, holidays, and time zone of the Palladium contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Palladium contract in the CFD market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Palladium contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Palladium contract in the CFD market trades in the America/New York time zone.

 

Market Hours

XPTUSD

Introduction

This page shows the trading hours, holidays, and time zone of the Platinum contract in the CFD market.

Pre-market Hours

Pre-market trading is not available.

Regular Trading Hours

The following table shows the regular trading hours for the Platinum contract in the CFD market:

Weekday Time (America/New York)
Sunday 18:00:00 to 24:00:00
Monday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Tuesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Wednesday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Thursday 00:00:00 to 17:00:00, 18:00:00 to 24:00:00
Friday 00:00:00 to 17:00:00

Post-market Hours

Post-market trading is not available.

Holidays

The following table shows the dates of holidays for the Platinum contract in the CFD market:

Date ( yyyy-mm-dd )
2017-04-14 2022-12-25 2022-12-26 2023-01-01 2023-01-02

Early Closes

There are no days with early closes.

Late Opens

There are no days with late opens.

Time Zone

The Platinum contract in the CFD market trades in the America/New York time zone.

 

Portfolio

Portfolio

Key Concepts

Introduction

The Portfolio portfolio object provides information about the whole portfolio state.

Properties

The Portfolio portfolio object has the following properties:

var invested = Portfolio.Invested;
var value = Portfolio.TotalPortfolioValue;
invested = self.portfolio.invested
value = self.portfolio.total_portfolio_value

Cost Averaging Accounting

LEAN uses the cost averaging accounting method, which determines the cost of your holdings by taking a weighted average of all your purchase prices. For example, say you place the following buy orders:

  1. Buy 10 ABC @ $10
  2. Buy 5 ABC @ $11
  3. Buy 20 ABC @ $14
  4. Buy 3 ABC @ $9

In the preceding example, the average cost of your ABC position is (10*10 + 5*11 + 20*14 + 3*9) / (10 + 5 + 20 + 3) = 12.1579/share. In contrast, if you use the first-in, first-out (FIFO) accounting method, the cost of the first 10 shares is 10/share, not 12.1579/share.

To get the cost of your security holdings, use the HoldingsCost holdings_cost property of the SecurityHolding object . If you fill buy and sell orders, the holdings cost is the product of the holding quantity and the average price. For example, the following table shows how the average price and holdings cost changes with each buy and sell order order in a long position:

Order Quantity Fill Price ($) Holding Quantity Average Price ($) Holdings Cost ($)
2 10 2 (2 * 10) / 2 = 10 2 * 10 = 20
-1 11 1 (1 * 10) / 1 = 10 1 * 10 = 10
1 12 2 (1 * 10 + 1 * 12) / 2 = 11
2 * 11 = 22
-2 13 0 0
0 * 0 = 0

The following table shows how the average price and holdings cost changes with each buy and sell order order in a short position:

Order Quantity Fill Price ($) Holding Quantity Average Price ($) Holdings Cost ($)
-2 10 -2 (-2 * 10) / -2 = 10 -2 * 10 = -20
1 11 -1 (-1 * 10) / -1 = 10 -1 * 10 = -10
-1 12 -2 (-1 * 10 + (-1) * 12) / -2 = 11
-2 * 11 = -22
2 13 0 0 0 * 0 = 0

Note that when you decrease the position size without closing the trade, the average price doesn't change because the denominator and the coefficients in the numerator of its formula are scaled by the quotient of the current holding quantity and the previous holding quantity. For instance, if the last row in the preceding table had an order quantity 1, the holding quantity would be -1 and the average price would be

$$ \frac{(-1 * q) * 10 + (-1 * q) * 12}{-2 * q} $$ $$ =\frac{(-1 * \frac{-1}{-2}) * 10 + (-1 * \frac{-1}{-2}) * 12}{-2 * \frac{-1}{-2}} $$ $$ =\frac{\frac{-1}{2} * 10 + \frac{-1}{2} * 12}{-1 } $$ $$ =\frac{-5 - 6}{-1} = 11 $$

Long and Short Holdings

You can identify a position as long- or short-biased based on the sign of the holding quantity. Long positions have a positive quantity and short positions have a negative quantity.

Buying Power

To get the maximum buying power in your account currency you can use for a given Symbol and order direction, call the GetBuyingPower get_buying_power method.

var availableBuyingPower = Portfolio.GetBuyingPower(_symbol, OrderDirection.Buy);
available_buying_power = self.portfolio.get_buying_power(self._symbol, OrderDirection.BUY)

For more information about buying power, see Buying Power .

 

Portfolio

Holdings

Introduction

The Portfolio portfolio is a dictionary where the key is a Symbol and the value is a SecurityHolding .

var securityHolding = Portfolio["SPY"];
security_holding = self.portfolio["SPY"]

Properties

SecurityHolding objects have the following properties:

var securityHolding = Portfolio["SPY"];
var quantity = securityHolding.Quantity;
var invested = securityHolding.Invested;
security_holding = self.portfolio["SPY"]
quantity = security_holding.quantity
invested = security_holding.invested

FutureHolding objects also have SettledProfit settled_profit and UnsettledProfit unsettled_profit properties.

Get Total Close Profit

To get the profit of a position holding if you closed the position, call the TotalCloseProfit total_close_profit method. The value this method returns is denominated in your account currency and accounts for order fees.

var profit = Portfolio["SPY"].TotalCloseProfit();
profit = self.portfolio["SPY"].total_close_profit()

The TotalCloseProfit total_close_profit method accepts the following optional arguments:

Argument Data Type Description Default Value
includeFees include_fees bool Whether to reduce the profit based on the estimated fee from the fee model . true True
exitPrice exit_price decimal? float/NoneType A hypothetical exit price to use for the profit calculation. If you don't provide a value, it uses the bid price for sell orders or the ask price for buy orders. null None
entryPrice entry_price decimal? float/NoneType A hypothetical exit price to use for the profit calculation. If you don't provide a value, it uses the average price of the SecurityHolding . null None
quantity decimal? float/NoneType The quantity to liquidate. If you don't provide a value, it uses the quantity of the SecurityHolding . null None

LEAN uses this method to define the UnrealizedProfit unrealized_profit property.

Get Quantity Value

To get the value of a security at any quantity, call the GetQuantityValue get_quantity_value method. The value this method returns is denominated in your account currency.

// Get the quantity value at the current price
var valueAtCurrentPrice = Portfolio["SPY"].GetQuantityValue(100);

// Get the quantity value at a specific price
var valueAtSpecificPrice = Portfolio["SPY"].GetQuantityValue(100, price: 30);
# Get the quantity value at the current price
value_at_current_price = self.portfolio["SPY"].get_quantity_value(100)

# Get the quantity value at a specific price
value_at_specific_price = self.portfolio["SPY"].get_quantity_value(100, price=30)

Set Initial Holdings

When you deploy a backtest or a new paper trading algorithm, the default initial portfolio state contains $100,000 USD. However, in the Initialize initialize method, you can define the initial portfolio state to something else. To set the initial cash balances , call SetCash set_cash with the currency ticker and quantity. To set multiple currencies, call the method multiple times.

SetCash(100000);       // Set the quantity of the account currency to 100,000
SetCash("BTC", 10);    // Set the Bitcoin quantity to 10
SetCash("EUR", 10000); // Set the EUR quantity to 10,000
self.set_cash(100000)       # Set the quantity of the account currency to 100,000
self.set_cash("BTC", 10)    # Set the Bitcoin quantity to 10
self.set_cash("EUR", 10000) # Set the EUR quantity to 10,000

To set the initial security holdings, subscribe to the security so that it enters your portfolio , then call the SecurityHolding.SetHoldings SecurityHolding.set_holdings method with the average purchase price and quantity.

if (!LiveMode)
{
    Portfolio["SPY"].SetHoldings(averagePrice: 500, quantity: 100);
}
if not self.live_mode:
    self.portfolio["SPY"].set_holdings(average_price=500, quantity=100)

 

Portfolio

Cashbook

Introduction

The CashBook is a dictionary where the keys are currency tickers and the values are Cash objects. The Cash objects track the amount of each currency in the portfolio. As you buy and sell securities, LEAN credits and debits the Cash objects to reflect your cash holdings.

Account Currency

The default account currency is USD, but you can change it. All of the properties of the Portfolio object that return a currency value denominate the currency value in your account currency. Depending on your account currency and security subscriptions, LEAN may add internal security subscriptions to calculate the ValueInAccountCurrency value_in_account_currency . For example, if you only add BTCETH to your algorithm and set the account currency to USDT, LEAN adds BTCUSDT and ETHUSDT as internal feeds.

To get your account currency, use the AccountCurrency account_currency property.

var accountCurrency = AccountCurrency;
account_currency = self.account_currency

To set your account currency, in the Initialize initialize method, call the SetAccountCurrency set_account_currency method. You can only set the account currency once. LEAN ignores each additional call to SetAccountCurrency set_account_currency .

SetAccountCurrency("EUR");
self.set_account_currency("EUR")

Settled vs Unsettled Cash

The Portfolio portfolio has two independent cashbooks. The CashBook cash_book tracks settled cash and the UnsettledCashBook unsettled_cash_book tracks unsettled cash, which you can't spend. If you trade with a margin account, trades settle immediately so LEAN credits and debits the CashBook cash_book at the time of the trade. In some cases, transactions can take time to settle. For example, Equity trades in a cash account settle in T+3. Therefore, if you sell shares of stock on Monday, the transaction settles on Thursday. In contrast, Option trades settle in T+1.

var settledCashBook = Portfolio.CashBook;
var unsettledCashBook = Portfolio.UnsettledCashBook;
settled_cash_book = self.portfolio.cash_book
unsettled_cash_book = self.portfolio.unsettled_cash_book

Track Cash Balances

To get the balance of a currency in the cash book, use the Amount amount property.

var usd = Portfolio.CashBook["USD"].Amount;
var btc = Portfolio.CashBook["BTC"].Amount;
usd = self.portfolio.cash_book["USD"].amount
btc = self.portfolio.cash_book["BTC"].amount

To get the value of a currency in the cash book, denominated in your account currency, use the ValueInAccountCurrency value_in_account_currency property.

var ethValue = Portfolio.CashBook["ETH"].ValueInAccountCurrency;
eth_value = self.portfolio.cash_book["ETH"].value_in_account_currency

Deposits and Withdraws

In backtests, you can add and remove cash from the cash book. To add or remove cash, call the AddAmount add_amount method.

var newUSDBalance = Portfolio.CashBook["USD"].AddAmount(100);
var newBTCBalance = Portfolio.CashBook["BTC"].AddAmount(-1.5m);
new_usd_balance = self.portfolio.cash_book["USD"].add_amount(100)
new_btc_balance = self.portfolio.cash_book["BTC"].add_amount(-1.5)

In live trading, add and withdraw cash through your brokerage account. If you adjust the cash balances in your algorithm with the AddAmount add_amount method, the cash balance in your algorithm will be out of sync with the cash balance in your brokerage account.

Currency Symbols

A currency symbol is a graphic that represents the currency name. For example, $ is for dollars, € for euros, and ฿ for Bitcoin. To get the symbol of a currency in the cash book, use CurrencySymbol currency_symbol property.

var usdSymbol = Portfolio.CashBook["USD"].CurrencySymbol;
usd_symbol = self.portfolio.cash_book["USD"].currency_symbol

Conversion Rates

To get the conversion rate for a currency in the cashbook to your account currency, use the ConversionRate conversion_rate property.

var eurConversionRate = Portfolio.CashBook["EUR"].ConversionRate;
eur_conversion_rate = self.portfolio.cash_book["EUR"].conversion_rate

 

Universes

Universes

Key Concepts

Introduction

Universe selection is the process of selecting a basket of assets you may trade. Dynamic universe selection increase diversification and decrease selection bias in your algorithm.

How Universe Selection Works

When you add a universe to your algorithm, LEAN sends a large dataset into a filter function you define. Your filter function needs to return a list of Symbol objects. LEAN automatically subscribes to these new symbols and adds them to your algorithm. Your algorithm can do almost anything inside your filter functions, but the goal should be to narrow down the set of securities to the securities that are most applicable for your algorithm.

Selection Functions

The following example filter function selects the 100 most liquid US Equities.

public class MyFundamentalUniverseAlgorithm : QCAlgorithm
{
    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;
        AddUniverse(FundamentalFilterFunction);
    }

    private IEnumerable<Symbol> FundamentalFilterFunction(IEnumerable<Fundamental> fundamental)
    {
        return (from c in fundamental
            orderby c.DollarVolume descending
            select c.Symbol).Take(100);
    }
}
class MyFundamentalUniverseAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self.add_universe(self._fundamental_filter_function)

    def _fundamental_filter_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
        sorted_by_dollar_volume = sorted(fundamental, key=lambda x: x.dollar_volume, reverse=True) 
        return [c.symbol for c in sorted_by_dollar_volume[:100]]

To learn how to define filter functions for other asset classes, custom data universes , or alternative data universes , see the following pages in this Universes chapter.

Security Changed Events

When your universe adds and removes assets, LEAN notifies your algorithm through the OnSecuritiesChanged on_securities_changed event handler. The event handler receives a SecurityChanges object, which contains references to the added and removed securities. To access the added securities, check the changes.AddedSecurities changes.added_securities method property. To access the removed securities, check the changes.RemovedSecurities changes.removed_securities method property.

public override void OnSecuritiesChanged(SecurityChanges changes)
{
    foreach (var security in changes.AddedSecurities)
    {
        Debug($"{Time}: Added {security.Symbol}");
    }
    foreach (var security in changes.RemovedSecurities)
    {
        Debug($"{Time}: Removed {security.Symbol}");
        
        if (security.Invested)
        {
            Liquidate(security.Symbol, "Removed from Universe");
        }
    }
}
def on_securities_changed(self, changes: SecurityChanges) -> None:
    for security in changes.added_securities:
        self.debug(f"{self.time}: Added {security.symbol}")

    for security in changes.removed_securities:
        self.debug(f"{self.time}: Removed {security.symbol}")
        
        if security.invested:
            self.liquidate(security.symbol, "Removed from Universe")

The preceding example liquidates securities that leave the universe. In this case, LEAN creates a market on open order and frees up buying power when the market opens.

A convenient way to track the securities that are currently in the universe is to use the NotifiedSecurityChanges class.

A convenient way to track the securities that are currently in the universe is to maintain a self._securities list.

private readonly HashSet<Security> _securities = new();

public override void OnSecuritiesChanged(SecurityChanges changes)
{
    NotifiedSecurityChanges.UpdateCollection(_securities, changes);
}
# In Initialize
self._securities = []

def on_securities_changed(self, changes: SecurityChanges) -> None:
    for security in changes.removed_securities:
        if security in self._securities:
            self._securities.remove(security)
            
    self._securities.extend(changes.added_securities)

Custom Security Properties

If you need to save data or create objects for each security in the universe, add custom members to the respective Security objects cast the Security objects to dynamic objects and then save custom members to them . This technique is useful if you want to track stop loss levels or add indicators for each asset in the universe.

public override void OnSecuritiesChanged(SecurityChanges changes)
{
    foreach (var security in changes.AddedSecurities)
    {
        var dynamicSecurity = security as dynamic;

        // Create an indicator
        dynamicSecurity.Indicator = SMA(security.Symbol, 10);

        // Warm up the indicator
        WarmUpIndicator(security.Symbol, dynamicSecurity.Indicator);
    }

    foreach (var security in changes.RemovedSecurities)
    {
        DeregisterIndicator((security as dynamic).Indicator);
    }
}
def on_securities_changed(self, changes: SecurityChanges) -> None:
    for security in changes.added_securities:
        # Create an indicator
        security.indicator = self.sma(security.Symbol, 10)

        # Warm up the indicator
        self.warm_up_indicator(security.symbol, security.indicator)

    for security in changes.removed_securities:
        self.deregister_indicator(security.indicator)

Select Current Constituents

If you don't want to make any changes to the current universe, return Universe.Unchanged from your filter functions.

public class MyUniverseAlgorithm : QCAlgorithm 
{
    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;
        AddUniverse(MyFundamentalFilterFunction);
    }

    IEnumerable<Symbol> MyFundamentalFilterFunction(IEnumerable<Fundamental> fundamental) 
    {
        return Universe.Unchanged;
    }
}
class MyUniverseAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self.add_universe(self._my_fundamental_filter_function)

    def _my_fundamental_filter_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
        return Universe.UNCHANGED

Universe Manager

The universe manager tracks all the universes in your algorithm. If you add multiple universe, you can access the constituents of each individual universe. To access the constituents of a universe in a multi-universe algorithm, save references to each universe when you add them.

private Universe _universe;

// In Initialize
UniverseSettings.Asynchronous = true;
_universe = AddUniverse(MyFundamentalFilterFunction);

// In OnData
var universeMembers = UniverseManager[_universe.Configuration.Symbol].Members;
foreach (var kvp in universeMembers)
{
    var symbol = kvp.Key;
    var security = kvp.Value;
}
# In Initialize
self.universe_settings.asynchronous = True
self._universe = self.add_universe(self._my_fundamental_filter_function)

# In OnData
universe_members = self.universe_manager[self._universe.configuration.symbol].members
for kvp in universe_members:
    symbol = kvp.key
    security = kvp.value

When you remove an asset from a universe, LEAN usually removes the security from the Members collection and removes the security subscription. However, it won't remove the security in any of the following situations:

To get only the assets that are currently in the universe, see Selected Securities .

Active Securities

The ActiveSecurities active_securities property of the algorithm class contains all of the assets currently in your algorithm. It is a dictionary where the key is a Symbol and the value is a Security . When you remove an asset from a universe, LEAN usually removes the security from the ActiveSecurities active_securities collection and removes the security subscription. However, it won't remove the security in any of the following situations:

When LEAN removes the security, the Security object remains in the Securities securities collection for record-keeping purposes, like tracking fees and trading volume.

To improve iteration speed, LEAN removes delisted securities from the Securities securities primary collection. To access all the securities, iterate the Securities.Total securities.total property.

foreach (var security in Securities.Total)
{ 

}

// Exclude delisted securities
foreach (var security in Securities.Values)
{ 

}
for security in self.securities.total:
    pass

# Exclude delisted securities
for security in self.securities.values():
    pass

To get only the assets that are currently in the universe, see Selected Securities .

Selected Securities

The Selected selected property of your Universe contains references to all the assets that are currently in the universe. The Universe.Selected Universe.selected property differs from the Universe.Members Universe.members property because the Universe.Members Universe.members property can contain more assets than Universe.Selected Universe.selected . The QCAlgorithm.ActiveSecurities QCAlgorithm.active_securities is a collection of Universe.Members Universe.members of all universes. To access the Universe object, save a reference to the result of the AddUniverse add_universe method. The following algorithm demonstrates how to use the Universe.Selected Universe.selected property to create simple rebalancing strategies:

public class SimpleRebalancingAlgorithm : QCAlgorithm
{
    public override void Initialize()
    {
        var symbol = QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA);
        var dateRule = DateRules.WeekStart(symbol);
        UniverseSettings.Schedule.On(dateRule);
        var universe = AddUniverse(Universe.DollarVolume.Top(5));
        Schedule.On(
            dateRule,
            TimeRules.AfterMarketOpen(symbol, 30),
            () => SetHoldings(
                universe.Selected.Select(symbol => new PortfolioTarget(symbol, 1.0m/universe.Selected.Count)).ToList(),
                true
            )
        );
    }
}
class SimpleRebalancingAlgorithm(QCAlgorithm):

    def initialize(self):
        symbol = Symbol.create("SPY", SecurityType.EQUITY, Market.USA)
        date_rule = self.date_rules.week_start(symbol)
        self.universe_settings.schedule.on(date_rule)
        universe = self.add_universe(self.universe.dollar_volume.top(5))
        self.schedule.on(
            date_rule,
            self.time_rules.after_market_open(symbol, 30),
            lambda: self.set_holdings(
                [PortfolioTarget(symbol, 1/len(universe.selected)) for symbol in universe.selected], 
                True
            )
        )

Derivative Universes

In a regular universe, you select a basket of assets from the entire universe of securities. In a derivative universe, you select a basket of contracts for an underlying asset. The following derivative universes are available:

 

Universes

Settings

Introduction

Universe settings and security initializers enable you to configure some properties of the securities in a universe.

Resolution

The Resolution resolution setting defines the time period of the asset data. The Resolution enumeration has the following members:

To view which resolutions are available for the asset class of your universe, follow these steps:

  1. Open the Asset Classes documentation page.
  2. Click an asset class.
  3. Click Requesting Data .
  4. On the Requesting Data page, in the table of contents, click Resolutions .

The default value is Resolution.Minute Resolution.MINUTE . To change the resolution, in the Initialize method, pass a resolution argument to the universe creation method.

AddOption("SPY", resolution: Resolution.Daily);
self.add_option("SPY", resolution=Resolution.DAILY)

Leverage

The Leverage leverage setting is a float decimal that defines the maximum amount of leverage you can use for a single asset in a non-derivative universe. The default value is Security.NullLeverage Security.NULL_LEVERAGE (0). To change the leverage, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you add the universe.

UniverseSettings.Leverage = 2.0m;
AddUniverse(Universe.DollarVolume.Top(50));
self.universe_settings.leverage = 2.0
self.add_universe(self.universe.dollar_volume.top(50))

Fill Forward

The FillForward fill_forward setting is a bool that defines whether or not too fill forward data. The default value is true True . To disable fill forward in non-derivative universes, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you add the universe.

UniverseSettings.FillForward = false;
AddUniverse(Universe.DollarVolume.Top(50));
self.universe_settings.fill_forward = False
self.add_universe(self.universe.dollar_volume.top(50))

To disable fill forward in derivative universes, pass a fillForward fill_forward argument to the universe creation method.

AddIndexOption("VIX", fillForward: false);
self.add_index_option("VIX", fill_forward=False)

Extended Market Hours

The ExtendedMarketHours extended_market_hours setting is a bool that defines the trading schedule. If it's true True , your algorithm receives price data for all trading hours. If it's false False , your algorithm receives price data only for regular trading hours. The default value is false False .

You only receive extended market hours data if you create the subscription with an intraday resolution. If you create the subscription with daily resolution, the daily bars only reflect the regular trading hours.

To view the trading schedule of an asset, open Asset Classes , click an asset class, then click Market Hours .

To enable extended market hours in non-derivative universes, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you add the universe.

UniverseSettings.ExtendedMarketHours = true;
AddUniverse(Universe.DollarVolume.Top(50));
self.universe_settings.extended_market_hours = True
self.add_universe(self.universe.dollar_volume.top(50))

To enable extended market hours in derivative universes, pass an extendedMarketHours extended_market_hours argument to the universe creation method.

AddFuture(Futures.Currencies.BTC, extendedMarketHours: true);
self.add_future(Futures.Currencies.BTC, extended_market_hours=True)

Minimum Time in Universe

The MinimumTimeInUniverse minimum_time_in_universe setting is a timedelta TimeSpan object that defines the minimum amount of time an asset must be in the universe before the universe can remove it. The default value is TimeSpan.FromDays(1) timedelta(1) . To change the minimum time, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you add the universe.

UniverseSettings.MinimumTimeInUniverse = TimeSpan.FromDays(7);
AddUniverse(Universe.DollarVolume.Top(50));
self.universe_settings.minimum_time_in_universe = timedelta(7)
self.add_universe(self.universe.dollar_volume.top(50))

Data Normalization Mode

The DataNormalizationMode data_normalization_mode setting is an enumeration that defines how historical data is adjusted. This setting is only applicable for US Equities and Futures.

US Equities

In the case of US Equities, the data normalization mode affects how historical data is adjusted for corporate actions . To view all the available options, see Data Normalization . The default value is DataNormalizationMode.Adjusted DataNormalizationMode.ADJUSTED . To change the data normalization mode, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you add the universe.

UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
AddUniverse(Universe.DollarVolume.Top(50));
self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW
self.add_universe(self.universe.dollar_volume.top(50))

Futures

In the case of Futures, the data normalization mode affects how historical data of two contracts is stitched together to form the continuous contract . To view all the available options, see Data Normalization . The default value is DataNormalizationMode.Adjusted DataNormalizationMode.ADJUSTED . To change the data normalization mode, in the Initialize method, pass a dataNormalizationMode data_normalization_mode argument to the AddFuture add_future method.

AddFuture(Futures.Currencies.BTC, dataNormalizationMode: DataNormalizationMode.BackwardsRatio);
self.add_future(Futures.Currencies.BTC, data_normalization_mode=DataNormalizationMode.BACKWARDS_RATIO)

Contract Depth Offset

The ContractDepthOffset contract_depth_offset setting is an int that defines which contract to use for the continuous Futures contract. 0 is the front month contract, 1 is the following back month contract, and 3 is the second back month contract. The default value is 0. To change the contract depth offset, in the Initialize method, pass a contractDepthOffset contract_depth_offset argument to the AddFuture add_future method.

AddFuture(Futures.Currencies.BTC, contractDepthOffset: 3);
self.add_future(Futures.Currencies.BTC, contract_depth_offset=3)

Asynchronous Selection

The Asynchronous asynchronous setting is a bool that defines whether or not LEAN can run universe selection asynchronously, utilizing concurrent execution to increase the speed of your algorithm. The default value for this setting is false False . If you enable this setting, abide by the following rules:

To enable asynchronous universe selection, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you add the universe.

UniverseSettings.Asynchronous = true;
AddUniverse(Universe.DollarVolume.Top(50));
self.universe_settings.asynchronous = True
self.add_universe(self.universe.dollar_volume.top(50))

Schedule

The Schedule schedule setting defines the selection schedule of the universe. Most universes run on a daily schedule. To change the selection schedule, call the UniverseSettings.Schedule.On universe_settings.schedule.on method with an IDateRule object before you add the universe.

UniverseSettings.Schedule.On(DateRules.MonthStart());
AddUniverse(Universe.DollarVolume.Top(50));
self.universe_settings.schedule.on(self.date_rules.month_start())
self.add_universe(self.universe.dollar_volume.top(50))

The following table describes the supported DateRules :

Member Description
self.date_rules.set_default_time_zone(time_zone: DateTimeZone) DateRules.SetDefaultTimeZone(DateTimeZone timeZone); Sets the time zone for the DateRules object used in all methods in this table. The default time zone is the algorithm time zone .
self.date_rules.on(year: int, month: int, day: int) DateRules.On(int year, int month, int day) Trigger an event on a specific date.
self.date_rules.every_day() DateRules.EveryDay() Trigger an event every day.
self.date_rules.every_day(symbol: Symbol) DateRules.EveryDay(Symbol symbol) Trigger an event every day a specific symbol is trading.
self.date_rules.every(days: List[DayOfWeek]) DateRules.Every(params DayOfWeek[] days) Trigger an event on specific days throughout the week. To view the DayOfWeek enum members, see DayOfWeek Enum in the .NET documentation.
self.date_rules.month_start(days_offset: int = 0) DateRules.MonthStart(int daysOffset = 0) Trigger an event on the first day of each month plus an offset.
self.date_rules.month_start(symbol: Symbol, daysOffset: int = 0) DateRules.MonthStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each month for a specific symbol plus an offset.
self.date_rules.month_end(days_offset: int = 0) DateRules.MonthEnd(int daysOffset = 0) Trigger an event on the last day of each month minus an offset.
self.date_rules.month_end(symbol: Symbol, daysOffset: int = 0) DateRules.MonthEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each month for a specific symbol minus an offset.
self.date_rules.week_start(days_offset: int = 0) DateRules.WeekStart(int daysOffset = 0) Trigger an event on the first day of each week plus an offset.
self.date_rules.week_start(symbol: Symbol, days_offset: int = 0) DateRules.WeekStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each week for a specific symbol plus an offset.
self.date_rules.week_end(days_offset: int = 0) DateRules.WeekEnd(int daysOffset = 0) Trigger an event on the last day of each week minus an offset.
self.date_rules.week_end(symbol: Symbol, days_offset: int = 0) DateRules.WeekEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each week for a specific symbol minus an offset.
self.date_rules.today DateRules.Today Trigger an event once today.
self.date_rules.tomorrow DateRules.Tomorrow Trigger an event once tomorrow.

To define custom date rules, create a FuncDateRule object. The FuncDateRule constructor expects a name argument of type string str and a getDatesFunction get_dates_function argument of type Func<DateTime, DateTime, IEnumerable<DateTime>> Callable[[datetime, datetime], List[datetime]] . The getDatesFunction get_dates_function function receives the start and end dates of the algorithm and returns a list of dates for the date rule. In live trading, the end date is 12/31/2025. The following example demonstrates how to define a date rule that represents the 10th day of each month:

var dateRule = new FuncDateRule(
    name: "10th_day_of_the_month",
    getDatesFunction: (start, end) => Enumerable.Range(start.Year, end.Year - start.Year + 1)
        .SelectMany(year => Enumerable.Range(1, 12).Select(month => new DateTime(year, month, 10)))
);
date_rule = FuncDateRule(
    name="10th_day_of_the_month", 
    get_dates_function=lambda start, end: [
        datetime(year, month, 10) 
        for year in range(start.year, end.year) for month in range(1,12)
    ]
) 

In live trading, scheduled universes run at roughly 8 AM Eastern Time to ensure there is enough time for the data to process.

Configure Universe Securities

Instead of configuring global universe settings, you can individually configure the settings of each security in the universe with a security initializer. Security initializers let you apply any security-level reality model or special data requests on a per-security basis. To set the security initializer, in the Initialize initialize method, call the SetSecurityInitializer set_security_initializer method and then define the security initializer.

//In Initialize
SetSecurityInitializer(CustomSecurityInitializer);

private void CustomSecurityInitializer(Security security)
{
    // Disable trading fees
    security.SetFeeModel(new ConstantFeeModel(0, "USD"));
}
#In Initialize
self.set_security_initializer(self._custom_security_initializer)

def _custom_security_initializer(self, security: Security) -> None:
    # Disable trading fees
    security.set_fee_model(ConstantFeeModel(0, "USD"))

For simple requests, you can use the functional implementation of the security initializer. This style lets you configure the security object with one line of code.

SetSecurityInitializer(security => security.SetFeeModel(new ConstantFeeModel(0, "USD")));
self.set_security_initializer(lambda security: security.set_fee_model(ConstantFeeModel(0, "USD")))

In some cases, you may want to trade a security in the same time loop that you create the security subscription. To avoid errors, use a security initializer to set the market price of each security to the last known price. The GetLastKnownPrices get_last_known_prices method seeds the security price by gathering the security data over the last 3 days. If there is no data during this period, the security price remains at 0.

var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
SetSecurityInitializer(security => seeder.SeedSecurity(security));
seeder = FuncSecuritySeeder(self.get_last_known_prices)
self.set_security_initializer(lambda security: seeder.seed_security(security))

If you call the SetSecurityInitializer set_security_initializer method, it overwrites the default security initializer. The default security initializer uses the security-level reality models of the brokerage model to set the following reality models of each security:

The default security initializer also sets the leverage of each security and intializes each security with a seeder function. To extend upon the default security initializer instead of overwriting it, create a custom BrokerageModelSecurityInitializer .

// In Initialize
SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));

// Outside of the algorithm class
class MySecurityInitializer : BrokerageModelSecurityInitializer
{
    public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
        : base(brokerageModel, securitySeeder) {}    
    
    public override void Initialize(Security security)
    {
        // First, call the superclass definition
        // This method sets the reality models of each security using the default reality models of the brokerage model
        base.Initialize(security);

        // Next, overwrite some of the reality models        
        security.SetFeeModel(new ConstantFeeModel(0, "USD"));    
    }
}
# In Initialize
self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))

# Outside of the algorithm class
class MySecurityInitializer(BrokerageModelSecurityInitializer):

    def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
        super().__init__(brokerage_model, security_seeder)
    
    def initialize(self, security: Security) -> None:
        # First, call the superclass definition
        # This method sets the reality models of each security using the default reality models of the brokerage model
        super().initialize(security)

        # Next, overwrite some of the reality models        
        security.set_fee_model(ConstantFeeModel(0, "USD"))

To set a seeder function without overwriting the reality models of the brokerage, use the standard BrokerageModelSecurityInitializer .

var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, seeder));
seeder = FuncSecuritySeeder(self.get_last_known_prices)
self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, seeder))

 

Universes

Equity

You can create any of the following dynamic universes of equity. Click one to learn more.

See Also

US Equity

 

Equity

Liquidity Universes

Introduction

A liquidity universe lets you select a set of stocks with the greatest dollar volume in the market.

Create Universes

To add a dollar volume universe, call the Universe.DollarVolume.Top universe.dollar_volume.top helper method and pass the result to the AddUniverse add_universe method.

// Add the 50 stocks with the highest dollar volume
UniverseSettings.Asynchronous = true;
AddUniverse(Universe.DollarVolume.Top(50));
# Add the 50 stocks with the highest dollar volume
self.universe_settings.asynchronous = True
self.add_universe(self.universe.dollar_volume.top(50))

Selection Frequency

Equity universes run on a daily basis by default. To adjust the selection schedule, see Schedule .

Examples

Demonstration Algorithms
UniverseSelectionDefinitionsAlgorithm.py Python UniverseSelectionDefinitionsAlgorithm.cs C#

 

Equity

Fundamental Universes

Introduction

A fundamental universe lets you select stocks based on corporate fundamental data. This data is powered by Morningstar® and includes approximately 8,100 tickers (including delisted companies) with 900 properties each.

Create Universes

To add a fundamental universe, in the Initialize initialize method, pass a filter function to the AddUniverse add_universe method. The filter function receives a list of Fundamental objects and must return a list of Symbol objects. The Symbol objects you return from the function are the constituents of the fundamental universe and LEAN automatically creates subscriptions for them. Don't call AddEquity add_equity in the filter function.

public class MyUniverseAlgorithm : QCAlgorithm {
    private Universe _universe;
    public override void Initialize() 
    {
        UniverseSettings.Asynchronous = true;
        _universe = AddUniverse(FundamentalFilterFunction);
    }
        
    private IEnumerable<Symbol> FundamentalFilterFunction(IEnumerable<Fundamental> fundamental) 
    {
         return (from f in fundamental
                where f.HasFundamentalData
                select f.Symbol);
    }
}
class MyUniverseAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self._universe = self.add_universe(self._fundamental_function)
    
    def _fundamental_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
        return [c.symbol for c in fundamental if c.has_fundamental_data]

Fundamental objects have the following attributes:

Example

The simplest example of accessing the fundamental object would be harnessing the iconic PE ratio for a stock. This is a ratio of the price it commands to the earnings of a stock. The lower the PE ratio for a stock, the more affordable it appears.

// Take the top 50 by dollar volume using fundamental
// Then the top 10 by PERatio using fine
UniverseSettings.Asynchronous = true;
_universe = AddUniverse(
    fundamental => (from f in fundamental
        where f.Price > 10 && f.HasFundamentalData && !Double.IsNaN(f.ValuationRatios.PERatio)
        orderby f.DollarVolume descending).Take(100)
        .OrderBy(f => f.ValuationRatios.PERatio).Take(10)
        .Select(f => f.Symbol));
# In Initialize:
self.universe_settings.asynchronous = True
self._universe = self.add_universe(self._fundamental_selection_function)
    
def _fundamental_selection_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    filtered = [f for f in fundamental if f.price > 10 and f.has_fundamental_data and not np.isnan(f.valuation_ratios.pe_ratio)]
    sorted_by_dollar_volume = sorted(filtered, key=lambda f: f.dollar_volume, reverse=True)[:100]
    sorted_by_pe_ratio = sorted(sorted_by_dollar_volume, key=lambda f: f.valuation_ratios.pe_ratio, reverse=False)[:10]
    return [f.symbol for f in sorted_by_pe_ratio]

Asset Categories

In addition to valuation ratios, the US Fundamental Data from Morningstar has many other data point attributes, including over 200 different categorization fields for each US stock. Morningstar groups these fields into sectors, industry groups, and industries.

Sectors are large super categories of data. To get the sector of a stock, use the MorningstarSectorCode property.

var tech = fundamental.Where(x => x.AssetClassification.MorningstarSectorCode == MorningstarSectorCode.Technology);
tech = [x for x in fundamental if x.asset_classification.morningstar_sector_code == MorningstarSectorCode.TECHNOLOGY]

Industry groups are clusters of related industries that tie together. To get the industry group of a stock, use the MorningstarIndustryGroupCode property.

var ag = fundamental.Where(x => x.AssetClassification.MorningstarIndustryGroupCode == MorningstarIndustryGroupCode.Agriculture);
ag = [x for x in fundamental if x.asset_classification.morningstar_industry_group_code == MorningstarIndustryGroupCode.AGRICULTURE]

Industries are the finest level of classification available. They are the individual industries according to the Morningstar classification system. To get the industry of a stock, use the MorningstarIndustryCode .

var coal = fundamental.Where(x => x.AssetClassification.MorningstarIndustryCode == MorningstarSectorCode.Coal);
coal = [x for x in fundamental if x.asset_classification.morningstar_industry_code == MorningstarSectorCode.COAL]

Practical Limitations

Fundamental universes allow you to select an unlimited universe of assets to analyze. Each asset in the universe consumes approximately 5MB of RAM, so you may quickly run out of memory if your universe filter selects many assets. If you backtest your algorithms in the Algorithm Lab, familiarize yourself with the RAM capacity of your backtesting and live trading nodes . To keep your algorithm fast and efficient, only subscribe to the assets you need.

Data Availability

Fundamental objects can have NaN values for some of their properties. Before you sort the Fundamental objects by one of the properties, filter out the objects that have a NaN value for the property.

private IEnumerable<Symbol> FundamentalFilterFunction(IEnumerable<Fundamental> fundamentals) 
{
    return fundamentals
        .Where(f => f.HasFundamentalData && !Double.IsNaN(f.ValuationRatios.PERatio))
        .OrderBy(f => f.ValuationRatios.PERatio)
        .Take(10)
        .Select(x => x.Symbol);
}
def _fundamental_selection_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    filtered = [f for f in fundamental if f.has_fundamental_data and not np.isnan(f.valuation_ratios.pe_ratio)]
    sorted_by_pe_ratio = sorted(filtered, key=lambda f: f.valuation_ratios.pe_ratio)
    return [f.symbol for f in sortedByPeRatio[:10] ]

Direct Access

To get fundamental data for Equities in your algorithm, use the Fundamentals fundamentals property of the Equity objects. The fundamental data represent the company's fundamentals for the current algorithm time.

var fundamentals = Securities[_symbol].Fundamentals;
fundamentals = self.securities[self._symbol].fundamentals

To get fundamental data for Equities, regardless of whether or not you have subscribed to them in your algorithm, call the Fundamentals fundamentals method. If you pass one Symbol , the method returns a Fundamental object. If you pass a list of Symbol objects, the method returns a list of Fundamental objects. The fundamental data represents the corporate fundamentals for the current algorithm time.

// Single asset 
var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);
var ibmFundamental = Fundamentals(ibm);

// Multiple assets
var nb = QuantConnect.Symbol.Create("NB", SecurityType.Equity, Market.USA);
var fundamentals = Fundamentals(new List<Symbol>{ nb, ibm }).ToList();
# Single asset
ibm = QuantConnect.symbol.create("IBM", SecurityType.EQUITY, Market.USA)
ibm_fundamental = self.fundamentals(ibm)

# Multiple assets
nb = QuantConnect.symbol.create("NB", SecurityType.EQUITY, Market.USA)
fundamentals = self.fundamentals([ nb, ibm ])

Data Availability

Some assets don't have fundamentals (for example, ETFs) and the Morningstar dataset doesn't provide fundamentals for all US Equities. To check if fundamental data is available for an asset, use the HasFundamentalData has_fundamental_data property.

var hasFundamentalData = Securities[_symbol].Fundamentals.HasFundamentalData;
has_fundamental_data = self.securities[self._symbol].fundamentals.has_fundamental_data

Object References

If you save a reference to the Fundamentals fundamentals object or its properties, you can access the fundamental properties as they change over time.

_fundamentals = Securities[_symbol].Fundamentals;
var earningRatios = _fundamentals.EarningRatios;
self._fundamentals = self.securities[self._symbol].fundamentals
earning_ratios = self.fundamentals.earning_ratios

Historical Data

To get historical fundamental data, call the History history method. The return type depends on how you call the method.

var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);

// Fundamental objects
var fundamentalHistory = History<Fundamental>(ibm, TimeSpan.FromDays(30));

// Fundamentals objects for all US Equities (including delisted companies)
var fundamentalsHistory = History<Fundamentals>(TimeSpan.FromDays(30));

// Collection of Fundamental objects for all US Equities (including delisted companies)
var collectionHistory = History(_universe, 30, Resolution.Daily);
foreach (var fundamental in collectionHistory)
{
    // Cast to Fundamental is required
    var highestMarketCap = fundamental.OfType<Fundamental>().OrderByDescending(x => x.MarketCap).Take(5);
}
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)

# Multi-index DataFrame objects
df_history = self.history(Fundamental, ibm, timedelta(30))

# Fundamental objects
fundamental_history = self.history[Fundamental](ibm, timedelta(30))

# Fundamentals objects for all US Equities (including delisted companies)
fundamentals_history = self.history[Fundamentals](timedelta(30))

# Multi-index Series objects of list of Fundamental objects
series_history = self.history(self._universe, 30, Resolution.DAILY)
for (universe_symbol, time), fundamental in series_history.items():
    highest_market_cap = sorted(fundamental, key=lambda x: x.market_cap)[-5:]

For more information about historical fundamental data, see Equity Fundamental Data .

Selection Frequency

Equity universes run on a daily basis by default. To adjust the selection schedule, see Schedule .

Live Trading Considerations

The live data for fundamental universe selection arrives at 6/7 AM Eastern Time (ET), so fundamental universe selection runs for live algorithms between 7 and 8 AM ET. This timing allows you to place trades before the market opens. Don't schedule anything for midnight because the universe selection data isn't ready yet.

Examples

The following examples are typical filter functions you may want.

Example 1: Take 500 stocks that are worth more than $10 and have more than $10M daily trading volume

The most common use case is to select a lot of liquid stocks. With a fundamental universe filter, this is simple and fast. The following example selects the top most liquid 500 stocks over $10 per share.

private IEnumerable<Symbol> FundamentalFilterFunction(IEnumerable<Fundamental> fundamental) 
{
    // Linq makes this a piece of cake;
    return (from f in fundamental
        where f.Price > 10 && f.DollarVolume > 10000000
        orderby f.DollarVolume descending
        select f.Symbol).Take(500);
}
def _fundamental_filter_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    filtered = [f for f in fundamental if f.price > 10 and f.dollar_volume > 10000000]
    sorted_by_dollar_volume = sorted(filtered, key=lambda f: f.dollar_volume, reverse=True)
    return sorted_by_dollar_volume[:500]

Example 2: Take 10 stocks above their 200-Day EMA and have more than $1B daily trading volume

Another common request is to filter the universe by a technical indicator, such as only picking stocks above their 200-day EMA. The Fundamental object has adjusted price and volume information, so you can do any price-related analysis.

ConcurrentDictionary<Symbol, SelectionData>
    _state_data = new ConcurrentDictionary<Symbol, SelectionData>();

private IEnumerable<Symbol> FundamentalFilterFunction(IEnumerable<Fundamental> fundamental)
{
    // Linq makes this a piece of cake;
    return (from f in fundamental
        let avg = _state_data.GetOrAdd(f.Symbol, sym => new SelectionData(200))
        where avg.Update(f.EndTime, f.AdjustedPrice)
        where f.Price > avg.Ema.Current.Value && f.DollarVolume > 1000000000
        orderby f.DollarVolume descending
        select f.Symbol).Take(10);
}
# setup state storage in initialize method
self._state_data = { }
    
def _fundamental_filter_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    # We are going to use a dictionary to refer the object that will keep the moving averages
    for f in fundamental:
        if f.symbol not in self._state_data:
            self._state_data[f.symbol] = SelectionData(f.symbol, 200)
    
        # Updates the SymbolData object with current EOD price
        avg = self._state_data[f.symbol]
        avg.update(c.end_time, f.adjusted_price, f.dollar_volume)
    
    # Filter the values of the dict to those above EMA and more than $1B vol.
    values = [x for x in self._state_data.values() if x.is_above_ema and x.volume > 1000000000]
        
    # sort by the largest in volume.
    values.sort(key=lambda x: x.volume, reverse=True)
    
    # we need to return only the symbol objects
    return [ x.symbol for x in values[:10] ]

In this example, the SelectionData class group variables for the universe selection and updates the indicator of each asset. We highly recommend you follow this pattern to keep your algorithm tidy and bug free. The following snippet shows an example implementation of the SelectionData class, but you can make this whatever you need to store your custom universe filters.

class SelectionData(object):
    def __init__(self, symbol, period):
        self._symbol = symbol
        self._ema = ExponentialMovingAverage(period)
        self.is_above_ema = False
        self.volume = 0

    def update(self, time, price, volume):
        self.volume = volume
        if self._ema.update(time, price):
            self.is_above_ema = price > self._ema.current.value
// example selection data class
private class SelectionData
{
    // variables you need for selection
    public readonly ExponentialMovingAverage Ema;

    // initialize your variables and indicators.
    public SelectionData(int period)
    {
        Ema = new ExponentialMovingAverage(period);
    }

    // update your variables and indicators with the latest data.
    // you may also want to use the History API here.
    public bool Update(DateTime time, decimal value)
    {
        return Ema.Update(time, value);
    }
}

Note that the preceding SelectionData class uses a manual EMA indicator instead of the automatic version . For more information about universes that select assets based on indicators, see Indicator Universes . You need to use a SelectionData class instead of assigning the EMA to the Fundamental object because you can't create custom properties attributes on Fundamental objects like you can with Security objects.

Example 3: Take 10 stocks that are the furthest above their 10-day SMA of volume

The process to get the 10-day SMA stock volume is the same process as in Example 2. First, you should define a SelectionData class that performs the averaging. For this example, the following class will serve this purpose:

class SelectionData(object):
    def __init__(self, symbol, period):
        self._symbol = symbol
        self.volume_ratio = 0
        self._sma = SimpleMovingAverage(period)

    def update(self, time, price, volume):
        if self._sma.update(time, volume):
            # get ratio of this volume bar vs previous 10 before it.
            self.volume_ratio = volume / self._sma.current.value
private class SelectionData
{
    public readonly Symbol Symbol;
    public readonly SimpleMovingAverage VolumeSma;
    public decimal VolumeRatio;
    public SelectionData(Symbol symbol, int period)
    {
        Symbol = symbol;
        VolumeSma = new SimpleMovingAverage(period);
    }
    public bool Update(DateTime time, decimal value)
    {
        var ready = VolumeSma.Update(time, value);
        VolumeRatio = value / VolumeSma.Current.Value;
        return ready;
    }
}

This class tracks the ratio of today's volume relative to historical volumes. You can use this ratio to select assets that are above their 10-day simple moving average and sort the results by the ones that have had the biggest jump since yesterday.

def _fundamental_filter_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    for f in fundamental:
        if f.symbol not in self._state_data:
            self._state_data[f.symbol] = SelectionData(f.symbol, 10)
        avg = self._state_data[f.symbol]
        avg.update(f.end_time, f.adjusted_price, f.dollar_volume)

    # filter the values of selectionData(sd) above SMA
    values = [sd for sd in self._state_data.values() if sd.volume_ratio > 1]
        
    # sort sd by the largest % jump in volume.
    values.sort(key=lambda sd: sd.volume_ratio, reverse=True)

    # return the top 10 symbol objects
    return [ sd.symbol for sd in values[:10] ]
 
private IEnumerable<Symbol> FundamentalFilterFunction(IEnumerable<Fundamental> fundamental) 
{ return (from f in fundamental let avg = _state_data.GetOrAdd(f.Symbol, sym => new SelectionData(10)) where avg.Update(f.EndTime, f.Volume) where avg.VolumeRatio > 1 orderby avg.VolumeRatio descending select f.Symbol).Take(10); }

Example 4: Take the top 10 "fastest moving" stocks with a 50-Day EMA > 200 Day EMA

You can construct complex universe filters with the SelectionData helper class pattern. To view a full example of this algorithm, see the EmaCrossUniverseSelectionAlgorithm EmaCrossUniverseSelectionAlgorithm in the LEAN GitHub repository or take the related Boot Camp lesson .

Example 5: Piotroski F-Score

To view this example, see the Piotroski F-Score Investing Research post.

Demonstration Algorithms
FundamentalUniverseSelectionAlgorithm.py Python FundamentalUniverseSelectionAlgorithm.cs C#

 

Equity

ETF Constituents Universes

Introduction

An ETF constituents universe lets you select a universe of securities in an exchange traded fund. The US ETF Constituents dataset includes 2,650 US ETFs you can use to create your universe.

Create Universes

To add an ETF Constituents universe, call the Universe.ETF universe.etf method.

public class ETFConstituentsAlgorithm : QCAlgorithm
{
    public override void Initialize() 
    {
        UniverseSettings.Asynchronous = true;
        AddUniverse(Universe.ETF("SPY"));
    }
}
class ETFConstituentsAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True        
        self.add_universe(self.universe.etf("SPY"))

The following table describes the ETF etf method arguments:

Argument: etfTicker etf_ticker

The ETF ticker. To view the supported ETFs in the US ETF Constituents dataset, see Supported ETFs .

Data Type: string str | Default Value: None

Argument: universeSettings universe_settings

The universe settings . If you don't provide an argument, it uses the algorithm UniverseSettings universe_settings .

Data Type: UniverseSettings | Default Value: null None

Argument: universeFilterFunc universe_filter_func

A function to select some of the ETF constituents for the universe. If you don't provide an argument, it selects all of the constituents.

Data Type: Func<IEnumerable<ETFConstituentUniverse>, IEnumerable<Symbol>> Callable[[List[ETFConstituentUniverse]], List[Symbol]] | Default Value: null None

To select a subset of the ETF constituents, provide a universeFilterFunc universe_filter_func argument. The filter function receives ETFConstituentUniverse objects, which represent one of the ETF constituents. ETFConstituentUniverse objects have the following attributes:

public class ETFConstituentsAlgorithm : QCAlgorithm 
{
    private Universe _universe;
    public override void Initialize() 
    {
        UniverseSettings.Asynchronous = true;
        _universe = Universe.ETF("SPY", UniverseSettings, ETFConstituentsFilter);
        AddUniverse(_universe);
    }

    private IEnumerable<Symbol> ETFConstituentsFilter(IEnumerable<ETFConstituentUniverse> constituents)
    {
        // Get the 10 securities with the largest weight in the index
        return constituents.OrderByDescending(c => c.Weight).Take(10).Select(c => c.Symbol);
    }
}
class ETFConstituentsAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self._universe = self.universe.etf("SPY", self.universe_settings, self._etf_constituents_filter)
        self.add_universe(self._universe)

    def _etf_constituents_filter(self, constituents: List[ETFConstituentUniverse]) -> List[Symbol]:
        # Get the 10 securities with the largest weight in the index
        selected = sorted([c for c in constituents if c.weight],
            key=lambda c: c.weight, reverse=True)[:10]
        return [c.symbol for c in selected]

Historical Data

To get historical ETF constituents data, call the History history method with the Universe object and the lookback period. The return type is a IEnumerable<BaseDataCollection> and you have to cast its items to ETFConstituentUniverse .

To get historical ETF constituents data, call the History history method with the Universe object and the lookback period. The return type is a multi-index pandas.Series of ETFConstituentUniverse list.

var history = History(_universe, 30, Resolution.Daily);
foreach (var constituents in history)
{
    foreach (ETFConstituentUniverse constituent in constituents)
    {
        Log($"{constituent.Symbol} weight at {constituent.EndTime}: {constituent.Weight}");
    }
}
history = self.history(self._universe, 30, Resolution.DAILY)
for (universe_symbol, time), constituents in history.items():
    for constituent in constituents:
        self.log(f'{constituent.symbol} weight at {constituent.end_time}: {constituent.weight}')

For more information about ETF Constituents data, see US ETF Constituents .

Selection Frequency

Equity universes run on a daily basis by default. To adjust the selection schedule, see Schedule .

Examples

The following example chains an ETF constituents universe and fundamental universe . It first selects all the constituents of the QQQ ETF and then filters them down in the fundamental universe to select the assets that are trading above their average price over the last 200 days. The output of the fundamental universe selection method is the output of the chained universe. The Fundamental objects that the fundamental universe filter function recieves contains the prices of the ETF constituents. By chaining the ETF constituents universe into the fundamental universe, you can update the indicators with the price instead of making a history request .

using System;
using System.Collections.Generic;
using System.Linq;
using QuantConnect.Util;
using QuantConnect.Indicators;
using QuantConnect.Data.Fundamental;
using QuantConnect.Securities;

namespace QuantConnect.Algorithm.CSharp
{
    public class ChainedUniverseAlgorithm : QCAlgorithm
    {
        private Dictionary<Symbol, SymbolData> _symbolDataBySymbol = new Dictionary<Symbol, SymbolData>();

        public override void Initialize()
        {
            SetCash(100000);
            SetStartDate(2023, 6, 1);
            UniverseSettings.Asynchronous = true;
            AddUniverse(Universe.ETF("QQQ"), FundamentalSelection);
        }

        public IEnumerable<Symbol> FundamentalSelection(IEnumerable<Fundamental> fundamental)
        {
            // Create/Update the indicator for each asset in the ETF
            List<Symbol> universeSymbols = new List<Symbol>();
            foreach (var f in fundamental)
            {
                universeSymbols.Add(f.Symbol);
                if (!_symbolDataBySymbol.ContainsKey(f.Symbol))
                {
                    // Create an indicator for each asset that enters the ETF
                    _symbolDataBySymbol[f.Symbol] = new SymbolData(this, f.Symbol);
                }
                // Update each indicator
                _symbolDataBySymbol[f.Symbol].Update(Time, f.AdjustedPrice);
            }

            // Remove indicators for assets that are no longer in the ETF
            var symbolsToRemove = _symbolDataBySymbol.Keys.Where(symbol => !universeSymbols.Contains(symbol)).ToList();
            foreach (var symbol in symbolsToRemove)
            {
                _symbolDataBySymbol.Remove(symbol);
            }

            // Select a subset of the ETF constituents based on the indicator value
            var universe = _symbolDataBySymbol.Where(kvp => kvp.Value.IsAboveSma).Select(kvp => kvp.Key);

            // Plot the results
            Plot("Universe", "Possible", fundamental.Count());
            Plot("Universe", "Selected", universe.Count());

            // Return the selected assets
            return universe;
        }
    }

    public class SymbolData
    {
        private SimpleMovingAverage _sma;
        public bool IsAboveSma { get; private set; }

        public SymbolData(QCAlgorithm algorithm, Symbol symbol, int period = 200)
        {
            _sma = new SimpleMovingAverage(period);
            algorithm.WarmUpIndicator(symbol, _sma, Resolution.Daily);
        }

        public void Update(DateTime time, decimal value)
        {
            IsAboveSma = _sma.Update(time, value) && value > _sma.Current.Value;
        }
    }
}
from AlgorithmImports import * 

class ChainedUniverseAlgorithm(QCAlgorithm):
    _symbol_data_by_symbol = {}
    
    def initialize(self):
        self.set_cash(100000)
        self.set_start_date(2023, 6, 1)
        self.universe_settings.asynchronous = True
        self.add_universe(self.universe.etf("QQQ"), self._fundamental_selection)
    
    def _fundamental_selection(self, fundamental: List[Fundamental]) -> List[Symbol]:
        # Create/Update the indicator for each asset in the ETF
        universe_symbols = []
        for f in fundamental:
            universe_symbols.append(f.symbol)
            if f.symbol not in self._symbol_data_by_symbol:
                # Create an indicator for each asset that enters the ETF
                self._symbol_data_by_symbol[f.symbol] = SymbolData(self, f.symbol)
                
            # Update each indicator
            self._symbol_data_by_symbol[f.symbol].update(self.time, f.adjusted_price)
    
        # Remove indicators for assets that are no longer in the ETF
        symbols_to_remove = [symbol for symbol in self._symbol_data_by_symbol.keys() if symbol not in universe_symbols]
        for symbol in symbols_to_remove:
            self.symbol_data_by_symbol.pop(symbol)

        # Select a subset of the ETF constituents based on the indicator value
        universe = [symbol for symbol, symbol_data in self._symbol_data_by_symbol.items() if symbol_data.is_above_sma]
            
        # Plot the results
        self.plot("Universe", "Possible", len(list(fundamental)))
        self.plot("Universe", "Selected", len(universe))
    
        # Return the selected assets
        return universe
    
    
class SymbolData(object):
    def __init__(self, algorithm, symbol, period=200):
        self._sma = SimpleMovingAverage(period)
        algorithm.warm_up_indicator(symbol, self._sma, Resolution.DAILY)
    
    def update(self, time, value):
        self.is_above_sma = self._sma.update(time, value) and value > self._sma.current.value
Demonstration Algorithms
ETFConstituentUniverseRSIAlphaModelAlgorithm.py Python UniverseOnlyRegressionAlgorithm.py Python ETFConstituentUniverseRSIAlphaModelAlgorithm.cs C# UniverseOnlyRegressionAlgorithm.cs C#

 

Equity

Chained Universes

Introduction

You can combine ("chain") universes together to fetch fundamental and alternative data on a specific subset of assets. Universes filter input data and return Symbol objects. The only requirement is that Symbol objects the filter returns are a subset of the input data. The source of the Symbol objects is unrestricted, so you can feed the output of one universe into another.

Filter Pattern

Universes filter a large set of Symbol objects by a coarse filter to quickly reduce the data processing requirement. This is often a first step before applying a second filter or requesting alternative data. For example, a strategy might only be interested in easily tradable liquid assets so quickly eliminates all stocks with less than $1M USD / day in trading volume.

The order of your filters can improve the speed of your research. By applying filters that narrow the universe the most, or are the lightest weight first, you can significantly reduce the amount of data your algorithm processes. Unless necessary, you can also not return any selections from earlier filters to further improve research speed, keeping only the universe data for later filters.

Universe Data Weights

To speed up your algorithm, request the lightest weight data first before chaining heavier filters or adding alternative data. The following table shows the size each dataset:

Name Data Size / Weight
US Equities (Fundamental - Dollar Volume only) Light (100 MB)
US Equities (Fundamental) Heavy (up to 20 GB)
US Equity Options Huge (200 TB)
US Index Options Medium (500 GB)
US Futures Medium (500 GB)
US Futures Options Medium (500 GB)
Crypto Light (1 GB)
Alternative / General Light (100 MB - 2 GB)
Alternative / Tiingo News Medium (200 GB)

Chain Fundamental and Alternative Data

The following example chains a fundamental universe and a QuiverCNBCsUniverse alternative universe . It first selects the 100 most liquid US Equities and then filters them down to those mentioned by CNBC commentator/trader Jim Cramer. The output of the alternative universe selection method is the output of the chained universe.

using System.Collections.Generic;
using System.Linq;
using QuantConnect.Util;
using QuantConnect.Data;
using QuantConnect.DataSource;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Securities;
    
namespace QuantConnect.Algorithm.CSharp
{
    public class ChainedUniverseAlgorithm : QCAlgorithm
    {
        private List<Symbol> _fundamental = new();

        public override void Initialize()
        {
            SetStartDate(2023, 1, 2);
            SetCash(100000);
            UniverseSettings.Asynchronous = true;
            AddUniverse(fundamental =>
            {
                _fundamental = (from c in fundamental
                    orderby c.DollarVolume descending
                    select c.Symbol).Take(100).ToList();
                return Universe.Unchanged;
            });
            AddUniverse<QuiverCNBCsUniverse>(altCoarse =>
            {
                var followers = from d in altCoarse.OfType<QuiverCNBCsUniverse>()
                    where d.Traders.ToLower().Contains("cramer")
                    select d.Symbol;
                return _fundamental.Intersect(followers);
            });
        }

        public override void OnSecuritiesChanged(SecurityChanges changes)
        {
            foreach (var added in changes.AddedSecurities)
            {
                AddData<QuiverCNBCs>(added.Symbol);
            }
        }
    
        public override void OnData(Slice data)
        {
            foreach (var dataPoint in data.Get<QuiverCNBCs>().SelectMany(x=> x.Value.OfType()))
            {
                Debug($"{dataPoint.Symbol} traders at {data.Time}: {dataPoint.Traders}");
            }
        }
    }
}
from AlgorithmImports import *

class ChainedUniverseAlgorithm(QCAlgorithm):

    _fundamental = []

    def initialize(self):
        self.set_start_date(2023, 1, 2)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        self.add_universe(self._fundamental_filter_function)
        self.add_universe(QuiverCNBCsUniverse, self._mad_money_selection)
    
    def _fundamental_filter_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
        sorted_by_dollar_volume = sorted(fundamental, key=lambda x: x.dollar_volume, reverse=True) 
        self.fundamental = [c.symbol for c in sorted_by_dollar_volume[:100]]
        return Universe.UNCHANGED
    
    def _mad_money_selection(self, alt_coarse: List[QuiverCNBCsUniverse]) -> List[Symbol]:
        madmoney = [d.symbol for d in alt_coarse if 'Cramer' in d.traders]
        return list(set(self._fundamental) & set(madmoney))
    
    def on_securities_changed(self, changes):
        for added in changes.added_securities:
            self.add_data(QuiverCNBCs, added.symbol)
    
    def on_data(self, data):
        # Prices in the slice from the universe selection
        # Alternative data in slice from OnSecuritiesChanged Addition
        # for ticker,bar in data.bars.items():
        #     pass
        for dataset_symbol, data_points in data.get(QuiverCNBCs).items():
            for data_point in data_points:
                self.debug(f"{dataset_symbol} traders at {data.time}: {data_point.traders}")

Chain Fundamental and US Equity Options

The following example chains a fundamental universe and an Equity Options universe . It first selects 10 stocks with the lowest PE ratio and then selects their front-month call Option contracts. The output of both universes is the output of the chained universe.

using QuantConnect.Data;
using QuantConnect.Data.Fundamental;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Securities;
using QuantConnect.Util;
using System.Collections.Generic;
using System.Linq;

namespace QuantConnect.Algorithm.CSharp
{
    public class ETFUniverseOptions : QCAlgorithm
    {
        public override void Initialize()
        {
            SetStartDate(2023, 2, 2);
            SetCash(100000);
            UniverseSettings.Asynchronous = true;
            UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
            var universe = AddUniverse(FundamentalFunction);
            AddUniverseOptions(universe, OptionFilterFunction);
        }

        private IEnumerable FundamentalFunction(IEnumerable fundamental)
        {
            return fundamental
                .Where(f => !double.IsNaN(f.ValuationRatios.PERatio))
                .OrderBy(f => f.ValuationRatios.PERatio)
                .Take(10)
                .Select(x => x.Symbol);
        }
    
        private OptionFilterUniverse OptionFilterFunction(OptionFilterUniverse optionFilterUniverse)
        {
            return optionFilterUniverse.Strikes(0, 2).FrontMonth().CallsOnly();
        }
    
        public override void OnData(Slice data)
        {
            foreach (var (symbol, chain) in data.OptionChains)
            {
                foreach (var contract in chain)
                {
                    Debug($"Found {contract.Symbol} option contract for {symbol}");
                }
            }
        }
    }
}
from AlgorithmImports import *

class ChainedUniverseAlgorithm(QCAlgorithm):
    def initialize(self):
        self.set_start_date(2023, 2, 2)
        self.universe_settings.asynchronous = True
        self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW
        universe = self.add_universe(self._fundamental_function)
        self.add_universe_options(universe, self._option_filter_function)

    def _fundamental_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
        filtered = [f for f in fundamental if not np.isnan(f.valuation_ratios.pe_ratio)]
        sorted_by_pe_ratio = sorted(filtered, key=lambda f: f.valuation_ratios.pe_ratio)
        return [f.symbol for f in sorted_by_pe_ratio[:10]]

    def _option_filter_function(self, option_filter_universe: OptionFilterUniverse) -> OptionFilterUniverse:
        return option_filter_universe.strikes(0, 2).front_month().calls_only()
        
    def on_data(self, data: Slice) -> None:
        for symbol, chain in data.option_chains.items():
            for contract in chain:
                self.debug(f"Found {contract.symbol} option contract for {symbol}")

Chain ETF and Fundamental

The following example chains a fundamental universe and an ETF constituents universe . It first selects all the constituents of the QQQ ETF and then filters them down to select the 10 assets with the lowest PE ratio. The output of the fundamental universe selection method is the output of the chained universe.

using System.Collections.Generic;
using System.Linq;
using QuantConnect.Data;
using QuantConnect.Data.Fundamental;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Securities;

namespace QuantConnect.Algorithm.CSharp
{
    public class ChainedUniverseAlgorithm : QCAlgorithm
    {
        public override void Initialize()
        {
            SetStartDate(2023, 2, 2);
            SetCash(100000);
            UniverseSettings.Asynchronous = true;
            AddUniverse(Universe.ETF("QQQ", Market.USA, UniverseSettings, ETFConstituentsFilter), FundamentalSelection);
        }

        private IEnumerable<Symbol> ETFConstituentsFilter(IEnumerable<ETFConstituentUniverse> constituents)
        {
            return constituents.Select(c => c.Symbol);
        }

        private IEnumerable<Symbol> FundamentalSelection(IEnumerable<Fundamental> fundamental)
        {
            return fundamental
                .Where(f => !double.IsNaN(f.ValuationRatios.PERatio))
                .OrderBy(f => f.ValuationRatios.PERatio)
                .Take(10)
                .Select(x => x.Symbol);
        }

        public override void OnData(Slice data)
        {
            foreach (var symbol in data.Keys)
            {
                Debug($"{symbol} PE Ratio: {Securities[symbol].Fundamentals.ValuationRatios.PERatio}");
            }
        }
    }
}
from AlgorithmImports import * 

class ChainedUniverseAlgorithm(QCAlgorithm):
    def initialize(self):
        self.set_start_date(2023, 2, 2)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        self.add_universe(
            self.universe.etf("QQQ", Market.USA, self.universe_settings, self._etf_constituents_filter), 
            self._fundamental_selection
        )

    def _etf_constituents_filter(self, constituents: List[ETFConstituentUniverse]) -> List[Symbol]:
        return [c.symbol for c in constituents]

    def _fundamental_selection(self, fundamental: List[Fundamental]) -> List[Symbol]:
        filtered = [f for f in fundamental if not np.isnan(f.valuation_ratios.pe_ratio)]
        sorted_by_pe_ratio = sorted(filtered, key=lambda f: f.valuation_ratios.pe_ratio)
        return [f.symbol for f in sorted_by_pe_ratio[:10]]

    def on_data(self, data):
        for symbol in data.keys():
            self.debug(f"{symbol} PE Ratio: {self.securities[symbol].fundamentals.valuation_ratios.pe_ratio}")

Chain ETF and Alternative Data

The following example chains an ETF universe and a QuiverCNBCsUniverse alternative universe . It first selects all constituents of SPY and then filters them down to those mentioned by CNBC commentator/trader Jim Cramer. The output of the alternative universe selection method is the output of the chained universe.

using System.Collections.Generic;
using System.Linq;
using QuantConnect.Util;
using QuantConnect.Data;
using QuantConnect.DataSource;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Securities;
    
namespace QuantConnect.Algorithm.CSharp
{
    public class ChainedUniverseAlgorithm : QCAlgorithm
    {
        private List<Symbol> _etf = new();
    
        public override void Initialize()
        {
            SetStartDate(2023, 1, 2);
            SetCash(100000);
            UniverseSettings.Asynchronous = true;
            AddUniverse(Universe.ETF("SPY", Market.USA, UniverseSettings, constituents =>
            {
                _etf = constituents.Select(c => c.Symbol).ToList();
                return Universe.Unchanged;
            }));
            AddUniverse<QuiverCNBCsUniverse>(altCoarse =>
            {
                var followers = from d in altCoarse.OfType<QuiverCNBCsUniverse>()
                    where d.Traders.ToLower().Contains("cramer")
                    select d.Symbol;
                return _etf.Intersect(followers);
            });
        }
    
        public override void OnSecuritiesChanged(SecurityChanges changes)
        {
            foreach (var added in changes.AddedSecurities)
            {
                AddData<QuiverCNBCs>(added.Symbol);
            }
        }
    
        public override void OnData(Slice data)
        {
            foreach (var dataPoint in data.Get<QuiverCNBCs>().SelectMany(x=> x.Value.OfType()))
            {
                Debug($"{dataPoint.Symbol} traders at {data.Time}: {dataPoint.Traders}");
            }
        }
    }
}
from AlgorithmImports import *

class ChainedUniverseAlgorithm(QCAlgorithm):

    _etf = []

    def initialize(self):
        self.set_start_date(2023, 1, 2)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        self.add_universe(self.universe.etf("SPY", Market.USA, self.universe_settings, self._etf_constituents_filter))
        self.add_universe(QuiverCNBCsUniverse, self._mad_money_selection)

    def _etf_constituents_filter(self, fundamental: List[Fundamental]) -> List[Symbol]:
        self._etf = [c.symbol for c in constituents]
        return Universe.UNCHANGED

    def _mad_money_selection(self, alt_coarse: List[QuiverCNBCsUniverse]) -> List[Symbol]:
        madmoney = [d.symbol for d in alt_coarse if 'Cramer' in d.traders]
        return list(set(self._etf) & set(madmoney))

    def on_securities_changed(self, changes):
        for added in changes.added_securities:
            self.add_data(QuiverCNBCs, added.symbol)

    def on_data(self, data):
        # Prices in the slice from the universe selection
        # Alternative data in slice from OnSecuritiesChanged Addition
        # for ticker,bar in data.bars.items():
        #     pass
        for dataset_symbol, data_points in data.get(QuiverCNBCs).items():
            for data_point in data_points:
                self.debug(f"{dataset_symbol} traders at {data.time}: {data_point.traders}")

Chain ETF and US Equity Options

The following example chains an ETF constituents universe and an Equity Options universe . It first selects the 10 largest-weighted constituents of QQQ and then selects their front-month call Option contracts. The output of both universes is the output of the chained universe.

using QuantConnect.Data;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Securities;
using QuantConnect.Util;
using System.Collections.Generic;
using System.Linq;

namespace QuantConnect.Algorithm.CSharp
{
    public class ETFUniverseOptions : QCAlgorithm
    {
        public override void Initialize()
        {
            SetStartDate(2023, 2, 2);
            SetCash(100000);
            UniverseSettings.Asynchronous = true;
            UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
            var etfUniverse = Universe.ETF("QQQ", Market.USA, UniverseSettings, ETFConstituentsFilter);
            AddUniverse(etfUniverse);
            AddUniverseOptions(etfUniverse, OptionFilterFunction);
        }
    
        private IEnumerable<Symbol> ETFConstituentsFilter(IEnumerable<ETFConstituentUniverse> constituents)
        {
            return constituents.OrderByDescending(c => c.Weight).Take(10).Select(c => c.Symbol);
        }
    
        private OptionFilterUniverse OptionFilterFunction(OptionFilterUniverse optionFilterUniverse)
        {
            return optionFilterUniverse.Strikes(0, 2).FrontMonth().CallsOnly();
        }
    
        public override void OnData(Slice data)
        {
            foreach (var (symbol, chain) in data.OptionChains)
            {
                foreach (var contract in chain)
                {
                    Debug($"Found {contract.Symbol} option contract for {symbol}");
                }
            }
        }
    }
}
from AlgorithmImports import *

class ChainedUniverseAlgorithm(QCAlgorithm):
    def initialize(self):
        self.set_start_date(2023, 2, 2)
        self.universe_settings.asynchronous = True
        self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW
        etf_universe = self.universe.etf("QQQ", Market.USA, self.universe_settings, self._etf_constituents_filter)
        self.add_universe(etf_universe)
        self.add_universe_options(etf_universe, self._option_filter_function)

    def _etf_constituents_filter(self, constituents: List[ETFConstituentUniverse]) -> List[Symbol]:
        sorted_by_weight = sorted(constituents, key=lambda x: x.weight, reverse=True) 
        return [c.symbol for c in sorted_by_weight[:10]]

    def _option_filter_function(self, option_filter_universe: OptionFilterUniverse) -> OptionFilterUniverse:
        return option_filter_universe.strikes(0, 2).front_month().calls_only()
        
    def on_data(self, data: Slice) -> None:
        for symbol, chain in data.option_chains.items():
            for contract in chain:
                self.debug(f"Found {contract.symbol} option contract for {symbol}")

 

Equity

Legacy Fundamental Universes

Introduction

Warning: This API for Universe Selection was deprecated on November 2023. Please refer to the new Fundamental Universe API .

There are several ways to create an Equities universe. You can select a universe based on CoarseFundamental data or the constituents of an ETF, and then you can further filter your universe down with corporate fundamentals. The following sections explain each of these techniques in detail.

Coarse Universe Selection

A coarse universe enables you pick a set of stocks based on their trading volume, price, or whether they have fundamental data. To add a coarse universe, in the Initialize initialize method, pass a filter function to the AddUniverse add_universe method. The coarse filter function receives a list of CoarseFundamental objects and must return a list of Symbol objects. The Symbol objects you return from the function are the constituents of the universe and LEAN automatically creates subscriptions for them. Don't call AddEquity add_equity in the filter function.

public class MyCoarseUniverseAlgorithm : QCAlgorithm
{
    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;
        AddUniverse(CoarseFilterFunction);
    }

    private IEnumerable<Symbol> CoarseFilterFunction(IEnumerable<CoarseFundamental> coarse)
    {
        return (from c in coarse
            orderby c.DollarVolume descending
            select c.Symbol).Take(100);
    }
}
class MyCoarseUniverseAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self.add_universe(self._coarse_filter_function)

    def _coarse_filter_function(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
        sorted_by_dollar_volume = sorted(coarse, key=lambda x: x.dollar_volume, reverse=True) 
        return [c.symbol for c in sorted_by_dollar_volume[:100]]

CoarseFundamental objects have the following attributes:

The total number of stocks in the US Equity Security Master dataset is 30,000 but your coarse filter function won't receive all of these at one time because the US Equity Security Master dataset is free of survivorship bias and some of the securities have delisted over time. The number of securities that are passed into your coarse filter function depends on the date of your algorithm. Currently, there are about 10,000 securities that LEAN passes into your coarse filter function.

Fundamentals Selection

A fundamental universe lets you select stocks based on corporate fundamental data. This data is powered by Morningstar® and includes approximately 8,100 tickers with 900 properties each. Due to the sheer volume of information, fundamental selection is performed on the output of another universe filter. Think of this process as a 2-stage filter. An initial filter function selects a set of stocks and then a fine fundamental filter function selects a subset of those stocks.

Fundamental selection process
QuantConnect Coarse and Fine Universe Selection

To add a fundamental universe, in the Initialize initialize method, pass two filter functions to the AddUniverse add_universe method. The first filter function can be a coarse universe filter , dollar volume filter , or an ETF constituents filter . The second filter function receives a list of FineFundamental objects and must return a list of Symbol objects. The list of FineFundamental objects contains a subset of the Symbol objects that the first filter function returned. The Symbol objects you return from the second function are the constituents of the fundamental universe and LEAN automatically creates subscriptions for them. Don't call AddEquity add_equity in the filter function.

Tip:

Only 8,100 assets have fundamental data. If your first filter function receives CoarseFundamental data, you should only select assets that have a true value for their HasFundamentalData has_fundamental_data property.

public class MyUniverseAlgorithm : QCAlgorithm {
    public override void Initialize() 
    {
        UniverseSettings.Asynchronous = true;
        AddUniverse(CoarseFilterFunction, FineFundamentalFilterFunction);
    }
    // filter based on CoarseFundamental
    IEnumerable<Symbol> CoarseFilterFunction(IEnumerable<CoarseFundamental> coarse) 
    {
         // In addition to further coarse universe selection, ensure the security has fundamental data
         return (from c in coarse
             where c.HasFundamentalData
             select c.Symbol);
    }
    // filter based on FineFundamental
    public IEnumerable<Symbol> FineFundamentalFilterFunction(IEnumerable<FineFundamental> fine)
    {
        // Return a list of Symbols
    }
}
class MyUniverseAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self.add_universe(self._coarse_filter_function, self._fine_fundamental_function)

    def _coarse_filter_function(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
        # In addition to further coarse universe selection, ensure the security has fundamental data
        return [c.symbol for c in coarse if c.has_fundamental_data]

    def _fine_fundamental_function(self, fine: List[FineFundamental]) -> List[Symbol]:
        # Return a list of Symbols

FineFundamental objects have the following attributes:

Example

The simplest example of accessing the fundamental object would be harnessing the iconic PE ratio for a stock. This is a ratio of the price it commands to the earnings of a stock. The lower the PE ratio for a stock, the more affordable it appears.

// Take the top 50 by dollar volume using coarse
// Then the top 10 by PERatio using fine
UniverseSettings.Asynchronous = true;
AddUniverse(
    coarse => {
        return (from c in coarse
            where c.Price > 10 && c.HasFundamentalData
            orderby c.DollarVolume descending
            select c.Symbol).Take(50);
    },
    fine => {
        return (from f in fine
            orderby f.ValuationRatios.PERatio ascending
            select f.Symbol).Take(10);
    });
# In Initialize:
self.universe_settings.asynchronous = True
self.add_universe(self._coarse_selection_function, self._fine_selection_function)

def _coarse_selection_function(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
    sorted_by_dollar_volume = sorted(coarse, key=lambda x: x.dollar_volume, reverse=True)
    filtered = [x.symbol for x in sorted_by_dollar_volume if x.has_fundamental_data]
    return filtered[:50]

def _fine_selection_function(self, fine: List[FineFundamental]) -> List[Symbol]:
    sorted_by_pe_ratio = sorted(fine, key=lambda x: x.valuation_ratios.pe_ratio, reverse=False)
    return [x.symbol for x in sorted_by_pe_ratio[:10]]

Asset Categories

In addition to valuation ratios, the US Fundamental Data from Morningstar has many other data point attributes, including over 200 different categorization fields for each US stock. Morningstar groups these fields into sectors, industry groups, and industries.

Sectors are large super categories of data. To get the sector of a stock, use the MorningstarSectorCode property.

var tech = fine.Where(x => x.AssetClassification.MorningstarSectorCode == MorningstarSectorCode.Technology);
tech = [x for x in fine if x.asset_classification.morningstar_sector_code == MorningstarSectorCode.TECHNOLOGY]

Industry groups are clusters of related industries that tie together. To get the industry group of a stock, use the MorningstarIndustryGroupCode property.

var ag = fine.Where(x => x.AssetClassification.MorningstarIndustryGroupCode == MorningstarIndustryGroupCode.Agriculture);
ag = [x for x in fine if x.asset_classification.morningstar_industry_group_code == MorningstarIndustryGroupCode.AGRICULTURE]

Industries are the finest level of classification available. They are the individual industries according to the Morningstar classification system. To get the industry of a stock, use the MorningstarIndustryCode .

var coal = fine.Where(x => x.AssetClassification.MorningstarIndustryCode == MorningstarSectorCode.Coal);
coal = [x for x in fine if x.asset_classification.morningstar_industry_code == MorningstarSectorCode.COAL]

Practical Limitations

Like coarse universes, fine universes allow you to select an unlimited universe of assets to analyze. Each asset in the universe consumes approximately 5MB of RAM, so you may quickly run out of memory if your universe filter selects many assets. If you backtest your algorithms in the Algorithm Lab, familiarize yourself with the RAM capacity of your backtesting and live trading nodes . To keep your algorithm fast and efficient, only subscribe to the assets you need.

Live Trading Considerations

The live data for fundamental universe selection arrives at 6/7 AM Eastern Time (ET), so fundamental universe selection runs for live algorithms between 7 and 8 AM ET. This timing allows you to place trades before the market opens. Don't schedule anything for midnight because the universe selection data isn't ready yet.

Examples

The following examples are typical filter functions you may want.

Example 1: Take 500 stocks that are worth more than $10 and have more than $10M daily trading volume

The most common use case is to select a lot of liquid stocks. With a coarse universe filter, this is simple and fast. The following example selects the top most liquid 500 stocks over $10 per share.

IEnumerable<Symbol> CoarseFilterFunction(IEnumerable<CoarseFundamental> coarse) 
{
    // Linq makes this a piece of cake;
    return (from c in coarse
        where c.DollarVolume > 10000000 &&
            c.Price > 10
        orderby c.DollarVolume descending
        select c.Symbol).Take(500);
}
def _coarse_filter_function(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
    sorted_by_dollar_volume = sorted(coarse, key=lambda x: x.dollar_volume, reverse=True)
    filtered = [ x.symbol for x in sorted_by_dollar_volume 
                if x.price > 10 and x.dollar_volume > 10000000 ]
    return filtered[:500]

Example 2: Take 10 stocks above their 200-Day EMA and have more than $1B daily trading volume

Another common request is to filter the universe by a technical indicator, such as only picking stocks above their 200-day EMA. The CoarseFundamental object has adjusted price and volume information, so you can do any price-related analysis.

ConcurrentDictionary<Symbol, SelectionData>
    _stateData = new ConcurrentDictionary<Symbol, SelectionData>();

// Coarse filter function
IEnumerable<Symbol> CoarseFilterFunction(IEnumerable<CoarseFundamental> coarse) {
    // Linq makes this a piece of cake;
    return (from c in coarse
        let avg = _stateData.GetOrAdd(c.Symbol, sym => new SelectionData(200))
        where avg.Update(c.EndTime, c.AdjustedPrice)
        where c.DollarVolume > 1000000000 &&
                c.Price > avg.Ema
        orderby c.DollarVolume descending
        select c.Symbol).Take(10);
}
# setup state storage in initialize method
self._state_data = { }

def _coarse_filter_function(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
    # We are going to use a dictionary to refer the object that will keep the moving averages
    for c in coarse:
        if c.symbol not in self._state_data:
            self._state_data[c.symbol] = SelectionData(c.symbol, 200)

        # Updates the SymbolData object with current EOD price
        avg = self._state_data[c.symbol]
        avg.update(c.end_time, c.adjusted_price, c.dollar_volume)

    # Filter the values of the dict to those above EMA and more than $1B vol.
    values = [x for x in self._state_data.values() if x.is_above_ema and x.volume > 1000000000]
    
    # sort by the largest in volume.
    values.sort(key=lambda x: x.volume, reverse=True)

    # we need to return only the symbol objects
    return [ x.symbol for x in values[:10] ]

In this example, the SelectionData class group variables for the universe selection and updates the indicator of each asset. We highly recommend you follow this pattern to keep your algorithm tidy and bug free. The following snippet shows an example implementation of the SelectionData class, but you can make this whatever you need to store your custom universe filters.

class SelectionData(object):
    def __init__(self, symbol, period):
        self._symbol = symbol
        self._ema = ExponentialMovingAverage(period)
        self.is_above_ema = False
        self.volume = 0

    def update(self, time, price, volume):
        self.volume = volume
        if self._ema.update(time, price):
            self.is_above_ema = price > self._ema.current_value
// example selection data class
private class SelectionData
{
    // variables you need for selection
    public readonly ExponentialMovingAverage Ema;

    // initialize your variables and indicators.
    public SelectionData(int period)
    {
        Ema = new ExponentialMovingAverage(period);
    }

    // update your variables and indicators with the latest data.
    // you may also want to use the History API here.
    public bool Update(DateTime time, decimal value)
    {
        return Ema.Update(time, value);
    }
}

Note that the preceding SelectionData class uses a manual EMA indicator instead of the automatic version . For more information about universes that select assets based on indicators, see Indicator Universes . You need to use a SelectionData class instead of assigning the EMA to the CoarseFundamental object because you can't create custom properties attributes on CoarseFundamental objects like you can with Security objects.

Example 3: Take 10 stocks that are the furthest above their 10-day SMA of volume

The process to get the 10-day SMA stock volume is the same process as in Example 2. First, you should define a SelectionData class that performs the averaging. For this example, the following class will serve this purpose:

class SelectionData(object):
    def __init__(self, symbol, period):
        self._symbol = symbol
        self.volume = 0
        self.volume_ratio = 0
        self.sma = SimpleMovingAverage(period)

    def update(self, time, price, volume):
        self.volume = volume
        if self.sma.update(time, volume):
            # get ratio of this volume bar vs previous 10 before it.
            self.volume_ratio = volume / self.sma.current.value
private class SelectionData
{
    public readonly Symbol Symbol;
    public readonly SimpleMovingAverage VolumeSma;
    public decimal VolumeRatio;
    public SelectionData(Symbol symbol, int period)
    {
        Symbol = symbol;
        VolumeSma = new SimpleMovingAverage(period);
    }
    public bool Update(DateTime time, decimal value)
    {
        var ready = VolumeSma.Update(time, value);
        VolumeRatio = value / VolumeSma;
        return ready;
    }
}

This class tracks the ratio of today's volume relative to historical volumes. You can use this ratio to select assets that are above their 10-day simple moving average and sort the results by the ones that have had the biggest jump since yesterday.

def _coarse_filter_function(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
    for c in coarse:
        if c.symbol not in self._state_data:
            self._state_data[c.symbol] = SelectionData(c.symbol, 10)
        avg = self._state_data[c.symbol]
        avg.update(c.end_time, c.adjusted_price, c.dollar_volume)

    # filter the values of selectionData(sd) above SMA
    values = [sd for sd in self._state_data.values() if sd.volume > sd.sma.current.value and sd.volume_ratio > 0]
        
    # sort sd by the largest % jump in volume.
    values.sort(key=lambda sd: sd.volume_ratio, reverse=True)

    # return the top 10 symbol objects
    return [ sd.symbol for sd in values[:10] ]
 
IEnumerable<Symbol> CoarseFilterFunction(IEnumerable<CoarseFundamental> coarse) 
{ return (from c in coarse let avg = _stateData.GetOrAdd(c.Symbol, sym => new SelectionData(10)) where avg.Update(c.EndTime, c.Volume) where c.Volume > avg.VolumeSma orderby avg.VolumeRatio descending select c.Symbol).Take(10); }

Example 4: Take the top 10 "fastest moving" stocks with a 50-Day EMA > 200 Day EMA

You can construct complex universe filters with the SelectionData helper class pattern. To view a full example of this algorithm, see the EmaCrossUniverseSelectionAlgorithm EmaCrossUniverseSelectionAlgorithm in the LEAN GitHub repository or take the related Boot Camp lesson .

Demonstration Algorithms
CoarseUniverseTop3DollarVolumeAlgorithm.py Python EmaCrossUniverseSelectionAlgorithm.py Python DropboxUniverseSelectionAlgorithm.py Python WeeklyUniverseSelectionRegressionAlgorithm.py Python CoarseFineFundamentalComboAlgorithm.py Python CoarseUniverseTop3DollarVolumeAlgorithm.cs C# EmaCrossUniverseSelectionAlgorithm.cs C# DropboxUniverseSelectionAlgorithm.cs C# WeeklyUniverseSelectionRegressionAlgorithm.cs C# CoarseFineFundamentalComboAlgorithm.cs C#

 

Equity

Alternative Data Universes

Introduction

An alternative data universe lets you select a basket of Equities based on an alternative dataset that's linked to them. If you use an alternative data universe, you limit your universe to only the securities in the dataset, which avoids unnecessary subscriptions.

Supported Datasets

The following alternative datasets support universe selection:

 

Universes

Equity Options

Introduction

An Equity Options universe lets you select a basket of contracts for a single Option. LEAN models Option subscriptions as a universe of Option contracts.

Create Universes

To add a universe of Equity Option contracts, in the Initialize initialize method, call the AddOption add_option method. This method returns an Option object, which contains the canonical Symbol symbol . You can't trade with the canonical Option Symbol symbol , but save a reference to it so you can easily access the Option contracts in the OptionChain that LEAN passes to the OnData on_data method.

UniverseSettings.Asynchronous = true;
var option = AddOption("SPY");
_symbol = option.Symbol;
self.universe_settings.asynchronous = True
option = self.add_option("SPY")
self._symbol = option.symbol

The following table describes the AddOption add_option method arguments:

Argument Data Type Description Default Value
ticker string str The underlying Equity ticker. To view the supported underlying Equity tickers, see Supported Assets .
resolution Resolution? Resolution/NoneType The resolution of the market data. To view the supported resolutions, see Resolutions . The Equity resolution must be less than or equal to the Equity Option resolution. For example, if you set the Equity resolution to minute, then you must set the Equity Option resolution to minute, hour, or daily. None null
market string str The underlying Equity market. None null
fillForward fill_forward bool If true, the current slice contains the last available data even if there is no data at the current time. True true
leverage decimal float The leverage for this Equity. Security.NullLeverage Security.NULL_LEVERAGE
extendedMarketHours extended_market_hours bool A flag that signals if LEAN should send data during pre- and post-market trading hours. False false

If you add an Equity Option universe but don't have a subscription to the underlying Equity, LEAN automatically subscribes to the underlying Equity with the following settings:

Setting Value
Fill forward Same as the Option universe
Leverage 0
Extended Market Hours Same as the Option universe
Data Normalization DataNormalizationMode.Raw DataNormalizationMode.RAW

If you already have a subscription to the underlying Equity but it's not Raw RAW data normalization, LEAN automatically changes it to Raw RAW .

To override the default pricing model of the Option, set a pricing model .

option.price_model = OptionPriceModels.crank_nicolson_fd();
option.price_model = OptionPriceModels.crank_nicolson_fd()

To override the initial guess of implied volatility , set and warm up the underlying volatility model .

Filter Contracts

By default, LEAN subscribes to the Option contracts that have the following characteristics:

To adjust the universe of contracts, set a filter. The filter usually runs at the first bar of every day. When the filter selects a contract that isn't currently in your universe, LEAN adds the new contract data to the next Slice that it passes to the OnData on_data method.

To set a contract filter, in the Initialize initialize method, call the SetFilter set_filter method of the Option object. The following table describes the available filter techniques:

Method
Description
SetFilter(int minStrike, int maxStrike) set_filter(minStrike: int, maxStrike: int) Selects the contracts that have a strike price within a minimum and maximum strike level relative to the underlying price. For example, say the underlying price is $302 and there are strikes at every $5. If you set minStrike m_strike to -1 and maxStrike max_strike to 1, LEAN selects the contracts that have a strike of $300 or $305. This filter runs asynchronously by default.
SetFilter(TimeSpan minExpiry, TimeSpan maxExpiry) set_filter(minExpiry: timedelta, maxExpiry: timedelta) Selects the contracts that expire within the range you set. This filter runs asynchronously by default.
SetFilter(int minStrike, int maxStrike, TimeSpan minExpiry, TimeSpan maxExpiry) set_filter(minStrike: int, maxStrike: int, minExpiry: timedelta, maxExpiry: timedelta) Selects the contracts that expire and have a strike within the range you set. This filter runs asynchronously by default.
SetFilter(Func<OptionFilterUniverse, OptionFilterUniverse> universeFunc) set_filter(universeFunc: Callable[[OptionFilterUniverse], OptionFilterUniverse]) Selects the contracts that a function selects.
// Select contracts that have a strike price within 1 strike level above and below the underlying price
option.SetFilter(minStrike: -1, maxStrike: 1);

// Select contracts that expire within 30 days
option.SetFilter(minExpiry: TimeSpan.FromDays(0), maxExpiry: TimeSpan.FromDays(30));

// Select contracts that have a strike price within 1 strike level and expire within 30 days
option.SetFilter(minStrike: -1, maxStrike: 1, minExpiry: TimeSpan.FromDays(0), maxExpiry: TimeSpan.FromDays(30));

// Select call contracts
option.SetFilter(optionFilterUniverse => optionFilterUniverse.CallsOnly());
# Select contracts that have a strike price within 1 strike level above and below the underlying price
option.set_filter(min_strike=-1, max_strike=1)

# Select contracts that expire within 30 days
option.set_filter(min_expiry=timedelta(days=0), maxExpiry=timedelta(days=30))

# Select contracts that have a strike price within 1 strike level and expire within 30 days
option.set_filter(min_strike=-1, max_strike=1, min_expiry=timedelta(days=0), maxExpiry=timedelta(days=30))

# Select call contracts
option.set_filter(lambda option_filter_universe: option_filter_universe.calls_only())

The following table describes the filter methods of the OptionFilterUniverse class:

Method Description
Strikes(int minStrike, int maxStrike) strikes(min_strike: int, max_strike: int) Selects contracts that are within minStrike m_strike strikes below the underlying price and maxStrike max_strike strikes above the underlying price
CallsOnly() calls_only() Selects call contracts
PutsOnly() puts_only() Selects put contracts
StandardsOnly() standards_only() Selects standard contracts
IncludeWeeklys() include_weeklys() Selects non-standard weeklys contracts
WeeklysOnly() weeklys_only() Selects weekly contracts
FrontMonth() front_month() Selects the front month contract
BackMonths() back_months() Selects the non-front month contracts
BackMonth() back_month() Selects the back month contracts
Expiration(TimeSpan minExpiry, TimeSpan maxExpiry) expiration(min_expiry: timedelta, max_expiry: timedelta) Selects contracts that expire within a range of dates relative to the current day
Expiration(int minExpiryDays, int maxExpiryDays) expiration(min_expiryDays: int, max_expiryDays: int) Selects contracts that expire within a range of dates relative to the current day
Contracts(IEnumerable<Symbol> contracts) contracts(contracts: List[Symbol]) Selects a list of contracts
Contracts(Func<IEnumerable<Symbol>, IEnumerable< Symbol>> contractSelector) contracts(contract_selector: Callable[[List[Symbol]], List[Symbol]]) Selects contracts that a selector function selects

The preceding methods return an OptionFilterUniverse , so you can chain the methods together.

// Example 1: Select the front month call contracts
option.SetFilter(optionFilterUniverse => optionFilterUniverse.CallsOnly().FrontMonth());

// Example 2: Select the contracts (including weeklys) that expire in the next 90 days
option.SetFilter(optionFilterUniverse => optionFilterUniverse.IncludeWeeklys().Strikes(-20, 20).Expiration(0, 90));
# Example 1: Select the front month call contracts
option.set_filter(lambda option_filter_universe: option_filter_universe.calls_only().front_month())

# Example 2: Select the contracts (including weeklys) that expire in the next 90 days
option.set_filter(lambda option_filter_universe: option_filter_universe.include_weeklys().strikes(-20, 20).expiration(0, 90))

To perform thorough filtering on the OptionFilterUniverse , define an isolated filter method.

// In Initialize
option.SetFilter(Selector);
    
private OptionFilterUniverse Selector(OptionFilterUniverse optionFilterUniverse)
{
    var symbols = optionFilterUniverse.PutsOnly();
    var strike = symbols.Select(symbol => symbol.ID.StrikePrice).Min();
    symbols = symbols.Where(symbol => symbol.ID.StrikePrice == strike);
    return optionFilterUniverse.Contracts(symbols);
}
# In initialize
option.set_filter(self._contract_selector)
    
def _contract_selector(self, option_filter_universe: OptionFilterUniverse) -> OptionFilterUniverse:
    symbols = option_filter_universe.puts_only()
    strike = min([symbol.id.strike_price for symbol in symbols])
    symbols = [symbol for symbol in symbols if symbol.id.strike_price == strike]
    return option_filter_universe.contracts(symbols)

Some of the preceding filter methods only set an internal enumeration in the OptionFilterUniverse that it uses later on in the filter process. This subset of filter methods don't immediately reduce the number of contract Symbol objects in the OptionFilterUniverse .

Navigate Option Chains

OptionChain objects represent an entire chain of Option contracts for a single underlying security. They have the following properties:

To get the OptionChain , index the OptionChains option_chains property of the Slice with the canonical Symbol symbol . After you get the OptionChain , you can sort and filter the Option contracts in the chain.

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_symbol, out var chain))
    {
        // Example: Find 5 put contracts that are closest to at-the-money (ATM) and have the farthest expiration
        var contracts = chain
            .Where(x => x.Right == OptionRight.Put)
            .OrderByDescending(x => x.Expiry)
            .ThenBy(x => Math.Abs(chain.Underlying.Price - x.Strike))
            .Take(5);

        // Select the contract with the delta closest to -0.5
        var contract = contracts.OrderBy(x => Math.Abs(-0.5m - x.Greeks.Delta)).FirstOrDefault();
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._symbol)
    if chain:
        # Example: Find 5 put contracts that are closest to at-the-money (ATM) and have the farthest expiration
        contracts = [x for x in chain if x.right == OptionRight.PUT]
        contracts = sorted(sorted(contracts, \
            key = lambda x: abs(chain.underlying.price - x.strike)), \
            key = lambda x: x.expiry, reverse=True)[:5]
    
        # Select the contract with the delta closest to -0.5
        contract = sorted(contracts, key=lambda x: abs(-0.5 - x.greeks.delta))[0]

You can also loop through the OptionChains option_chains property to get each OptionChain .

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.OptionChains)
    {
        var canoncialSymbol = kvp.Key;
        var chain = kvp.Value;
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    for canonical_symbol, chain in slice.option_chains.items():
        contracts = chain.contracts

Selection Frequency

By default, Equity Option universes run at the first time step of each day to select their contracts.

 

Universes

Equity CFD

Introduction

An Equity CFD universe lets you select a set of Equity CFD assets. To select the underlying Equities, you can use a fundamental universe to select assets based on corporate fundamental data, an ETF constituents universe to select the CFD versions of stocks in an exchange-traded fund, or an alternative data universe to select assets based on alternative data. This feature is powerful for European clients seeking to trade US ETF products.

Only the Interactive Brokers CFD integration supports trading Stock-CFD products. QuantConnect doesn't have historical data for Interactive Brokers CFD products; however, you can use the LiveMode live_mode flag to swap to the CFD equivalents for live trading. In live trading, you must include Interactive Brokers as a data provider to trade Equity-CFD products.

Create Universes Using Fundamentals

To add a fundamental universe, in the Initialize initialize method, pass a filter function to the AddUniverse add_universe method. The filter function receives a list of Fundamental objects and must return a list of Symbol objects. The Symbol objects you return from the function are the constituents of the fundamental universe and LEAN automatically creates subscriptions for them. In live mode, call the Symbol.Create Symbol.create method to swap for a CFD version of the same Symbol . Don't call AddCfd add_cfd in the filter function.

public class MyUniverseAlgorithm : QCAlgorithm {
    private Universe _universe;
    public override void Initialize() 
    {
        UniverseSettings.Asynchronous = true;
        _universe = AddUniverse(FundamentalFilterFunction);
    }
        
    private IEnumerable<Symbol> FundamentalFilterFunction(IEnumerable<Fundamental> fundamental) 
    {
        var symbols = (from f in fundamental
                where f.HasFundamentalData
                select f.Symbol);

        if (LiveMode)
        {
            return symbols.Select(x => QuantConnect.Symbol.Create(x.Value, SecurityType.Cfd, Market.InteractiveBrokers));
        } 

        return symbols;
    }
}
class MyUniverseAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self._universe = self.add_universe(self._fundamental_function)
    
    def _fundamental_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
        symbols = [c.symbol for c in fundamental if c.has_fundamental_data]
        if self.live_mode:
            return [Symbol.create(x.value, SecurityType.CFD, Market.INTERACTIVE_BROKERS) for x in symbols]
        return symbols

Example

The simplest example of accessing the fundamental object would be harnessing the iconic PE ratio for a stock. This is a ratio of the price it commands to the earnings of a stock. The lower the PE ratio for a stock, the more affordable it appears.

// Take the top 50 by dollar volume using fundamental
// Then the top 10 by PERatio using fine
UniverseSettings.Asynchronous = true;
_universe = AddUniverse(
    fundamental =>
    {
        var symbols = (from f in fundamental
            where f.Price > 10 && f.HasFundamentalData && !Double.IsNaN(f.ValuationRatios.PERatio)
            orderby f.DollarVolume descending
            select f).Take(100)
            .OrderBy(f => f.ValuationRatios.PERatio).Take(10)
            .Select(f => f.Symbol);
                
        if (LiveMode)
        {
            return symbols.Select(x => QuantConnect.Symbol.Create(x.Value, SecurityType.Cfd, Market.InteractiveBrokers));
        }
        
        return symbols;
    });
# In Initialize:
self.universe_settings.asynchronous = True
self._universe = self.add_universe(self._fundamental_selection_function)
    
def _fundamental_selection_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    filtered = [f for f in fundamental if f.price > 10 and f.has_fundamental_data and not np.isnan(f.valuation_ratios.pe_ratio)]
    sorted_by_dollar_volume = sorted(filtered, key=lambda f: f.dollar_volume, reverse=True)[:100]
    sorted_by_pe_ratio = sorted(sorted_by_dollar_volume, key=lambda f: f.valuation_ratios.pe_ratio, reverse=False)[:10]
    symbols = [f.symbol for f in sorted_by_pe_ratio]
    if self.live_mode:
        return [Symbol.create(x.value, SecurityType.CFD, Market.INTERACTIVE_BROKERS) for x in symbols]
    return symbols

Practical Limitations

Fundamental universes allow you to select an unlimited universe of assets to analyze. Each asset in the universe consumes approximately 5MB of RAM, so you may quickly run out of memory if your universe filter selects many assets. If you backtest your algorithms in the Algorithm Lab, familiarize yourself with the RAM capacity of your backtesting and live trading nodes . To keep your algorithm fast and efficient, only subscribe to the assets you need.

Create Universes using ETF Constituents

To add an ETF Constituents universe, in the Initialize initialize method, call the Universe.ETF universe.etf method with a filter function, and pass it to the AddUniverse add_universe method. The filter function receives a list of ETFConstituentUniverse objects and must return a list of Symbol objects. The Symbol objects you return from the function are the constituents of the fundamental universe and LEAN automatically creates subscriptions for them. In live mode, call the Symbol.Create Symbol.create method to swap for a CFD version of the same Symbol . Don't call AddCfd add_cfd in the filter function.

public class MyUniverseAlgorithm : QCAlgorithm {
    private Universe _universe;
    public override void Initialize() 
    {
        UniverseSettings.Asynchronous = true;
        _universe = Universe.ETF("SPY", UniverseSettings, ETFConstituentsFilter);
        AddUniverse(_universe);
    }
        
    private IEnumerable<Symbol> ETFConstituentsFilter(IEnumerable<ETFConstituentUniverse> constituents)
    {
        // Get the 10 securities with the largest weight in the index
        var symbols = constituents.OrderByDescending(c => c.Weight).Take(10).Select(c => c.Symbol);
        if (LiveMode)
        {
            return symbols.Select(x => QuantConnect.Symbol.Create(x.Value, SecurityType.Cfd, Market.InteractiveBrokers));
        }
        
        return symbols;
    }
}
class MyUniverseAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self._universe = self.universe.etf("SPY", self.universe_settings, self._etf_constituents_filter)
        self.add_universe(self._universe)
    
    def _etf_constituents_filter(self, constituents: List[ETFConstituentUniverse]) -> List[Symbol]:
        # Get the 10 securities with the largest weight in the index
        selected = sorted([c for c in constituents if c.weight], key=lambda c: c.weight, reverse=True)[:10]
        symbols = [c.symbol for c in selected]
        if self.live_mode:
            return [Symbol.create(x.value, SecurityType.CFD, Market.INTERACTIVE_BROKERS) for x in symbols]
        return symbols

Selection Frequency

Equity universes run on a daily basis by default. To adjust the selection schedule, see Schedule .

Live Trading Considerations

The live data for fundamental universe selection arrives at 6/7 AM Eastern Time (ET), so fundamental universe selection runs for live algorithms between 7 and 8 AM ET. This timing allows you to place trades before the market opens. Don't schedule anything for midnight because the universe selection data isn't ready yet.

Examples

You can adapt the examples of the Universes > Equity section of this documentation.

 

Universes

Futures

Introduction

A Futures universe lets you select a basket of contracts for a single Future. LEAN models Future subscriptions as a universe of Future contracts. A Future universe is similar to an Option universe , except Future contracts don't have a strike price, so the universe filter primarily focuses on the contract expiration date.

Create Universes

To add a universe of Future contracts, in the Initialize initialize method, call the AddFuture add_future method. This method returns an Future object, which contains the continuous contract Symbol symbol . The continuous contract Symbol is the key to access the contracts in the FutureChain that LEAN passes to the OnData on_data method. When you create the Future subscription, save a reference to the continuous contract Symbol symbol so you can use it later in your algorithm.

UniverseSettings.Asynchronous = true;
_future = AddFuture(Futures.Currencies.BTC);
_symbol = _future.Symbol;
self.universe_settings.asynchronous = True
self._future = self.add_future(Futures.Currencies.BTC)
self._symbol = self._future.symbol

The following table describes the AddFuture add_future method arguments:

Argument: ticker

The Future ticker. To view the supported assets in the US Futures dataset, see Supported Assets .

Data Type: string str | Default Value: None

Argument: resolution

The resolution of the market data. To view the supported resolutions, see Resolutions . If you don't provide a value, it uses Resolution.Minute Resolution.MINUTE by default.

Data Type: Resolution? Resolution/NoneType | Default Value: None null

Argument: market

The Futures market. To view the supported markets in the US Futures dataset, see Supported Markets . If you don't provide a value, it uses the default Future market of your brokerage model .

Data Type: string str | Default Value: None null

Argument: fillForward fill_forward

If true, the current slice contains the last available data even if there is no data at the current time.

Data Type: bool | Default Value: True true

Argument: leverage

The leverage for this Future.

Data Type: decimal float | Default Value: Security.NullLeverage Security.NULL_LEVERAGE

Argument: extendedMarketHours extended_market_hours

If true, use data from the pre and post market sessions

Data Type: bool | Default Value: False false

Argument: dataMappingMode data_mapping_mode

The contract mapping mode to use for the continuous future contract

Data Type: DataMappingMode? DataMappingMode/NoneType | Default Value: None null

Argument: dataNormalizationMode data_normalization_mode

The price scaling mode to use for the continuous future contract

Data Type: DataNormalizationMode? DataNormalizationMode/NoneType | Default Value: None null

Argument: contractDepthOffset contract_depth_offset

The continuous future contract desired offset from the current front month. For example, 0 is the front month, 1 is the back month contract.

Data Type: int | Default Value: 0

Continous Contracts

By default, LEAN only subscribes to the continuous Future contract. A continuous Future contract represents a series of separate contracts stitched together to form a continuous price. If you need a lot of historical data to warm up an indicator, apply the indicator to the continuous contract price series. The Future object has a Symbol symbol property and a Mapped mapped property. The price of the Symbol symbol property is the adjusted price of the continuous contract. The price of the Mapped mapped property is the raw price of the currently selected contract in the continuous contract series.

// Get the adjusted price of the continuous contract
var adjustedPrice = Securities[_future.Symbol].Price; 

// Get the raw price of the currently selected contract in the continuous contract series
var rawPrice = Securities[_future.Mapped].Price;
# Get the adjusted price of the continuous contract
adjusted_price = self.securities[self._future.symbol].price 

# Get the raw price of the currently selected contract in the continuous contract series
raw_price = self.securities[self._future.mapped].price

To configure how LEAN identifies the current Future contract in the continuous series and how it forms the adjusted price between each contract, provide dataMappingMode data_mapping_mode , dataNormalizationMode data_normalization_mode , and contractDepthOffset contract_depth_offset arguments to the AddFuture add_future method. The Future object that the AddFuture add_future method returns contains a Mapped mapped property that references the current contract in the continuous contract series. As the contracts roll over, the Mapped mapped property references the next contract in the series and you receive a SymbolChangedEvent object in the OnData on_data method. The SymbolChangedEvent references the old contract Symbol and the new contract Symbol . You can use SymbolChangedEvents to roll over contracts.

public override void OnData(Slice slice)
{
    foreach (var (symbol, changedEvent) in slice.SymbolChangedEvents)
    {
        var oldSymbol = changedEvent.OldSymbol;
        var newSymbol = changedEvent.NewSymbol;
        var tag = $"Rollover - Symbol changed at {Time}: {oldSymbol} -> {newSymbol}";
        var quantity = Portfolio[oldSymbol].Quantity;
        // Rolling over: to liquidate any position of the old mapped contract and switch to the newly mapped contract
        Liquidate(oldSymbol, tag: tag);
        if (quantity != 0) MarketOrder(newSymbol, quantity, tag: tag);
        Log(tag);
    }
}
def on_data(self, slice: Slice) -> None:
    for symbol, changed_event in  slice.symbol_changed_events.items():
        old_symbol = changed_event.old_symbol
        new_symbol = changed_event.new_symbol
        tag = f"Rollover - Symbol changed at {self.time}: {old_symbol} -> {new_symbol}"
        quantity = self.portfolio[old_symbol].quantity

        # Rolling over: to liquidate any position of the old mapped contract and switch to the newly mapped contract
        self.liquidate(old_symbol, tag=tag)
        if quantity != 0: self.market_order(new_symbol, quantity, tag=tag)
        self.log(tag)

In backtesting, the SymbolChangedEvent occurs at midnight Eastern Time (ET). In live trading, the live data for continuous contract mapping arrives at 6/7 AM ET, so that's when it occurs.

Data Normalization Modes

The dataNormalizationMode data_normalization_mode argument defines how the price series of two contracts are stitched together when the contract rollovers occur. The following DataNormalizatoinMode enumeration members are available for continuous contracts:

We use the entire Futures history to adjust historical prices. This process ensures you get the same adjusted prices, regardless of the backtest end date.

Data Mapping Modes

The dataMappingMode data_mapping_mode argument defines when contract rollovers occur. The DataMappingMode enumeration has the following members:

Contract Depth Offsets

The contractDepthOffset contract_depth_offset argument defines which contract to use. 0 is the front month contract, 1 is the following back month contract, and 3 is the second back month contract.

Filter Contracts

By default, LEAN doesn't add any contracts to the FuturesChain it passes to the OnData on_data method. To add a universe of Future contracts, in the Initialize initialize method, call the SetFilter set_filter method of the Future object. The following table describes the available filter techniques:

Method
Description
SetFilter(int minExpiryDays, int maxExpiryDays) set_filter(minExpiryDays: int, maxExpiryDays: int) Selects the contracts that expire within the range you set. This filter runs asynchronously by default.
SetFilter(Func<FutureFilterUniverse, FutureFilterUniverse> universeFunc) set_filter(universeFunc: Callable[[FutureFilterUniverse], FutureFilterUniverse]) Selects the contracts that a function selects.
# Select the contracts which expire within 182 days
self._future.set_filter(0, 182)

# Select the front month contract
self._future.set_filter(lambda future_filter_universe: future_filter_universe.front_month())
// Select the contracts which expire within 182 days
_future.SetFilter(0, 182);

// Select the front month contract
_future.SetFilter(futureFilterUniverse => futureFilterUniverse.FrontMonth());

The following table describes the filter methods of the FutureFilterUniverse class:

Method Description
StandardsOnly() standards_only() Selects standard contracts
IncludeWeeklys() include_weeklys() Selects non-standard weekly contracts
WeeklysOnly() weeklys_only() Selects weekly contracts
FrontMonth() front_month() Selects the front month contract
BackMonths() back_months() Selects the non-front month contracts
BackMonth() back_month() Selects the back month contracts
Expiration(TimeSpan minExpiry, TimeSpan maxExpiry) expiration(min_expiry: timedelta, max_expiry: timedelta) Selects contracts that expire within a range of dates relative to the current day
Expiration(int minExpiryDays, int maxExpiryDays) expiration(min_expiry_days: int, max_expiry_days: int) Selects contracts that expire within a range of dates relative to the current day
Contracts(IEnumerable<Symbol> contracts) contracts(contracts: List[Symbol]) Selects a list of contracts
Contracts(Func<IEnumerable<Symbol>, IEnumerable< Symbol>> contractSelector) contracts(contractSelector: Callable[[List[Symbol]], List[Symbol]]) Selects contracts that a selector function selects

The preceding methods return an FutureFilterUniverse , so you can chain the methods together.

// Select the front month standard contracts
_future.SetFilter(futureFilterUniverse => futureFilterUniverse.StandardsOnly().FrontMonth());
# Select the front month standard contracts
self._future.set_filter(lambda future_filter_universe: future_filter_universe.standards_only().front_month())

You can also define an isolated filter method.

// In Initialize
_future.SetFilter(Selector);
    
private FutureFilterUniverse Selector(FutureFilterUniverse futureFilterUniverse)
{
    return futureFilterUniverse.StandardsOnly().FrontMonth();
}
# In Initialize
self._future.set_filter(self._contract_selector)
    
def _contract_selector(self, 
    future_filter_universe: Callable[[FutureFilterUniverse], FutureFilterUniverse]) -> FutureFilterUniverse:
    return future_filter_universe.standards_only().front_month()

Some of the preceding filter methods only set an internal enumeration in the FutureFilterUniverse that it uses later on in the filter process. This subset of filter methods don't immediately reduce the number of contract Symbol objects in the FutureFilterUniverse .

By default, LEAN adds contracts to the FutureChain that pass the filter criteria at every time step in your algorithm. If a contract has been in the universe for a duration that matches the minimum time in universe setting and it no longer passes the filter criteria, LEAN removes it from the chain

Navigate Futures Chains

FuturesChain objects represent an entire chain of contracts for a single underlying Future. They have the following properties:

To get the FuturesChain , index the FuturesChains futures_chains property of the Slice with the continuous contract Symbol .

public override void OnData(Slice slice)
{
    if (slice.FuturesChains.TryGetValue(_symbol, out var chain))
    {
        // Example: Select the contract with the greatest open interest
        var contract = chain.OrderBy(x => x.OpenInterest).Last();
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.futures_chains.get(self._symbol)
    if chain:
        # Example: Select the contract with the greatest open interest
        contract = sorted(chain, key=lambda contract: contract.open_interest, reverse=True)[0]

You can also loop through the FuturesChains futures_chains property to get each FuturesChain .

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.FuturesChains)
    {
        var continuousContractSymbol = kvp.Key;
        var chain = kvp.Value;
    }
}

public void OnData(FuturesChains futuresChains)
{
    foreach (var kvp in futuresChains)
    {
        var continuousContractSymbol = kvp.Key;
        var chain = kvp.Value;
    }
}
def on_data(self, slice: Slice) -> None:
    for continuous_contract_symbol, chain in slice.futures_chains.items():
        pass

Selection Frequency

By default, Futures universes run at the first time step of each day to select their contracts.

 

Universes

Future Options

Introduction

A Future Option universe lets you select a basket of Option contracts on the contracts in a Futures universe .

Create Universes

To add a universe of Future Option contracts, in the Initialize initialize method, define a Future universe and then pass the canonical Symbol symbol to the AddFutureOption add_future_option method.

UniverseSettings.Asynchronous = true;
var future = AddFuture(Futures.Metals.Gold);
future.SetFilter(0, 90);
AddFutureOption(future.Symbol);
self.universe_settings.asynchronous = True
future = self.add_future(Futures.Metals.GOLD)
future.set_filter(0, 90)
self.add_future_option(future.symbol)

The following table describes the AddFutureOption add_future_option method arguments:

Argument Data Type Description Default Value
symbol Symbol The continuous Future contract Symbol. To view the supported assets in the US Future Options dataset, see Supported Assets .
optionFilter option_filter Func<OptionFilterUniverse, OptionFilterUniverse> Callable[[OptionFilterUniverse], OptionFilterUniverse] A function that selects Future Option contracts null None

To override the default pricing model of the Option, set a pricing model in a security initializer.

// In Initialize
var seeder = SecuritySeeder.Null;
SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, seeder, this));

// Outside of the algorithm class
class MySecurityInitializer : BrokerageModelSecurityInitializer
{
    private QCAlgorithm _algorithm;

    public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder, QCAlgorithm algorithm)
        : base(brokerageModel, securitySeeder) 
    {
        _algorithm = algorithm;
    }
    
    public override void Initialize(Security security)
    {
        // First, call the superclass definition
        // This method sets the reality models of each security using the default reality models of the brokerage model
        base.Initialize(security);

        // Next, set the price model
        if (security.Type == SecurityType.FutureOption) // Option type
        {
            security.PriceModel = OptionPriceModels.CrankNicolsonFD();
        }
    }
}
# In Initialize
seeder = SecuritySeeder.NULL
self.set_security_initializer(MySecurityInitializer(self.brokerage_model, seeder, self))

# Outside of the algorithm class
class MySecurityInitializer(BrokerageModelSecurityInitializer):

    def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
        super().__init__(brokerage_model, security_seeder)

    def initialize(self, security: Security) -> None:
        # First, call the superclass definition
        # This method sets the reality models of each security using the default reality models of the brokerage model
        super().initialize(security)

        # Next, set the price model
        if security.type == SecurityType.FUTURE_OPTION: # Option type
            security.price_model = OptionPriceModels.crank_nicolson_fd()

To override the initial guess of implied volatility , set and warm up the underlying volatility model .

Filter Contracts

By default, LEAN subscribes to the Option contracts that have the following characteristics:

To adjust the universe of contracts, set a filter. The filter usually runs at every time step in your algorithm. When the filter selects a contract that isn't currently in your universe, LEAN adds the new contract data to the next Slice that it passes to the OnData on_data method.

To set a contract filter, in the Initialize initialize method, pass a filter function to the AddFutureOption add_future_option method. The following table describes the available filter techniques:

AddFutureOption(future.Symbol, optionFilterUniverse => optionFilterUniverse.Strikes(-1, 1));
self.add_future_option(future.symbol, lambda option_filter_universe: option_filter_universe.strikes(-1, 1))

The following table describes the filter methods of the OptionFilterUniverse class:

Method Description
Strikes(int minStrike, int maxStrike) strikes(min_strike: int, max_strike: int) Selects contracts that are within minStrike m_strike strikes below the underlying price and maxStrike max_strike strikes above the underlying price
CallsOnly() calls_only() Selects call contracts
PutsOnly() puts_only() Selects put contracts
StandardsOnly() standards_only() Selects standard contracts
IncludeWeeklys() include_weeklys() Selects non-standard weeklys contracts
WeeklysOnly() weeklys_only() Selects weekly contracts
FrontMonth() front_month() Selects the front month contract
BackMonths() back_months() Selects the non-front month contracts
BackMonth() back_month() Selects the back month contracts
Expiration(TimeSpan minExpiry, TimeSpan maxExpiry) expiration(min_expiry: timedelta, max_expiry: timedelta) Selects contracts that expire within a range of dates relative to the current day
Expiration(int minExpiryDays, int maxExpiryDays) expiration(min_expiryDays: int, max_expiryDays: int) Selects contracts that expire within a range of dates relative to the current day
Contracts(IEnumerable<Symbol> contracts) contracts(contracts: List[Symbol]) Selects a list of contracts
Contracts(Func<IEnumerable<Symbol>, IEnumerable< Symbol>> contractSelector) contracts(contract_selector: Callable[[List[Symbol]], List[Symbol]]) Selects contracts that a selector function selects

The preceding methods return an OptionFilterUniverse , so you can chain the methods together.

AddFutureOption(future.Symbol, optionFilterUniverse => optionFilterUniverse.Strikes(-1, 1).CallsOnly());
self.add_future_option(future.symbol, lambda option_filter_universe: option_filter_universe.strikes(-1, 1).calls_only())

To perform thorough filtering on the OptionFilterUniverse , define an isolated filter method.

# In Initialize
AddFutureOption(future.Symbol, Selector);
        
private OptionFilterUniverse Selector(OptionFilterUniverse optionFilterUniverse)
{
    var symbols = optionFilterUniverse.PutsOnly();
    var strike = symbols.Select(symbol => symbol.ID.StrikePrice).Min();
    symbols = symbols.Where(symbol => symbol.ID.StrikePrice == strike);
    return optionFilterUniverse.Contracts(symbols);
}
# In Initialize
self.add_future_option(future.Symbol, self._contract_selector)

def _contract_selector(self, option_filter_universe: OptionFilterUniverse) -> OptionFilterUniverse:
    symbols = option_filter_universe.PutsOnly()
    strike = min([symbol.id.strike_price for symbol in symbols])
    symbols = [symbol for symbol in symbols if symbol.id.strike_price == strike]
    return option_filter_universe.contracts(symbols)

Some of the preceding filter methods only set an internal enumeration in the OptionFilterUniverse that it uses later on in the filter process. This subset of filter methods don't immediately reduce the number of contract Symbol objects in the OptionFilterUniverse .

Navigate Option Chains

OptionChain objects represent an entire chain of Option contracts for a single underlying security. They have the following properties:

To get the OptionChain , loop through the OptionChains option_chains property. After you get the OptionChain , you can sort and filter the Option contracts in the chain.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.OptionChains)
    {
        var optionChain = kvp.Value;
        // Example: Find 5 put contracts that are closest to at-the-money (ATM) and have the farthest expiration
        var contracts = optionChain
            .Where(x => x.Right == OptionRight.Put)
            .OrderByDescending(x => x.Expiry)
            .ThenBy(x => Math.Abs(chain.Underlying.Price - x.Strike))
            .Take(5);

        // Select the contract with the delta closest to -0.5
        var contract = contracts.OrderBy(x => Math.Abs(-0.5m - x.Greeks.Delta)).FirstOrDefault();
    }
}
def on_data(self, slice: Slice) -> None:
    for _, option_chain in slice.option_chains.items():
        # Example: Find 5 put contracts that are closest to at-the-money (ATM) and have the farthest expiration
        contracts = [x for x in option_chain if x.right == OptionRight.PUT]
        contracts = sorted(sorted(contracts, \
            key=lambda x: abs(option_chain.underlying.price - x.strike)), \
            key=lambda x: x.expiry, reverse=True)[:5]

        # Select the contract with the delta closest to -0.5
        contract = sorted(contracts, key=lambda x: abs(-0.5 - x.greeks.delta))[0]

You can also iterate through the FuturesChains futures_chains first.

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.FuturesChains)
    {
        var continuousContractSymbol = kvp.Key;
        var futuresChain = kvp.Value;
        
        // Select a Future Contract and create its canonical FOP Symbol
        var futuresContract = futuresChain.First();
        var canonicalFOPSymbol = QuantConnect.Symbol.CreateCanonicalOption(futuresContract.Symbol);
        if (slice.OptionChains.TryGetValue(canonicalFOPSymbol, out var fopChain))
        {
            foreach (var contract in fopChain)
            {
                // 
            }
        }
    }
}
def on_data(self, slice: Slice) -> None:
    for continuous_future_symbol, futures_chain in slice.futures_chains.items():
        # Select a Future Contract and create its canonical FOP Symbol
        futures_contract = [contract for contract in futures_chain][0]
        canonical_fop_symbol = Symbol.create_canonical_option(futures_contract.symbol)
        fop_chain = slice.option_chains.get(canonical_fop_symbol)
        if fop_chain:
            for contract in fop_chain:
                pass

Selection Frequency

By default, Future Option universes run at the first time step of each day to select their contracts.

 

Universes

Index Options

Introduction

An Index Option universe lets you select a basket of Option contracts on an Index.

Create Universes

To add a universe of Index Option contracts, in the Initialize initialize method, call the AddIndexOption add_index_option method. This method returns an Option object, which contains the canonical Symbol symbol . You can't trade with the canonical Option Symbol symbol , but save a reference to it so you can easily access the Option contracts in the OptionChain that LEAN passes to the OnData on_data method. The method to create the universe depends on if the Index Options you want require a target ticker.

Create Standard Universes

To create a universe of Index Options based on an index like VIX, SPX, or NDX, pass the index ticker to the AddIndexOption add_index_option method.

var option = AddIndexOption("VIX");
_symbol = option.Symbol;
option = self.add_index_option("VIX")
self._symbol = option.symbol

The following table describes the AddIndexOption add_index_option method arguments for standard universes:

Argument Data Type Description Default Value
ticker string str The underlying Index ticker. To view the supported indices, see Supported Assets .
resolution Resolution? Resolution/NoneType The resolution of the market data. To view the supported resolutions, see Resolutions . None null
market string str The Index Option market. Market.USA
fillForward fill_forward bool If true, the current slice contains the last available data even if there is no data at the current time. True true

If you add an Option universe for an underlying Index that you don't have a subscription for, LEAN automatically subscribes to the underlying Index and sets its fill forward property to match that of the Index Option universe

Create Non-Standard Universes

To create a universe of non-standard Index Options like weekly VIX contracts, pass the index Symbol and target Option ticker to the AddIndexOption add_index_option method.

var indexSymbol = AddIndex("VIX").Symbol;
var option = AddIndexOption(indexSymbol, "VIXW");
_symbol = option.Symbol;
index_symbol = self.add_index("VIX").symbol
option = self.add_index_option(index_symbol, "VIXW")
self._symbol = option.symbol

The following table describes the AddIndexOption add_index_option method arguments for non-standard universes:

Argument Data Type Description Default Value
underlying Symbol The underlying Index Symbol . To view the supported indices, see Supported Assets .
targetOption target_option string str The target Option ticker. To view the supported target Options, see Supported Assets .
resolution Resolution? Resolution/NoneType The resolution of the market data. To view the supported resolutions, see Resolutions . The Index resolution must be less than or equal to the Index Option resolution. For example, if you set the Index resolution to minute, then you must set the Index Option resolution to minute, hour, or daily. None null
market string str The Index Option market. Market.USA
fillForward fill_forward bool If true, the current slice contains the last available data even if there is no data at the current time. True true

If you add an Option universe for an underlying Index that you don't have a subscription for, LEAN automatically subscribes to the underlying Index.

Configure Reality Models

To override the default pricing model of the Option, set a pricing model .

option.price_model = OptionPriceModels.crank_nicolson_fd();
option.price_model = OptionPriceModels.crank_nicolson_fd()

To override the initial guess of implied volatility , set and warm up the underlying volatility model .

Filter Contracts

By default, LEAN subscribes to the Option contracts that have the following characteristics:

To adjust the universe of contracts, set a filter. The filter usually runs at the first bar of every day. When the filter selects a contract that isn't currently in your universe, LEAN adds the new contract data to the next Slice that it passes to the OnData on_data method.

To set a contract filter, in the Initialize initialize method, call the SetFilter set_filter method of the Option object. The following table describes the available filter techniques:

Method
Description
SetFilter(int minStrike, int maxStrike) set_filter(minStrike: int, maxStrike: int) Selects the contracts that have a strike price within a minimum and maximum strike level relative to the underlying price. For example, say the underlying price is $302 and there are strikes at every $5. If you set minStrike m_strike to -1 and maxStrike max_strike to 1, LEAN selects the contracts that have a strike of $300 or $305. This filter runs asynchronously by default.
SetFilter(TimeSpan minExpiry, TimeSpan maxExpiry) set_filter(minExpiry: timedelta, maxExpiry: timedelta) Selects the contracts that expire within the range you set. This filter runs asynchronously by default.
SetFilter(int minStrike, int maxStrike, TimeSpan minExpiry, TimeSpan maxExpiry) set_filter(minStrike: int, maxStrike: int, minExpiry: timedelta, maxExpiry: timedelta) Selects the contracts that expire and have a strike within the range you set. This filter runs asynchronously by default.
SetFilter(Func<OptionFilterUniverse, OptionFilterUniverse> universeFunc) set_filter(universeFunc: Callable[[OptionFilterUniverse], OptionFilterUniverse]) Selects the contracts that a function selects.
// Select contracts that have a strike price within 1 strike level above and below the underlying price
option.SetFilter(minStrike: -1, maxStrike: 1);

// Select contracts that expire within 30 days
option.SetFilter(minExpiry: TimeSpan.FromDays(0), maxExpiry: TimeSpan.FromDays(30));

// Select contracts that have a strike price within 1 strike level and expire within 30 days
option.SetFilter(minStrike: -1, maxStrike: 1, minExpiry: TimeSpan.FromDays(0), maxExpiry: TimeSpan.FromDays(30));

// Select call contracts
option.SetFilter(optionFilterUniverse => optionFilterUniverse.CallsOnly());
# Select contracts that have a strike price within 1 strike level above and below the underlying price
option.set_filter(min_strike=-1, max_strike=1)

# Select contracts that expire within 30 days
option.set_filter(min_expiry=timedelta(days=0), maxExpiry=timedelta(days=30))

# Select contracts that have a strike price within 1 strike level and expire within 30 days
option.set_filter(min_strike=-1, max_strike=1, min_expiry=timedelta(days=0), maxExpiry=timedelta(days=30))

# Select call contracts
option.set_filter(lambda option_filter_universe: option_filter_universe.calls_only())

The following table describes the filter methods of the OptionFilterUniverse class:

Method Description
Strikes(int minStrike, int maxStrike) strikes(min_strike: int, max_strike: int) Selects contracts that are within minStrike m_strike strikes below the underlying price and maxStrike max_strike strikes above the underlying price
CallsOnly() calls_only() Selects call contracts
PutsOnly() puts_only() Selects put contracts
StandardsOnly() standards_only() Selects standard contracts
IncludeWeeklys() include_weeklys() Selects non-standard weeklys contracts
WeeklysOnly() weeklys_only() Selects weekly contracts
FrontMonth() front_month() Selects the front month contract
BackMonths() back_months() Selects the non-front month contracts
BackMonth() back_month() Selects the back month contracts
Expiration(TimeSpan minExpiry, TimeSpan maxExpiry) expiration(min_expiry: timedelta, max_expiry: timedelta) Selects contracts that expire within a range of dates relative to the current day
Expiration(int minExpiryDays, int maxExpiryDays) expiration(min_expiryDays: int, max_expiryDays: int) Selects contracts that expire within a range of dates relative to the current day
Contracts(IEnumerable<Symbol> contracts) contracts(contracts: List[Symbol]) Selects a list of contracts
Contracts(Func<IEnumerable<Symbol>, IEnumerable< Symbol>> contractSelector) contracts(contract_selector: Callable[[List[Symbol]], List[Symbol]]) Selects contracts that a selector function selects

The preceding methods return an OptionFilterUniverse , so you can chain the methods together.

// Example 1: Select the front month call contracts
option.SetFilter(optionFilterUniverse => optionFilterUniverse.CallsOnly().FrontMonth());

// Example 2: Select the contracts (including weeklys) that expire in the next 90 days
option.SetFilter(optionFilterUniverse => optionFilterUniverse.IncludeWeeklys().Strikes(-20, 20).Expiration(0, 90));
# Example 1: Select the front month call contracts
option.set_filter(lambda option_filter_universe: option_filter_universe.calls_only().front_month())

# Example 2: Select the contracts (including weeklys) that expire in the next 90 days
option.set_filter(lambda option_filter_universe: option_filter_universe.include_weeklys().strikes(-20, 20).expiration(0, 90))

To perform thorough filtering on the OptionFilterUniverse , define an isolated filter method.

// In Initialize
option.SetFilter(Selector);
    
private OptionFilterUniverse Selector(OptionFilterUniverse optionFilterUniverse)
{
    var symbols = optionFilterUniverse.PutsOnly();
    var strike = symbols.Select(symbol => symbol.ID.StrikePrice).Min();
    symbols = symbols.Where(symbol => symbol.ID.StrikePrice == strike);
    return optionFilterUniverse.Contracts(symbols);
}
# In initialize
option.set_filter(self._contract_selector)
    
def _contract_selector(self, option_filter_universe: OptionFilterUniverse) -> OptionFilterUniverse:
    symbols = option_filter_universe.puts_only()
    strike = min([symbol.id.strike_price for symbol in symbols])
    symbols = [symbol for symbol in symbols if symbol.id.strike_price == strike]
    return option_filter_universe.contracts(symbols)

Some of the preceding filter methods only set an internal enumeration in the OptionFilterUniverse that it uses later on in the filter process. This subset of filter methods don't immediately reduce the number of contract Symbol objects in the OptionFilterUniverse .

Navigate Option Chains

OptionChain objects represent an entire chain of Option contracts for a single underlying security. They have the following properties:

To get the OptionChain , index the OptionChains option_chains property of the Slice with the canonical Symbol symbol . After you get the OptionChain , you can sort and filter the Option contracts in the chain.

public override void OnData(Slice slice)
{
    if (slice.OptionChains.TryGetValue(_symbol, out var chain))
    {
        // Example: Find 5 put contracts that are closest to at-the-money (ATM) and have the farthest expiration
        var contracts = chain
            .Where(x => x.Right == OptionRight.Put)
            .OrderByDescending(x => x.Expiry)
            .ThenBy(x => Math.Abs(chain.Underlying.Price - x.Strike))
            .Take(5);

        // Select the contract with the delta closest to -0.5
        var contract = contracts.OrderBy(x => Math.Abs(-0.5m - x.Greeks.Delta)).FirstOrDefault();
    }
}
def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self._symbol)
    if chain:
        # Example: Find 5 put contracts that are closest to at-the-money (ATM) and have the farthest expiration
        contracts = [x for x in chain if x.right == OptionRight.PUT]
        contracts = sorted(sorted(contracts, \
            key = lambda x: abs(chain.underlying.price - x.strike)), \
            key = lambda x: x.expiry, reverse=True)[:5]
    
        # Select the contract with the delta closest to -0.5
        contract = sorted(contracts, key=lambda x: abs(-0.5 - x.greeks.delta))[0]

You can also loop through the OptionChains option_chains property to get each OptionChain .

public override void OnData(Slice slice)
{
    foreach (var kvp in slice.OptionChains)
    {
        var canoncialSymbol = kvp.Key;
        var chain = kvp.Value;
        var contracts = chain.Contracts;
    }
}
def on_data(self, slice: Slice) -> None:
    for canonical_symbol, chain in slice.option_chains.items():
        contracts = chain.contracts

Selection Frequency

By default, Index Option universes run at the first time step of each day to select their contracts.

 

Universes

Crypto

Introduction

A Crypto universe lets you select a basket of Cryptocurrencies based on CryptoUniverse data.

Crypto Universes

To add a universe of Cryptocurrencies, in the Initialize initialize method, pass a CryptoUniverse to the AddUniverse add_universe method.

def initialize(self) -> None:
    self.universe_settings.asynchronous = True
    self.universe_settings.resolution = Resolution.DAILY
    self.set_brokerage_model(BrokerageName.COINBASE, AccountType.CASH)
    
    # Add crypto universe selection
    self._universe = self.add_universe(CryptoUniverse.coinbase(lambda universe_day: [c.symbol for c in universe_day]))
private Universe _universe;
public override void Initialize()
{
    UniverseSettings.Asynchronous = true;
    UniverseSettings.Resolution = Resolution.Daily;
    SetBrokerageModel(BrokerageName.Coinbase, AccountType.Cash);
    
    // Add crypto universe selection
    _universe = AddUniverse(CryptoUniverse.Coinbase(universeDay => from x in universeDay select x.Symbol));
}

The following table shows the helper methods to create Crypto universes for the supported exchanges:

Brokerage Name Helper Method Dataset page
BrokerageName. Binance BINANCE CryptoUniverse. Binance binance Learn more
BrokerageName. BinanceUS BINANCE_US CryptoUniverse. BinanceUS binance_us Learn more
BrokerageName. Bitfinex BITFINEX CryptoUniverse. Bitfinex bitfinex Learn more
BrokerageName. Bybit BYBIT CryptoUniverse. Bybit bybit Learn more
BrokerageName. Coinbase COINBASE CryptoUniverse. Coinbase coinbase Learn more
BrokerageName. Kraken KRAKEN CryptoUniverse. Kraken kraken Learn more

The following table describes the CryptoUniverse method arguments:

Argument Data Type Description Default Value
selector Func<IEnumerable<CryptoUniverse>, IEnumerable<Symbol>> Callable[[List[CryptoUniverse]], List[Symbol]] A function to select some of the Cryptocurrencies for the universe.
universeSettings universe_settings UniverseSettings The universe settings . null None

The filter function receives CryptoUniverse objects, which represent one of the Cryptocurrencies in the market. The Symbol objects that the filter function returns represent the universe constituents. CryptoUniverse objects have the following attributes:

To perform thorough filtering on the CryptoUniverse objects, define an isolated filter method.

def initialize(self) -> None:
    self.universe_settings.asynchronous = True
    self.universe_settings.resolution = Resolution.DAILY
    self.set_brokerage_model(BrokerageName.COINBASE, AccountType.CASH)

    # Add crypto universe selection
    self._universe = self.add_universe(CryptoUniverse.coinbase(self._universe_filter))
def _universe_filter(self, universe_day): # Define the universe selection function return [cf.symbol for cf in universe_day if cf.volume >= 100 and cf.volume_in_usd > 10000]
private Universe _universe;
public override void Initialize()
{
    UniverseSettings.Asynchronous = true;
    UniverseSettings.Resolution = Resolution.Daily;
    SetBrokerageModel(BrokerageName.Coinbase, AccountType.Cash);

    // Add crypto universe selection
    _universe = AddUniverse(CryptoUniverse.Coinbase(UniverseFilter));
}

private IEnumerable<Symbol> UniverseFilter(IEnumerable< CryptoUniverse> universeDay)
{
    return universeDay.Where(cf => cf.Volume >= 100m && cf.VolumeInUsd > 10000m).Select(x => x.Symbol);
}

Historical Data

To get historical Cryptocurrency universe data, call the History history method with the Universe object and the lookback period. The return type is a IEnumerable<BaseDataCollection> and you have to cast its items to CryptoUniverse .

To get historical Cryptocurrency universe data, call the History history method with the Universe object and the lookback period. The return type is a multi-index pandas.Series of CryptoUniverse list.

var history = History(_universe, 30, Resolution.Daily);
foreach (var universeDay in history)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Log($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), universe_day in history.items():
    for universe_item in universe_day:
        self.log(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

For more information about Cryptocurrency data, see Crypto .

Alternative Data Universes

An alternative data universe lets you select a basket of Cryptocurrencies based on an alternative dataset that's linked to them. If you use an alternative data universe, you limit your universe to only the securities in the dataset, which avoids unnecessary subscriptions. Currently, only the Crypto Market Cap alternative dataset supports universe selection for Crypto.

Selection Frequency

Crypto universes run on a daily basis by default. To adjust the selection schedule, see Schedule .

Live Trading Considerations

In live mode, the pipeline has a 16-hour delay. Your algorithm receives the CryptoUniverse objects at around 16:00-16:30 Coordinated Universal Time (UTC) each day, depending on the data processing task.

 

Universes

Custom Universes

Introduction

A custom universe lets you select a basket of assets from a custom dataset.

Data Sources

You can gather your custom data from any of the following sources:

The data source should serve data in chronological order and each data point should have a unique timestamp. Each request has a 1 second overhead, so bundle samples together for fast execution.

Define Custom Universe Types

Custom universes should extend the BaseData PythonData class. Extensions of the BaseData PythonData class must implement a GetSource get_source and Reader reader method.

The GetSource get_source method in your custom data class instructs LEAN where to find the data. This method must return a SubscriptionDataSource object, which contains the data location and format ( SubscriptionTransportMedium ). You can even change source locations for backtesting and live modes. We support many different data sources.

The Reader reader method of your custom data class takes one line of data from the source location and parses it into one of your custom objects. You can add as many properties to your custom data objects as you need, but must set Symbol symbol and EndTime end_time properties. When there is no useable data in a line, the method should return null None . LEAN repeatedly calls the Reader reader method until the date/time advances or it reaches the end of the file.

//Example custom universe data; it is virtually identical to other custom data types.
public class MyCustomUniverseDataClass : BaseData 
{
    public int CustomAttribute1;
    public decimal CustomAttribute2;
    public override DateTime EndTime 
    {
        // define end time as exactly 1 day after Time
        get { return Time + QuantConnect.Time.OneDay; }
        set { Time = value - QuantConnect.Time.OneDay; }
    }

    public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
    {
        return new SubscriptionDataSource(@"your-remote-universe-data", SubscriptionTransportMedium.RemoteFile);
    }

    public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode) 
    {
        var items = line.Split(",");

        // Generate required data, then return an instance of your class.
        return new MyCustomUniverseDataClass 
        {
            EndTime = Parse.DateTimeExact(items[0], "yyyy-MM-dd"),
            Symbol = Symbol.Create(items[1], SecurityType.Equity, Market.USA),
            CustomAttribute1 = int.Parse(items[2]),
            CustomAttribute2 = decimal.Parse(items[3], NumberStyles.Any, CultureInfo.Invariant)
        };
    }
}
# Example custom universe data; it is virtually identical to other custom data types.
class MyCustomUniverseDataClass(PythonData):

    def get_source(self, config: SubscriptionDataConfig, date: datetime, is_live_mode: bool) -> SubscriptionDataSource:
        return SubscriptionDataSource(@"your-remote-universe-data", SubscriptionTransportMedium.REMOTE_FILE)

    def reader(self, config: SubscriptionDataConfig, line: str, date: datetime, is_live_mode: bool) -> BaseData:
        items = line.split(",")
    
        # Generate required data, then return an instance of your class.
        data = MyCustomUniverseDataClass()
        data.end_time = datetime.strptime(items[0], "%Y-%m-%d")
        # define Time as exactly 1 day earlier Time
        data.time = data.end_time - timedelta(1)
        data.symbol = Symbol.create(items[1], SecurityType.CRYPTO, Market.BITFINEX)
        data["CustomAttribute1"] = int(items[2])
        data["CustomAttribute2"] = float(items[3])
        return data

Your Reader reader method should return objects in chronological order. If an object has a timestamp that is the same or earlier than the timestamp of the previous object, LEAN ignores it.

If you need to create multiple objects in your Reader reader method from a single line , follow these steps:

  1. In the GetSource get_source method, pass FileFormat.UnfoldingCollection FileFormat.UNFOLDING_COLLECTION as the third argument to the SubscriptionDataSource constructor.
  2. In the Reader reader method, order the objects by their timestamp and then return a BaseDataCollection(endTime, config.Symbol, objects) BaseDataCollection(end_time, config.symbol, objects) where objects is a list of your custom data objects.
public class MyCustomUniverseDataClass : BaseData 
{
    [JsonProperty(PropertyName = "Attr1")]
    public int CustomAttribute1 { get; set; }

    [JsonProperty(PropertyName = "Ticker")]
    public string Ticker { get; set; }
    
    [JsonProperty(PropertyName = "date")]
    public DateTime Date { get; set; }

    public override DateTime EndTime 
    {
        // define end time as exactly 1 day after Time
        get { return Time + QuantConnect.Time.OneDay; }
        set { Time = value - QuantConnect.Time.OneDay; }
    }

    public MyCustomUniverseDataClass()
    {
        Symbol = Symbol.Empty;
        DataType = MarketDataType.Base;
    }
    
    public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
    {
        return new SubscriptionDataSource(@"your-data-source-url", 
            SubscriptionTransportMedium.RemoteFile,
            FileFormat.UnfoldingCollection);
    }

    public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode) 
    {
        var items = JsonConvert.DeserializeObject<List<MyCustomUniverseDataClass>>(line);
        var endTime = items.Last().Date;

        foreach (var item in items)
        {
            item.Symbol = Symbol.Create(item.Ticker, SecurityType.Equity, Market.USA);
            item.Time = item.Date;
            item.Value = (decimal) item.CustomAttribute1;
        }

        return new BaseDataCollection(endTime, config.Symbol, items);
    }
}
class MyCustomUniverseDataClass(PythonData):
    
    def get_source(self, config, date, isLive):
        return SubscriptionDataSource("your-data-source-url", SubscriptionTransportMedium.REMOTE_FILE, FileFormat.UNFOLDING_COLLECTION)

    def reader(self, config, line, date, isLive):
        json_response = json.loads(line)
        
        end_time = datetime.strptime(json_response[-1]["date"], '%Y-%m-%d') + timedelta(1)

        data = list()

        for json_datum in json_response:
            datum = MyCustomUniverseDataClass()
            datum.symbol = Symbol.create(json_datum["Ticker"], SecurityType.EQUITY, Market.USA)
            datum.time = datetime.strptime(json_datum["date"], '%Y-%m-%d') 
            datum.end_time = datum.time + timedelta(1)
            datum['CustomAttribute1'] = int(json_datum['Attr1'])
            datum.value = float(json_datum['Attr1'])
            data.append(datum)

        return BaseDataCollection(end_time, config.symbol, data)

Initialize Custom Universes

To add a custom universe to your algorithm, in the Initialize initialize method, pass your universe type and a selector function to the AddUniverse add_universe method. The selector function receives a list of your custom objects and must return a list of Symbol objects. In the selector function definition, you can use any of the properties of your custom data type. The Symbol objects that you return from the selector function set the constituents of the universe.

private Universe _universe;
// In Initialize
_universe = AddUniverse<MyCustomUniverseDataClass>("myCustomUniverse", Resolution.Daily, data => {
    return (from singleStockData in data
           where singleStockData.CustomAttribute1 > 0
           orderby singleStockData.CustomAttribute2 descending
           select singleStockData.Symbol).Take(5);
});
# In Initialize
self._universe = self.add_universe(MyCustomUniverseDataClass, "myCustomUniverse", Resolution.DAILY, self.selector_function)

# Define the selector function
def selector_function(self, data: List[MyCustomUniverseDataClass]) -> List[Symbol]:
    sorted_data = sorted([ x for x in data if x["CustomAttribute1"] > 0 ],
                         key=lambda x: x["CustomAttribute2"],
                         reverse=True)
    return [x.symbol for x in sorted_data[:5]]

Historical Data

To get custom universe historical data, call the History history method with the Universe object and the lookback period. The return type is a IEnumerable<BaseDataCollection> and you have to cast its items to MyCustomUniverseDataClass .

To get historical custom universe data, call the History history method with the Universe object and the lookback period. The return type is a pandas.DataFrame where the columns contain the custom type attributes.

var history = History(_universe, 30);
foreach (var data in history)
{
    foreach (MyCustomUniverseDataClass singleStockData in data)
    {
        Log($"{singleStockData.Symbol} CustomAttribute1 at {singleStockData.EndTime}: {singleStockData.CustomAttribute1}");
    }
}
history = self.history(self._universe, 30)
for time, data in history.iterrows():
    for single_stock_data in data:
        self.log(f"{single_stock_data.symbol} CustomAttribute1 at {single_stock_data.end_time}: {single_stock_data['CustomAttribute1']}")

Selection Frequency

Custom universes run on a schedule based on the EndTime end_time of your custom data objects. To adjust the selection schedule, see Schedule .

Examples

Demonstration Algorithms
DropboxUniverseSelectionAlgorithm.py Python DropboxUniverseSelectionAlgorithm.cs C# DropboxBaseDataUniverseSelectionAlgorithm.py Python DropboxBaseDataUniverseSelectionAlgorithm.cs C#

 

Universes

Dataless Scheduled Universes

Introduction

A dataless scheduled universe let's you select a set of assets on a specific schedule. You can control which days the other types of universe run by adjusting the Schedule universe setting . However, the Schedule schedule universe setting doesn't accept a TimeRule argument, so you can't control the time of the day they run. In contrast, a dataless scheduled universe accepts a TimeRule argument, but its selection function only receives the algorithm time.

Create Universes

To add a dataless scheduled universe, in the Initialize initialize method, call the AddUniverse add_universe method with a ScheduledUniverse object.

public class MyUniverseAlgorithm : QCAlgorithm {
    private Universe _universe;
    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;
        _universe = AddUniverse(new ScheduledUniverse(DateRules.MonthStart(), TimeRules.At(8, 0), SelectSymbols));
    }

        
    private IEnumerable<Symbol> SelectSymbols(DateTime dt) 
    {
        return new[] { QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA) };
    }
}
class MyUniverseAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self._universe = self.add_universe(
            ScheduledUniverse(
                self.date_rules.month_start(), 
                self.time_rules.at(8, 0), 
                self._select_symbols
            )
        )
        
    def _select_symbols(self, dt):
        return [Symbol.create("SPY", SecurityType.EQUITY, Market.USA)]

The following table describes the arguments the model accepts:

Argument Data Type Description Default Value
dateRule date_rule IDateRule Date rule that defines what days the universe selection function runs
timeRule time_rule ITimeRule Time rule that defines what times on each day selected by date rule the universe selection function runs
Func<DateTime, IEnumerable< Symbol>> Callable[[datetime], List[Symbol]] selector Selector function that accepts the current date time and returns the universe's Symbol objects
settings UniverseSettings The universe settings . If you don't provide an argument, the model uses the algorithm.UniverseSettings algorithm.universe_settings by default. null None

Date Rules

The following table describes the supported DateRules :

Member Description
self.date_rules.set_default_time_zone(time_zone: DateTimeZone) DateRules.SetDefaultTimeZone(DateTimeZone timeZone); Sets the time zone for the DateRules object used in all methods in this table. The default time zone is the algorithm time zone .
self.date_rules.on(year: int, month: int, day: int) DateRules.On(int year, int month, int day) Trigger an event on a specific date.
self.date_rules.every_day() DateRules.EveryDay() Trigger an event every day.
self.date_rules.every_day(symbol: Symbol) DateRules.EveryDay(Symbol symbol) Trigger an event every day a specific symbol is trading.
self.date_rules.every(days: List[DayOfWeek]) DateRules.Every(params DayOfWeek[] days) Trigger an event on specific days throughout the week. To view the DayOfWeek enum members, see DayOfWeek Enum in the .NET documentation.
self.date_rules.month_start(days_offset: int = 0) DateRules.MonthStart(int daysOffset = 0) Trigger an event on the first day of each month plus an offset.
self.date_rules.month_start(symbol: Symbol, daysOffset: int = 0) DateRules.MonthStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each month for a specific symbol plus an offset.
self.date_rules.month_end(days_offset: int = 0) DateRules.MonthEnd(int daysOffset = 0) Trigger an event on the last day of each month minus an offset.
self.date_rules.month_end(symbol: Symbol, daysOffset: int = 0) DateRules.MonthEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each month for a specific symbol minus an offset.
self.date_rules.week_start(days_offset: int = 0) DateRules.WeekStart(int daysOffset = 0) Trigger an event on the first day of each week plus an offset.
self.date_rules.week_start(symbol: Symbol, days_offset: int = 0) DateRules.WeekStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each week for a specific symbol plus an offset.
self.date_rules.week_end(days_offset: int = 0) DateRules.WeekEnd(int daysOffset = 0) Trigger an event on the last day of each week minus an offset.
self.date_rules.week_end(symbol: Symbol, days_offset: int = 0) DateRules.WeekEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each week for a specific symbol minus an offset.
self.date_rules.today DateRules.Today Trigger an event once today.
self.date_rules.tomorrow DateRules.Tomorrow Trigger an event once tomorrow.

To define custom date rules, create a FuncDateRule object. The FuncDateRule constructor expects a name argument of type string str and a getDatesFunction get_dates_function argument of type Func<DateTime, DateTime, IEnumerable<DateTime>> Callable[[datetime, datetime], List[datetime]] . The getDatesFunction get_dates_function function receives the start and end dates of the algorithm and returns a list of dates for the date rule. In live trading, the end date is 12/31/2025. The following example demonstrates how to define a date rule that represents the 10th day of each month:

var dateRule = new FuncDateRule(
    name: "10th_day_of_the_month",
    getDatesFunction: (start, end) => Enumerable.Range(start.Year, end.Year - start.Year + 1)
        .SelectMany(year => Enumerable.Range(1, 12).Select(month => new DateTime(year, month, 10)))
);
date_rule = FuncDateRule(
    name="10th_day_of_the_month", 
    get_dates_function=lambda start, end: [
        datetime(year, month, 10) 
        for year in range(start.year, end.year) for month in range(1,12)
    ]
) 

Time Rules

The following table describes the supported TimeRules :

Member Description
self.time_rules.set_default_time_zone(time_zone: DateTimeZone) TimeRules.SetDefaultTimeZone(DateTimeZone timeZone) Sets the time zone for the TimeRules object used in all methods in this table, except when a different time zone is given. The default time zone is the algorithm time zone .
self.time_rules.after_market_open(symbol: Symbol, minutes_after_open: float = 0, extended_market_open: bool = False) TimeRules.AfterMarketOpen(Symbol symbol, double minutesAfterOpen = 0, bool extendedMarketOpen = false) Trigger an event a few minutes after market open for a specific symbol (default is 0). This rule doesn't work for Crypto securities or custom data.
self.time_rules.before_market_close(symbol: Symbol, minutes_after_open: float = 0, extended_market_open: bool = False) TimeRules.BeforeMarketClose(Symbol symbol, double minutesBeforeClose = 0, bool extendedMarketOpen = false) Trigger an event a few minutes before market close for a specific symbol (default is 0). This rule doesn't work for Crypto securities or custom data.
self.time_rules.every(interval: timedelta) TimeRules.Every(TimeSpan interval) Trigger an event every period interval starting at midnight.
self.time_rules.now TimeRules.Now Trigger an event at the current time of day.
self.time_rules.midnight TimeRules.Midnight Trigger an event at midnight.
self.time_rules.noon TimeRules.Noon Trigger an event at noon.
self.time_rules.at(hour: int, minute: int, second: int = 0) TimeRules.At(int hour, int minute, int second = 0) Trigger an event at a specific time of day (e.g. 13:10).
self.time_rules.at(hour: int, minute: int, second: int, time_zone: DateTimeZone) TimeRules.At(int hour, int minute, int second, DateTimeZone timeZone) Trigger an event at a specific time of day in the given time zone (e.g. 13:10 UTC).

To define custom time rules, create a FuncTimeRule object. The FuncTimeRule constructor expects a name argument of type string str and a createUtcEventTimesFunction create_utc_event_times_function argument of type Func<IEnumerable<DateTime>, IEnumerable<DateTime>> Callable[[List[datetime]], List[datetime]] . The function receives the list of dates from the date rule and then returns a list of DateTime datetime that define the time rule.

var timeRule = new FuncTimeRule(
    name: "CustomTimeRule",
    createUtcEventTimesFunction: dates => dates.Select(d => d.AddHours(10)));
time_rule = FuncTimeRule(
    name="CustomTimeRule", 
    create_utc_event_times_function=lambda dates: [d + timedelta(hours=10) for d in dates]
)

Selection Frequency

Dataless scheduled universes run at whatever selection schedule you define by the dateRule date_rule and timeRule time_rule arguments.

Examples

Demonstration Algorithms
CustomDataUniverseScheduledRegressionAlgorithm.py Python CustomDataUniverseScheduledRegressionAlgorithm.cs C#

 

Datasets

Datasets

Overview

Introduction

It's common to use price and fundamental data points to inform trading decisions. Alternative datasets are datasets that aren't classified as market or fundamental data. Alternative data research began gaining popularity in 2007 after the financial crisis and its usage has continued to grow over the years. As usage has grown, so has the number of unique alternative datasets that are available for investors. The benefit of alternative datasets is that it’s easier to find alpha in these datasets because they receive less attention from investment researchers and these datasets contain information not found in market and fundamental datasets. Most traders research with market and fundamental datasets, so it's difficult to find alpha in them.

Methodology

The journey of raw data from its source to its integration with a trading platform can be complex. Alternative data is generally created through individuals, business processes, and sensors. Individuals create content on social media platforms, write reviews on e-commerce sites, and visit corporate Wikipedia pages. Businesses process transactions, file SEC reports, and issue company announcements. Sensors collect location data, gather satellite images, and monitor customer behavior.

Data providers can capture these forms of data for traders to inform trading decisions in ways that supplement traditional market and fundamental datasets. With over a million terabytes of data on the internet, there is virtually a limitless amount of information that can be informative for investors when analyzing a security’s performance in the marketplace.

Examples

A common example of alternative data in a trading system is using sentiment analysis on news sources to predict the future price movements of Equities. A second example is using announcements regarding corporate share buyback programs to trading Equities. A third example is using global supply and demand information for US Crude Products to inform Futures trades. To view all of the datasets we have available, see the left navigation menu.

Challenges

A challenge of working with datasets is that it can be difficult to find a reliable, high-quality, and inexpensive data source to use in live algorithms. If a data source has survivorship bias, insufficient history, or hasn’t been cleaned and processed properly, the data can cause poor trading performance. We thoroughly vet the datasets we add to the Dataset Market to ensure they are free of survivorship bias and have a reliable live feed. All of the available datasets have already been cleaned and processed, so you can just focus on the strategy research and development.

Future Outlook

The Dataset Market is still in the early phases of development. Over time, we will add more markets and alternative datasets. Alternative datasets are an ever-expanding data source, so it’s expected to continue to grow into the future. In today’s digital world, more data is created each year than in the previous year. To take advantage of the trend, we have implemented a new onboarding process to integrate many new alternative data sources into the QuantConnect platform. With the Dataset Market, you can import a new alternative dataset into your trading algorithm with just a single line of code. The Dataset Market gives everyone the ability to access high-quality alternative datasets that were previously only accessible to major hedge funds.

Live Trading Considerations

We receive most daily alternative data at 7 AM Eastern Time (ET) and start processing it. In live trading, your algorithm receives this data within 30 minutes of 7 AM ET. In backtesting, this data has a timestamp of midnight, so your algorithm receives it about seven hours earlier than it does in live mode.

In backtests, your algorithm receives data at perfect timing. If you request minute resolution data, your algorithm receives the bars at the top of each minute. In live trading, bars have a slight delay, so you may receive them milliseconds after the top of each minute.

Note that there will be delay for data available to be backtested. Live feed data is available for backtesting after 24-48 hours normally. Consider using Paper live trading if close monitoring is needed.

 

Datasets

QuantConnect

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.

 

QuantConnect

Binance Crypto Future Margin Rate Data

Introduction

The Binance Crypto Future Margin Rate Data by QuantConnect is for crypto-currency futures margin interest data points. The data covers 348 Cryptocurrency pairs, starts in August 2020, and is delivered on a daily update frequency. This dataset is created by downloading data using Binance API.

This dataset is an important companion to the Binance Crypto Future Price Data dataset because it contains information on margin interest data to model margin costs.

For more information about the Binance Crypto Future Margin Rate Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.

Getting Started

The following snippet demonstrates how to request data from the Binance Crypto Future Margin Rate dataset:

def initialize(self) -> None:
    self.set_brokerage_model(BrokerageName.BINANCE_FUTURES, AccountType.MARGIN)
    self.set_brokerage_model(BrokerageName.BINANCE_COIN_FUTURES, AccountType.MARGIN)

    self.crypto_future_symbol = self.add_crypto_future("BTCBUSD", Resolution.MINUTE).symbol
private Symbol _cryptoFutureSymbol;

public override void Initialize
{
    SetBrokerageModel(BrokerageName.BinanceFutures, AccountType.Margin);
    SetBrokerageModel(BrokerageName.BinanceCoinFutures, AccountType.Margin);

    // perpetual futures does not have a filter function
    _cryptoFutureSymbol = AddCryptoFuture("BTCBUSD", Resolution.Minute).Symbol;
}

The Binance Crypto Future Margin Rate data is added to your algorithm along with the market data when you add a crypto future subscription.

Data Summary

The following table describes the dataset properties:

Property Value
Start Date August 2020
Asset Coverage 236 Crypto Futures Pairs
Data Density Regular
Resolution Daily
Timezone UTC
Market Hours Always Open

Example Applications

The Binance Crypto Future Margin Rate dataset enables correct margin cost so you can accurately design strategies for Cryptocurrencies with term structure. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Binance Crypto Future Margin Rate dataset provides MarginInterestRates objects with the following attributes:

Supported Assets

The following table shows the available Crypto Future pairs:

Requesting Data

To add Binance Crypto Future Margin Rate data to your algorithm, call the AddCryptoFuture add_crypto_future method. Save a reference to the Crypto Future Symbol so you can access the data later in your algorithm.

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)

        # Set Account Currency to Binance Stable Coin for USD
        self.set_account_currency("BUSD")
        self.set_cash(100000)

        self.set_brokerage_model(BrokerageName.BINANCE_FUTURES, AccountType.MARGIN)
        self.set_brokerage_model(BrokerageName.BINANCE_COIN_FUTURES, AccountType.MARGIN)
        
        crypto_future = self.add_crypto_future("BTCBUSD", Resolution.MINUTE)
        # perpetual futures does not have a filter function
        self.btcbusd = crypto_future.symbol
namespace QuantConnect
{
    public class CoinAPIDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol ;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);

            // Set Account Currency to Binance Stable Coin for USD
            SetAccountCurrency("BUSD");
            SetCash(100000);

            SetBrokerageModel(BrokerageName.BinanceFutures, AccountType.Margin);
            SetBrokerageModel(BrokerageName.BinanceCoinFutures, AccountType.Margin);
            
            var cryptoFuture = AddCryptoFuture("BTCBUSD", Resolution.Minute);
            // perpetual futures does not have a filter function
            _symbol = cryptoFuture.Symbol;
        }
    }
}

For more information about creating Crypto Future subscriptions, see Requesting Data .

Accessing Data

To get the current Binance Crypto Margin Rate data, index the MarginInterestRates margin_interest_rates property of the current Slice with the Crypto Future Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.btcbusd in slice.margin_interest_rates:
        interest_rate = slice.margin_interest_rates[self.btcbusd].interest_rate
        self.log(f"{self.btcbusd} close at {slice.time}: {interest_rate}")
public override void OnData(Slice slice)
{
    if (slice.MarginInterestRates.ContainsKey(_symbol))
    {
        var interestRate = slice.MarginInterestRates[_symbol].InterestRate;
        Log($"{_symbol} price at {slice.Time}: {interestRate}");
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, margin_interest_rate in slice.margin_interest_rates.items():
        interest_rate = margin_interest_rate.interest_rate
        self.log(f"{symbol} close at {slice.time}: {interest_rate}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.MarginInterestRates)
    {
        var symbol = kvp.Key;
        var marginInterestRate = kvp.Value;
        var interestRate = marginInterestRate.InterestRate;
        Log($"{symbol} price at {slice.Time}: {interestRate}");
    }
}

For more information about accessing Crypto Future data, see Handling Data .

Remove Subscriptions

To unsubscribe from a Crypto pair that you added with the AddCrypto add_crypto method, call the RemoveSecurity remove_security method.

self.remove_security(self.btcbusd)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings in the virtual pair .

Example Applications

The Binance Crypto Future Margin Rate dataset enables correct margin cost so you can accurately design strategies for Cryptocurrencies with term structure. Examples include the following strategies:

For more example algorithms, see Examples .

 

QuantConnect

US ETF Constituents

Introduction

The US ETF Constituents dataset by QuantConnect tracks the constituents and weighting of US Equities in 2,650 ETF listings. The data starts in January 2009 and is delivered on a daily basis. This dataset is created by tracking the host ETF websites and can be delayed by up to 1 week.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the US ETF Constituents dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 160,000 quants are served every month.

Getting Started

The following snippet demonstrates how to request data from the US ETF Constituents dataset:

def initialize(self) -> None:
    self.universe_settings.asynchronous = True
    # Use the following method for a Classic Algorithm
    self._universe = self.add_universe(self.universe.etf("SPY", Market.USA, self.universe_settings, self.etf_constituents_filter))

    symbol = Symbol.create("SPY", SecurityType.EQUITY, Market.USA)
    # Use the following method for a Framework Algorithm
    self.add_universe_selection(ETFConstituentsUniverseSelectionModel(symbol, self.universe_settings, self.etf_constituents_filter))

    def etf_constituents_filter(self, constituents: List[ETFConstituentUniverse]) -> List[Symbol]:
        # Add all Symbols of the ETFConstituentUniverse
       return [x.symbol for x in constituents]
public override void Initialize()
{
    UniverseSettings.Asynchronous = True;
    // Use the following method for a Classic Algorithm
    _universe = AddUniverse(Universe.ETF("SPY", Market.USA, UniverseSettings, ETFConstituentsFilter));

    var symbol = QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA);
    // Use the following method for a Framework Algorithm
    AddUniverseSelection(new ETFConstituentsUniverseSelectionModel(symbol, UniverseSettings, ETFConstituentsFilter));
}
private IEnumerable<Symbol> ETFConstituentsFilter(IEnumerable <ETFConstituentUniverse> constituents)
{
    // Add all Symbols of the ETFConstituentUniverse
    return constituents.Select(x => x.Symbol);
}

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2009
Asset Coverage 2,650 US ETF Listings
Data Density Dense
Resolution Daily
Timezone New York

Example Applications

The ETF Constituents dataset provides an excellent source of tradable universes for strategies without selection bias. When you use an ETF universe, the original ETF can serve as an excellent benchmark for your strategy performance. Other use cases include the following:

For more example algorithms, see Examples .

Data Point Attributes

The ETF Constituents dataset provides ETFConstituentUniverse objects, which have the following attributes:

Supported ETFs

The following table shows the available ETFs:

Requesting Data

To add US ETF Constituents data to your algorithm, call the AddUniverse add_universe and Universe.ETF universe.etf methods. To select which constituents occupy the universe, provide the ETF Symbol and a selection function.

class ETFConstituentUniverseAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2018, 1, 1)
        self.set_end_date(2020, 8, 25)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        self._universe = self.add_universe(self.universe.etf("SPY", self.universe_settings, self.etf_constituents_filter))
namespace QuantConnect
{
   public class ETFConstituentUniverseAlgorithm : QCAlgorithm
   {
       public override void Initialize()
       {
           SetStartDate(2018, 1, 1);
           SetEndDate(2020, 8, 25);
           SetCash(100000);
           UniverseSettings.Asynchronous = True;
           _universe = AddUniverse(Universe.ETF("SPY", UniverseSettings, ETFConstituentsFilter));
       }
    }
}

For more information about universe settings, see Settings .

Accessing Data

To access the US ETF Constituent data, use the ETFConstituentUniverse objects in your selection function. The data is available in daily resolution. The Symbol objects you return from your selection function defines the universe constituents.

def etf_constituents_filter(self, constituents: List[ETFConstituentUniverse]) -> List[Symbol]:
    for c in constituents:
        self.debug(f'{c.end_time} :: {c.last_update} :: {c.weight} :: {c.shares_held} :: {c.market_value}')
    return [x.symbol for x in constituents]
public IEnumerable<Symbol> ETFConstituentsFilter(IEnumerable<ETFConstituentUniverse> constituents)
{
    foreach (var c in constituents)
    {
        Debug($"{c.EndTime} :: {c.LastUpdate} :: {c.Weight} :: {c.SharesHeld} :: {c.MarketValue}");
    }

    return constituents.Select(c => c.Symbol);
}

Historical Data

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var history = History(_universe, 30, Resolution.Daily);
foreach (var constituents in history)
{
    foreach (ETFConstituentUniverse constituent in constituents)
    {
        Log($"{constituent.Symbol} weight at {constituent.EndTime}: {constituent.Weight}");
    }
}
history = self.history(self.universe, 30, Resolution.DAILY)
for (universe_symbol, time), constituents in history.items():
    for constituent in constituents:
        self.log(f'{constituent.symbol} weight at {constituent.end_time}: {constituent.weight}')

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object and the lookback period. The UniverseHistory universe_history returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var constituents in universeHistory )
{
    foreach (ETFConstituentUniverse constituent in constituents)
    {
        Console.WriteLine($"{constituent.Symbol} weight at {constituent.EndTime}: {constituent.Weight}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (universe_symbol, time), constituents in universe_history.items():
    for constituent in constituents:
       print(f"{constituent.symbol} weight at {constituent.end_time}: {constituent.weight}")

You can call the History history method in Research.

Example Applications

The ETF Constituents dataset provides an excellent source of tradable universes for strategies without selection bias. When you use an ETF universe, the original ETF can serve as an excellent benchmark for your strategy performance. Other use cases include the following:

For more example algorithms, see Examples .

 

QuantConnect

US Equities Short Availability

Introduction

The US Equity Short Availability dataset provides the available shares for open short positions and their borrowing cost in the US Equity market. The data covers 10,500 US Equities, starts in January 2018, and is delivered on a daily frequency. This dataset is created using information from the exchanges.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the US Equities Short Availability dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.

Getting Started

The following snippets demonstrate how to request data from the US Equities Short Availability dataset.

Interactive Brokers Data

security.set_shortable_provider(InteractiveBrokersShortableProvider())
security.SetShortableProvider(new InteractiveBrokersShortableProvider());

Axos Clearing Data

security.set_shortable_provider(LocalDiskShortableProvider("axos"))
security.SetShortableProvider(new LocalDiskShortableProvider("axos"));

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2018
Asset Coverage 10,500 US Equities
Data Density Sparse
Resolution Daily
Timezone New York

Example Applications

The US Equities Short Availability dataset enables you to accurately design strategies harnessing information about short availability. Examples include the following use cases:

For more example algorithms, see Examples .

Data Point Attributes

The US Equities Short Availability data is a Symbol /decimal pair for ShortQuantity , FeeRate , and RebateRate .

Requesting Data

To add US Equities Short Availability data to your algorithm, set the shortable provider of each US Equity in your algorithm.

class ShortAvailabilityDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        security = self.add_equity("AAPL")
        security.set_shortable_provider(InteractiveBrokersShortableProvider())
        self._symbol = security.symbol
using QuantConnect.Data.Shortable;
namespace QuantConnect
{
    public class ShortAvailabilityDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            var security = AddEquity("AAPL");
            security.SetShortableProvider(new InteractiveBrokersShortableProvider());
            _symbol = security.Symbol;
        }
    }
}

Accessing Data

To check how many shares are available for a security to short, call the ShortableQuantity shortable_quantity method of the ShortableProvider shortable_provider

var shortableProvider = Securities[_symbol].ShortableProvider;
var shortableQuantity = shortableProvider.ShortableQuantity(_symbol, Time);

// Check if there are a certain quantity of shares available
var quantity = 100;
var isShortableQuantity = Shortable(_symbol, quantity);
shortable_provider = self.securities[self._symbol].shortable_provider
shortable_quantity = shortable_provider.shortable_quantity(self._symbol, self.time)

# Check if there are a certain quantity of shares available
quantity = 100;
is_shortable_quantity = self.shortable(self._symbol, quantity)

To check borrowing cost, call the FeeRate fee_rate or RebateRate rebate_rate method of the ShortableProvider shortable_provider

var feeRate = shortableProvider.FeeRate(_symbol, Time);
var rebateRate = shortableProvider.RebateRate(_symbol, Time);
fee_rate = shortable_provider.fee_rate(self._symbol, self.time);
rebate_rate = shortable_provider.rebate_rate(self._symbol, self.time);
To get valid borrowing rates, use the InteractiveBrokersShortableProvider .

Example Applications

The US Equities Short Availability dataset enables you to accurately design strategies harnessing information about short availability. Examples include the following use cases:

For more example algorithms, see Examples .

 

QuantConnect

US Equity Coarse Universe

Introduction

The US Equity Coarse Universe dataset by QuantConnect is a daily universe of all trading stocks in the US for a given day with the end of day price and volume. The data covers 30,000 US Equities in total, with approximately 8,000 Equities per day. The data starts in January 1998 and is delivered each trading day. This dataset is created by taking the closing auction price tick from the daily L1 trade and quote exchange dumps.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

QuantConnect/LEAN combines the data of this dataset with MorningStar Fundamental data in runtime. You can use this dataset in local development without the Morningstar counterpart.

For more information about the US Equity Coarse Universe dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.

Getting Started

The following snippet demonstrates how to request data from the US Equity Coarse Universe dataset:

equity = self.add_equity("IBM")
ibm_fundamental = equity.fundamentals
var equity = AddEquity("IBM");
var ibmFundamental = equity.Fundamentals;
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)
ibm_fundamental = self.fundamentals
var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);
var ibmFundamental = Fundamentals(ibm);
def initialize(self) -> None:
    self._universe = self.add_universe(self.fundamental_filter_function)

def fundamental_filter_function(self, fundamental: List[Fundamental]):
    sorted_by_dollar_volume = sorted([f for f in fundamental if f.price > 10],
                                key=lambda f: f.dollar_volume)
    return [f.symbol for f in sorted_by_dollar_volume[:10]]
public override void Initialize()
{
    _universe = AddUniverseSelection(new FundamentalUniverseSelectionModel(FundamentalFilterFunction));
}

public override List<Symbol> FundamentalFilterFunction(List<Fundamental> fundamental)
{
    return (from f in fundamental
            where f.Price > 10
            orderby f.DollarVolume
            select f.Symbol).Take(10);
}

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 1998
Asset Coverage 30,000 US Equities
Data Density Dense
Resolution Daily
Timezone New York

Example Applications

The US Equity Coarse Universe dataset enables you to accurately design a universe of US Equities. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Equity Coarse Universe dataset provides its data within Fundamental objects, which have the following attributes:

Requesting Data

You don't need any special code to request US Coarse Fundamental Data. You can access the current and historical fundamental data for any of the US Equities that this dataset includes.

class CoarseFundamentalDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2021, 1, 1)
        self.set_end_date(2021, 7, 1)
        self.set_cash(100000) 
        self.universe_settings.asynchronous = True

        # Option 1: Subscribe to individual US Equity assets
         self.add_equity("IBM")  

        # Option 2A: Create a fundamental universe (classic version)
         self._universe = self.add_universe(self.fundamental_function)

        # Option 2B: Create a fundamental universe (framework version)
        self.add_universe_selection(FundamentalUniverseSelectionModel(self.fundamental_function))
namespace QuantConnect
{
    public class CoarseFundamentalDataAlgorithm : QCAlgorithm
    {
    	private Universe _universe:
        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2021, 7, 1);
            SetCash(100000);
            UniverseSettings.Asynchronous = True;
            
            // Option 1: Subscribe to individual US Equity assets
            AddEquity("IBM");

            // Option 2A: Create a fundamental universe (classic version)
            _universe = AddUniverse(FundamentalFilterFunction);

            // Option 2B: Create a fundamental universe (framework version)
            AddUniverseSelection(new FundamentalUniverseSelectionModel(FundamentalFilterFunction));
        }
    }
}

For more information about universe settings, see Settings .

Accessing Data

If you add a fundamental universe to your algorithm, you can access fundamental data in the universe selection function.

def fundamental_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    sorted_by_dollar_volume = sorted(fundamental, key=lambda x: x.dollar_volume, reverse=True)[:3]
    for cf in sorted_by_dollar_volume:
        self.debug(f"{cf.end_time} :: {cf.symbol} : {cf.adjusted_price} :: {cf.dollar_volume}")

    return [ x.symbol for x in sortedByDollarVolume]
public IEnumerable<Symbol> FundamentalFunction(IEnumerable<Fundamental> fundamental)
{
    var sortedByDollarVolume = fundamental
        .OrderByDescending(x => x.DollarVolume)
        .Take(3).ToList();

    foreach (var cf in sortedByDollarVolume)
    {
        Debug($"{cf.EndTime} :: {cf.Symbol} : {cf.AdjustedPrice} :: {cf.DollarVolume}");
    }

    return sortedByDollarVolume.Select(x => x.Symbol);
}

To get fundamental data for Equities in your algorithm, use the Fundamentals fundamentals property of the Equity objects. The fundamental data represent the corporate fundamentals for the current algorithm time.

fundamentals = self.securities[symbol].fundamentals
var fundamentals = Securities[symbol].Fundamentals;

To get fundamental data for Equities, regardless of whether or not you have subscribed to them in your algorithm, call the Fundamentals fundamentals method. If you pass one Symbol , the method returns a Fundamental object. If you pass a list of Symbol objects, the method returns a list of Fundamental objects.

// Single asset 
var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);
var ibmFundamental = Fundamentals(ibm);

// Multiple assets
var nb = QuantConnect.Symbol.Create("NB", SecurityType.Equity, Market.USA);
var fundamentals = Fundamentals(new List<Symbol>{ nb, ibm }).ToList();
# Single asset
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)
ibm_fundamental = self.fundamentals(ibm)

# Multiple assets
nb = Symbol.create("NB", SecurityType.EQUITY, Market.USA)
fundamentals = self.fundamentals([ nb, ibm ])

Historical Data

You can get historical fundamental data in an algorithm and in the Research Environment.

Historical Data in Algorithms

To get historical fundamental data in an algorithm, call the History history method with Fundamental type and the Equity Symbol . If there is no data in the period you request, the history result is empty.

var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);

// Fundamental objects
var fundamentalHistory = History<Fundamental>(ibm, TimeSpan.FromDays(30));

// Fundamentals objects for all US Equities (including delisted companies)
var fundamentalsHistory = History<Fundamentals>(TimeSpan.FromDays(30));

// Collection of Fundamental objects for all US Equities (including delisted companies)
var collectionHistory = History(_universe, 30, Resolution.Daily);
foreach (var fundamental in collectionHistory)
{
    // Cast to Fundamental is required
    var highestMarketCap = fundamental.OfType<Fundamental>().OrderByDescending(x => x.MarketCap).Take(5);
}
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)

# DataFrame objects
df_history = qb.history(Fundamental, ibm, timedelta(30))

# Fundamental objects
fundamental_history= self.history[Fundamental](ibm, timedelta(30))

# Fundamentals objects for all US Equities (including delisted companies)
fundamentals_history = self.history[Fundamentals](timedelta(30))

# Multi-index Series objects of list of Fundamental objects
series_history = self.history(self.universe, 30, Resolution.DAILY)
for (universe_symbol, time), fundamental in series_history.items():
    highest_market_cap = sorted(fundamental, key=lambda x: x.market_cap)[-5:]

Historical Universe Data in Research

To get historical universe data in the Research Environment, call the UniverseHistory universe_history method with the Universe object and the lookback period. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var fundamentals in universeHistory)
{
    foreach (Fundamental fundamental in fundamentals)
    {
        Console.WriteLine($"{fundamental.Symbol} market cap at {fundamental.EndTime}: {fundamental.MarketCap}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (universe_symbol, time), fundamentals in universe_history.items():
    for fundamental in fundamentals:
        print(f"{fundamental.symbol} market cap at {fundamental.end_time}: {fundamental.market_cap}")

For more information about historical US Equity fundamental data, see Equity Fundamental Data .

Example Applications

The US Equity Coarse Universe dataset enables you to accurately design a universe of US Equities. Examples include the following strategies:

For more example algorithms, see Examples .

 

QuantConnect

US Equity Security Master

Introduction

The US Equity Security Master dataset by QuantConnect tracks US Equity corporate actions, including splits, dividends, delistings, mergers, and ticker changes through history. The data covers approximately 27,500 US Equities, starts in January 1998, and is delivered on a daily update frequency. You can easily download and install the dataset with the LEAN CLI so it's ready to use by LEAN. LEAN automatically handles all corporate actions and passes them into your algorithm as events .

For more information about the US Equity Security Master dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.

Data Summary

Data is delivered as a daily updated zip archive of map and factor files. The data is designed to be used in the LEAN Engine and cannot be consumed another way. The following table shows the dataset properties:

Property Value
Start Date January 1998
Data Points Splits, Dividends, Mergers, IPO, & Delistings
Asset Coverage 27,500 US Equities
Resolution Daily
Timezone New York

Getting Started

You don't need any special code to utilize the US Equity Security Master. It automatically loads when you request US Equities data .

Example Applications

The US Security Master enables you to accurately design strategies harnessing any core corporate actions. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Equity Security Master dataset provides Split , Dividend , Delisting , and SymbolChangedEvent objects.

Split Attributes

When a split or merger occurs, we pass the previous Symbol data into your algorithm. Split objects have the following attributes:

Dividend Attributes

Dividend events are triggered on the payment date. Dividend objects have the following attributes:

Delisting Attributes

When a security is delisted, we notify your algorithm. Delisting objects have the following attributes:

SymbolChangedEvent Attributes

When a security changes their ticker, we notify your algorithm. SymbolChangedEvent objects have the following attributes:

Supported Assets

To view the supported assets in the US Equity Security Master dataset, see the Data Explorer .

Accessing Splits

To get the current split data, index the Splits splits property of the current Slice with the Equity Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.splits.contains_key(self._symbol):
        split = slice.splits[self._symbol]
        split_type = {0: "Warning", 1: "SplitOccurred"}.get(split.type)
        self.log(f"Split: {split.symbol}\t{split.split_factor}\t{split.reference_price}\t{split_type}")
public override void OnData(Slice slice)
{
    if (slice.Splits.ContainsKey(_symbol))
    {
        var split = slice.Splits[_symbol];
        Log($"Split: {split.Symbol}\t{split.SplitFactor}\t{split.ReferencePrice}\t{split.Type}");
    }
}

For more information about accessing splits, see Splits .

Accessing Dividends

To get the current dividend data, index the Dividends dividends property of the current Slice with the Equity Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.dividends.contains_key(self._symbol):
        dividend = slice.dividends[self._symbol]
        self.log(f'Dividend: {dividend.symbol}\t{dividend.distribution}\t{dividend.reference_price}')
public override void OnData(Slice slice)
{
    if (slice.Dividends.ContainsKey(_symbol))
    {
        var dividend = slice.Dividends[_symbol];
        Log($"Dividend: {dividend.Symbol}\t{dividend.Distribution}\t{dividend.ReferencePrice}");
    }
}

For more information about accessing dividends, see Dividends .

Accessing Delistings

To get the current Delistings data, index the Delistings delistings property of the current Slice with the Equity Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.delistings.contains_key(self._symbol):
        delisting = slice.delistings[self._symbol]
        delisting_type = {0: "Warning", 1: "Delisted"}.get(delisting.type)
        self.log(f'Delistings: {delisting_type}')
public override void OnData(Slice slice)
{
    if (slice.Delistings.ContainsKey(_symbol))
    {
        var delisting = slice.Delistings[_symbol];
        Log($"Delistings: {delisting.Type}");
    }
}

For more information about accessing delistings, see Delistings .

Accessing Symbol Change Events

To get the current Symbol change events, index the SymbolChangedEvents symbol_changed_events property of the current Slice with the Equity Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.symbol_changed_events.contains_key(self._symbol):
        symbol_changed_event = slice.symbol_changed_events[self._symbol]
        self.log(f"Symbol changed: {symbol_changed_event.old_symbol} -> {symbol_changed_event.new_symbol}")
public override void OnData(Slice slice){
    if (slice.SymbolChangedEvents.ContainsKey(_symbol))
    {
        var symbolChangedEvent = slice.SymbolChangedEvents[_symbol];
        Log($"Symbol changed: {symbolChangedEvent.OldSymbol} -> {symbolChangedEvent.NewSymbol}");
    }
}

For more information about accessing Symbol change events, see Symbol Changes .

Live Trading Considerations

In backtesting, corporate actions occurs at midnight (ET). In live trading, the live data for corporate actions arrives at 6/7 AM ET, so that's when they occur.

Example Applications

The US Security Master enables you to accurately design strategies harnessing any core corporate actions. Examples include the following strategies:

For more example algorithms, see Examples .

 

QuantConnect

US Futures Security Master

Introduction

The US Futures Security Master dataset by QuantConnect provides mapping reference data for the most liquid contracts of the CME Group exchanges, calculated with popular rolling techniques. The data covers 162 root Future contracts, starts in 2012, and is delivered on a daily frequency with a zip file with all the contract mappings. This dataset is created by daily processing of the US historical Future chains.

This dataset, paired with the US Futures dataset, supports the following rolling techniques: ForwardPanamaCanal, BackwardsPanamaCanal, and Backwards Ratio. You can set the specific rolling date to occur on the LastTradingDay, FirstDayMonth, or the day when the contract with the greatest OpenInterest changes.

This is not the underlying Futures data ( US Futures dataset), which you need to purchase separately with a license from AlgoSeek. This security master dataset is required to purchase the US Futures dataset.

For more information about the US Futures Security Master dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.

Getting Started

You don't need any special code to utilize the US Futures Security Master. It automatically loads when you request US Futures data .

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2012
Asset Coverage 162 Liquid Futures
Data Density Regular
Resolution Daily

Example Applications

The US Futures Security Master enables you to design strategies harnessing continuous Futures contracts. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Futures Security Master dataset provides SymbolChangedEvent objects, which have the following attributes:

Supported Assets

The following list shows the available (162) Futures:

Key Concept

The US Futures Security Master lets you to construct continuous Futures, allowing the access of normalized historical data of the underlying assets, as well as trading the “lead” Future contracts for those assets.

Continuous Futures refer to sets of rolling lead Future contracts during their actively trading periods. Since Future contracts expire at their maturities, to analyze the historical price of a Future and to apply technical indicators, you need the continuous Future price series.

To access the continuous Future, use the Future's Symbol symbol property.

future = self.add_future(Futures.Energies.CrudeOilWTI,
    dataNormalizationMode = DataNormalizationMode.BACKWARDS_RATIO,
    dataMappingMode = DataMappingMode.OPEN_INTEREST,
    contractDepthOffset = 0)
self.continuous_contract_symbol = future.symbol
var future = AddFuture(Futures.Energies.CrudeOilWTI,
    dataNormalizationMode: DataNormalizationMode.BackwardsRatio,
    dataMappingMode: DataMappingMode.OpenInterest,
    contractDepthOffset: 0
);
_continuousFutureSymbol = future.Symbol;

The dataNormalizationMode and dataMappingMode arguments makes the transition of the underlying contracts seemless. However, the Future Symbol doesn't map to an underlying Future contract. It works fine to trade within backtests, but could be subjected to friction costs during live trading since the order price could be a normalized price. For more information about this topic, see the Live Trading Considerations section.

Data Normalization Modes

The data normalization mode defines how the price series of two contracts are stitched together when the contract rollovers occur. The DataNormalizatoinMode enumeration has the following members available for continuous contracts:

If you use a data normalization mode that's not in the preceding list, LEAN automatically converts it to DataNormalizationMode.BackwardsRatio .

Data Mapping Modes

The data mapping mode defines when contract rollovers occur. The DataMappingMode enumeration has the following members:

Tracking Contract Changes

As the contracts roll over, the Mapped mapped property of the Future object references the next contract in the series and you receive a SymbolChangedEvent . To get the current Symbol change events, index the SymbolChangedEvents symbol_changed_events property of the current Slice with the continuous Futures Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your Future at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    changed_event = slice.symbol_changed_events.get(self.continuous_future_symbol)
    if changed_event:
        old_symbol = changed_event.old_symbol
        new_symbol = changed_event.new_symbol
        tag = f"Rollover - Symbol changed at {self.time}: {old_symbol} -> {new_symbol}"
        quantity = self.portfolio[old_symbol].quantity

        # Rolling over: to liquidate any position of the old mapped contract and switch to the newly mapped contract
        self.liquidate(old_symbol, tag = tag)
        if quantity != 0: self.market_order(new_symbol, quantity, tag = tag)
        self.log(tag)
public override void OnData(Slice slice)
{
    if (slice.SymbolChangedEvents.TryGetValue(_continuousFutureSymbol, out var changedEvent))
    {
        var oldSymbol = changedEvent.OldSymbol;
        var newSymbol = changedEvent.NewSymbol;
        var tag = $"Rollover - Symbol changed at {Time}: {oldSymbol} -> {newSymbol}";
        var quantity = Portfolio[oldSymbol].Quantity;
        // Rolling over: to liquidate any position of the old mapped contract and switch to the newly mapped contract
        Liquidate(oldSymbol, tag: tag);
        if (quantity != 0) MarketOrder(newSymbol, quantity, tag: tag);
        Log(tag);
    }
}

SymbolChangedEvent objects have the following attributes:

Live Trading Considerations

You can trade continuous Futures, but the continuous Future Symbol doesn't map to a single underlying Future contract. Instead, it represents a set of rolling contracts. Thus, the prices could be frictional during a contract rollover, which could be catastrophic in live trading! For live trading, you should place your orders directly on the underlying contracts. To get the current underlying contract in the continuous Future series, use the Mapped mapped property.

current_contract = self.continuous_contract.mapped
self.buy(current_contract, 1)
var currentContract = _continuousContract.Mapped;
Buy(currentContract, 1);

Data Format

If you download the files in the US Futures Security Master, you get a factor file and a map file for each of the exchanges with supported continuous Futures. To view the files, see the \data\future\<exchange_name> directory under your LEAN CLI base directory.

For the factor file, it is a .zip collection of REST API styled .csv files for each Future Symbol , including the date, scaling factors for each type of data normalization and the data mapping mode that indicates the Symbol changing event is on that day for that mapping mode. The following line is an example line in the .csv file:

{"Date":"2009-10-31T00:00:00","BackwardsRatioScale":[0.9914163090128755364806866953,1.0,1.0],"BackwardsPanamaCanalScale":[-2.0,0.0,0.0],"ForwardPanamaCanalScale":[0.0,0.0,0.0],"DataMappingMode":1}

For the map file, it is a .zip collection of .csv files for each Future Symbol , including the date, new underlying contract Symbol, the exchange code, and the data mapping mode that indicates the Symbol changing event is on that day for that mapping mode. The following line is an example line in the .csv file:

20091130,aw uii3j0m6zbj9,CBOT,1

Example Applications

The US Futures Security Master enables you to design strategies harnessing continuous Futures contracts. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

AlgoSeek

AlgoSeek is a leading historical intraday US market data provider offering the most comprehensive and detailed market data and analytics products in the financial industry covering Equities, Futures, Options, cash FOREX, and Cryptocurrencies. AlgoSeek data is built for quantitative trading and machine learning. For more information about AlgoSeek, visit algoseek.com .

 

AlgoSeek

US Equities

Introduction

The US Equities dataset by AlgoSeek is survivorship bias-free daily coverage of every stock traded in the US Securities Information Processors (SIP) CTA/UTP feed since 1998. The dataset covers approximately 27,500 securities, starts in January 1998, and is delivered in any resolution from tick to daily. The Data is collected from the full SIP feed via our Equinix co-located servers, including all trades and quotes published to every exchange as well as FINRA. Over-the-Counter (OTC) trades are not included.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the US Equities dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

AlgoSeek is a leading historical intraday US market data provider offering the most comprehensive and detailed market data and analytics products in the financial industry covering Equities, Futures, Options, cash FOREX, and Cryptocurrencies. AlgoSeek data is built for quantitative trading and machine learning. For more information about AlgoSeek, visit algoseek.com .

Getting Started

AlgoSeek is the default US Equities dataset on QuantConnect. The following snippet demonstrates how to request data from the US Equities dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
_aapl = AddEquity("AAPL", Resolution.Daily).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 1998
Asset Coverage 27,500 US Equities
Data Density Dense
Resolution Tick, Second, Minute, Hourly, & Daily
Timezone New York
Market Hours Regular and Extended

Example Applications

The US Equities dataset enables you to accurately design Equity trading strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Equities dataset provides TradeBar , QuoteBar , and Tick objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

Supported Assets

To view the supported assets in the US Equities dataset, see the Data Explorer .

Requesting Data

To add US Equities data to your algorithm, call the AddEquity add_equity method. Save a reference to the Equity Symbol so you can access the data later in your algorithm.

class USEquityDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2018, 1, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000) 
        self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
namespace QuantConnect
{
    public class USEquityDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol; 
    	
        public override void Initialize()
        {
            SetStartDate(2018, 1, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
            _aapl = AddEquity("AAPL", Resolution.Minute).Symbol;
        }
    }
}

For more information about creating US Equity subscriptions, see Requesting Data or US Equity Universes .

Accessing Data

To get the current US Equities data, index the Bars bars , QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Equity Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.aapl in slice.bars:
        trade_bar = slice.bars[self.aapl]
        self.log(f"{self.aapl} close at {slice.time}: {trade_bar.close}")

    if self.aapl in slice.quote_bars:
        quote_bar = slice.quote_bars[self.aapl]
        self.log(f"{self.aapl} bid at {slice.time}: {quote_bar.bid.close}")

    if self.aapl in slice.ticks:
        ticks = slice.ticks[self.aapl]
        for tick in ticks:
            self.log(f"{self.aapl} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

     for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing US Equities data, see Handling Data .

Historical Data

To get historical US Equity data, call the History history method with the Equity Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.aapl, 100, Resolution.DAILY)

# TradeBar objects
history_trade_bars = self.history[TradeBar](self.aapl, 100, Resolution.DAILY)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.aapl, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.aapl, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects 
var historyTradeBars = History(_symbol, 100, Resolution.Daily);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Universe Selection

To select a universe of US Equities, see Equity Universes .

Remove Subscriptions

To unsubscribe from a US Equity that you added with the AddEquity add_equity method, call the RemoveSecurity remove_security method.

self.remove_security(self.aapl)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings.

Example Applications

The US Equities dataset enables you to accurately design Equity trading strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

AlgoSeek

US Equity Options

Introduction

The US Equity Options data by AlgoSeek provides Option data, including prices, strikes, expires, implied volatility, and Greeks. The data covers 4,000 Symbols, starts in January 2012, and is delivered on a minute frequency. This dataset is created by monitoring Options Price Reporting Authority (OPRA) data feed, which consolidates last sale and quotation information originating from the national securities exchanges that have been approved by the Securities and Exchange Commission.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes of the underlying security.

For more information about the US Equity Options dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

AlgoSeek was in 2014 with the goal of providing the highest quality, most accurate, ready-to-use data in the financial data industry. AlgoSeek provides access to Equities, ETFs, ETNs, Equity Indices, Equity Options, Futures, and Future Options for quantitative firms and traders.

Getting Started

The following snippet demonstrates how to request data from the US Equity Options dataset:

option = self.add_option("GOOG")
self.option_symbol = option.symbol
option.set_filter(-2, +2, 0, 180)
var option = AddOption("GOOG");
_optionSymbol = option.Symbol;
option.SetFilter(-2, +2, 0, 180);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2012*
Asset Coverage 4,000 Symbols
Data Density Dense
Resolution Minute, Hourly, & Daily
Timezone New York
Market Hours Regular Only

* Some data is available before this date. In 2012, AlgoSeek started to fetch data from 48 OPRA channels instead of 24, increasing the quality of the data.

Example Applications

The US Equity Options dataset enables you to accurately design Option strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Equity Options dataset provides TradeBar , QuoteBar , and OpenInterest objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

OpenInterest Attributes

OpenInterest objects have the following attributes:

Supported Assets

To view the supported assets in the US Equity Options dataset, see the Data Explorer .

Requesting Data

To add US Equity Options data to your algorithm, call the AddOption add_option method. Save a reference to the Equity Option Symbol so you can access the data later in your algorithm.

class USEquityOptionsDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        option = self.add_option("GOOG")
        self.option_symbol = option.symbol
        # Set our strike/expiry filter for this option chain
        option.set_filter(-2, +2, 0, 180)
namespace QuantConnect
{
    public class USEquityOptionsDataAlgorithm : QCAlgorithm
    {
        private Symbol _optionSymbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
            UniverseSettings.Asynchronous = True;
            // Requesting data
            var option = AddOption("GOOG");
            _optionSymbol = option.Symbol;
            // Set our strike/expiry filter for this option chain
            option.SetFilter(-2, +2, 0, 180);
        }
    }
}

The Equity resolution must be less than or equal to the Equity Option resolution. For example, if you set the Equity resolution to minute, then you must set the Equity Option resolution to minute, hour, or daily.

For more information about creating US Equity Option subscriptions, see Requesting Data or Equity Options Universes .

Accessing Data

To get the current US Equity Options data, index the OptionChains option_chains property of the current Slice with the canonical Equity Option Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your Index Option at every time step. To avoid issues, call the Get get method.

def on_data(self, slice: Slice) -> None:
    chain = slice.option_chains.get(self.option_symbol)
    if chain:
        for contract in chain:
            self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice)
{
    if (slice.OptionChains.ContainsKey(_optionSymbol))
    {
        var chain = slice.OptionChains[_optionSymbol];
        foreach (var contract in chain)
        {
            Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}");
        }
    }
}

You can also iterate through all of the OptionChain objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for canonical_symbol, chain in slice.option_chains.items():
        for contract in chain:
            self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.OptionChains)
    {
        var canonicalSymbol = kvp.Key;
        var chain = kvp.Value;
        foreach (var contract in chain)
        {
            Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}");
        }
    }
}

For more information about accessing US Equity Options data, see Handling Data .

Historical Data

You can get historical US Equity Options data in an algorithm and the Research Environment.

Historical Data In Algorithms

To get historical US Equity Options data in an algorithm, call the History history method with the Equity Option contract Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(contract.symbol, 100, Resolution.MINUTE)

# TradeBar objects
history_trade_bars = self.history[TradeBar](contract.symbol, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](contract.symbol, 100, Resolution.MINUTE)
// TradeBar objects 
var historyTradeBars = History(contract.Symbol, 100, Resolution.Minute);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(contract.Symbol, 100, Resolution.Minute);

For more information about historical data in algorithms, see History Requests .

Historical Data In Research

To get historical US Equity Options data in the Research Environment for an entire Option chain, call the OptionHistory option_history method with the canonical Option Symbol .

qb = QuantBook()
option = qb.add_option("GOOG") 
option.set_filter(-2, 2, 0, 90)
history = qb.option_history(option.symbol, datetime(2020, 6, 1), datetime(2020, 6, 5))

all_history = history.get_all_data()
expiries = history.get_expiry_dates() 
strikes = history.get_strikes()
var qb = new QuantBook();
var option = qb.AddOption("GOOG");
option.SetFilter(-2, 2, 0, 90);
var history = qb.OptionHistory(option.Symbol, new DateTime(2020, 6, 1), new DateTime(2020, 6, 5));

var contracts = history.SelectMany(x => x.OptionChains.SelectMany(y => y.Value.Contracts.Keys)).Distinct().ToList();
var expiries = contracts.Select(x => x.ID.Date).Distinct().ToList();
var strikes = contracts.Select(x => x.ID.StrikePrice).Distinct().ToList();

To get historical data for a single US Equity Option contract, call the History history method like you would in an algorithm but on the QuantBook object. For more information about historical data in the Research Environment, see Equity Options .

Example Applications

The US Equity Options dataset enables you to accurately design Option strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

AlgoSeek

US Future Options

Introduction

The US Future Options dataset by AlgoSeek provides Option data on US Future contracts, including prices, strikes, expires, implied volatility, and Greeks. The data covers 15 Monthly Future contracts, starts in January 2012, and is delivered on a minute frequency. This dataset is created by monitoring the trading activity on the CME, CBOT, NYMEX, and COMEX markets.

For more information about the US Future Options dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

AlgoSeek is a leading historical intraday US market data provider offering the most comprehensive and detailed market data and analytics products in the financial industry covering equities, futures, options, cash forex, and cryptocurrencies. AlgoSeek data is built for quantitative trading and machine learning. For more information about AlgoSeek, visit algoseek.com .

Getting Started

The following snippet demonstrates how to request data from the US Future Options dataset:

from QuantConnect.DataSource import *

future = self.add_future(Futures.metals.gold, Resolution.MINUTE)
future.set_filter(0, 90)
self.add_future_option(future.symbol, lambda universe: universe.strikes(-5, +5))
using QuantConnect.DataSource;

var future = AddFuture(Futures.Metals.Gold, Resolution.Minute);
future.SetFilter(0, 90);
AddFutureOption(future.Symbol, universe => universe.Strikes(-5, +5));

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2012
Asset Coverage 15 Monthly Future Contracts. Standard expires only*.
Data Density Dense
Resolution Minute, Hourly, & Daily
Timezone New York
Market Hours Regular and Extended
* No weeklies or 0DTE contracts.

Example Applications

The US Future Options dataset enables you to accurately design Future Option strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Future Options dataset provides TradeBar , QuoteBar , and OpenInterest objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

OpenInterest Attributes

OpenInterest objects have the following attributes:

Supported Assets

The following list shows the available (15) Futures Options:

Requesting Data

To add US Future Options data to your algorithm, call the AddFutureOption add_future_option method.

class FutureOptionDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 1, 28)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)
        self.universe_settings.asynchronous = True
        future = self.add_future(Futures.metals.gold, Resolution.MINUTE)
        future.set_filter(0, 90)
        self.add_future_option(future.symbol, lambda universe: universe.strikes(-5, +5))
namespace QuantConnect
{
    public class FutureOptionDataAlgorithm : QCAlgorithm
    {
        public override void Initialize()
        {
            SetStartDate(2020, 1, 28);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            UniverseSettings.Asynchronous = True;
            var future = AddFuture(Futures.Metals.Gold, Resolution.Minute);
            future.SetFilter(0, 90);
            AddFutureOption(future.Symbol, universe => universe.Strikes(-5, +5));
        }
    }
}

The Future resolution must be less than or equal to the Future Option resolution. For example, if you set the Future resolution to minute, then the Future Option resolution must be minute, hour, or daily.

For more information about creating Future Options subscriptions, see Requesting Data or Future Options Universes .

Accessing Data

To get the current Future Options data, iterate through the OptionChains option_chains of the current Slice . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your Future Options at every time step.

def on_data(self, slice: Slice) -> None:
    for canonical_fop_symbol, chain in slice.option_chains.items():
        for contract in chain:
            self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.OptionChains)
    {
        var canonicalFOPSymbol = kvp.Key;
        var chain = kvp.Value;
        foreach (var contract in chain)
        {
            Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}");
        }
    }
}

You can also iterate through the FuturesChains futures_chains in the current Slice first.

def on_data(self, slice: Slice) -> None:
    for continuous_future_symbol, futures_chain in slice.futures_chains.items():
        # Select a Future Contract and create its canonical FOP Symbol
        futures_contract = [contract for contract in futures_chain][0]
        canonical_fop_symbol = Symbol.create_canonical_option(futures_contract.symbol)
        option_chain = slice.option_chains.get(canonical_fop_symbol)
        if option_chain:
            for fop_contract in option_chain:
                 self.log(f"{fop_contract.symbol} price at {slice.time}: {fop_contract.last_price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.FuturesChains)
    {
        var continuousContractSymbol = kvp.Key;
        var futuresChain = kvp.Value;
        
        // Select a Future Contract and create its canonical FOP Symbol
        var futuresContract = futuresChain.First();
        var canonicalFOPSymbol = QuantConnect.Symbol.CreateCanonicalOption(futuresContract.Symbol);
        if (slice.OptionChains.TryGetValue(canonicalFOPSymbol, out var optionChain))
        {
            foreach (var fopContract in optionChain)
            {
                Log($"{fopContract.Symbol} price at {slice.Time}: {fopContract.LastPrice}");
            }
        }
    }
}

For more information about accessing Future Options data, see Handling Data .

Historical Data

You can get historical US Future Options data in an algorithm and the Research Environment.

Historical Data In Algorithms

To get historical US Future Options data in an algorithm, call the History history method with the Future Option contract Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(contract.symbol, 100, Resolution.MINUTE)

# TradeBar objects
history_trade_bars = self.history[TradeBar](contract.symbol, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](contract.symbol, 100, Resolution.MINUTE)
// TradeBar objects 
var historyTradeBars = History(contract.Symbol, 100, Resolution.Minute);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(contract.Symbol, 100, Resolution.Minute);

For more information about historical data in algorithms, see History Requests .

Historical Data In Research

To get historical US Future Options data in the Research Environment for the entire Option chain of a Futures contract, call the OptionHistory option_history method with the Futures contract Symbol .

qb = QuantBook()
future = qb.add_future(Futures.indices.SP500EMini, Resolution.MINUTE)
future_symbols = qb.future_chain_provider.get_future_contract_list(future.symbol, datetime(2021, 12, 20))
future_contract_symbol = sorted(future_symbols, key=lambda s: s.id.date)[0]

start_time = datetime(2021, 12, 1)
end_time = datetime(2021, 12, 10)
option_history = qb.option_history(future_contract_symbol, start_time, end_time, Resolution.MINUTE)

all_history = option_history.get_all_data()
expiries = option_history.get_expiry_dates() 
strikes = option_history.get_strikes()
var qb = new QuantBook();
var future = qb.AddFuture(Futures.Indices.SP500EMini, Resolution.Minute);
var futureSymbols = qb.FutureChainProvider.GetFutureContractList(future.Symbol, new DateTime(2021, 12, 20));
var futureContractSymbol = futureSymbols.OrderBy(x => x.ID.Date).First();
    
var startTime = new DateTime(2021, 12, 1);
var endTime = new DateTime(2021, 12, 10);
var optionHistory = qb.OptionHistory(futureContractSymbol, startTime, endTime, Resolution.Minute);

var contracts = optionHistory.SelectMany(x => x.OptionChains.SelectMany(y => y.Value.Contracts.Keys)).Distinct().ToList();
var expiries = contracts.Select(x => x.ID.Date).Distinct().ToList();
var strikes = contracts.Select(x => x.ID.StrikePrice).Distinct().ToList();

To get historical data for a single US Future Option contract, call the History history method like you would in an algorithm but on the QuantBook object. For more information about historical data in the Research Environment, see Futures Options .

Example Applications

The US Future Options dataset enables you to accurately design Future Option strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

AlgoSeek

US Futures

Introduction

The US Futures dataset by AlgoSeek provides Futures data, including price, volume, open interest, and expiry. The data covers the 162 most liquid contracts, starts in May 2009, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on the CFE, CBOT, CME, COMEX, NYMEX, and ICE* markets.

This dataset does not include ICE Futures, except for Sugar until July 2021.

For more information about the US Futures dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

AlgoSeek is a leading historical intraday US market data provider offering the most comprehensive and detailed market data and analytics products in the financial industry covering equities, futures, options, cash forex, and cryptocurrencies. AlgoSeek data is built for quantitative trading and machine learning. For more information about AlgoSeek, visit algoseek.com .

Getting Started

The following snippet demonstrates how to request data from the US Futures dataset:

future = self.add_future(Futures.Metals.GOLD)
future.set_filter(0, 90)
var future = AddFuture(Futures.Metals.Gold);
future.SetFilter(0, 90);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date May 2009
Asset Coverage 162 Futures
Data Density Dense
Resolution Tick, Second, Minute, Hour, & Daily
Timezone
  • Chicago (CFE, CME or CBOT)
  • New York (NYMEX or COMEX)
Market Hours Regular and Extended

This dataset includes Sugar ICE Futures until July 2021.

Volume Discrepancies

The volume of the daily trade bars from this dataset is different from the daily volume that CME and other platforms like Yahoo Finance report because the CME includes pit trades in their daily volume calculation. In contrast, the volume of the daily trade bars in this dataset (from AlgoSeek) doesn't include pit trades because pit trades are over-the-counter, which algorithms can't trade.

Another discrepancy occurs from the start and end times of the daily bars. Daily bars from the CME and Yahoo Finance span from 5 PM Central Time (CT) to 4 PM CT on the following day. In contrast, QuantConnect consolidates daily bars from from 12 AM CT to 12 AM CT the following day. Therefore, to calculate the daily volume in the same way that CME does (excluding the pit trades), sum the volume of intraday bars that span 5 PM CT to 4 PM CT on the following day.

Example Applications

The US Futures dataset enables you to accurately design Futures strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Futures dataset provides FuturesChain , Future , and OpenInterest objects. To configure the continuous Future settings, use the DataNormalizationMode and DataMappingMode enumerations.

DataNormalizationMode Values

The DataNormalizationMode enumeration has the following values:

DataMappingMode Values

The DataMappingMode enumeration has the following values:

Future Attributes

Future objects have the following attributes:

FuturesChain Attributes

FuturesChain objects have the following attributes:

OpenInterest Attributes

OpenInterest objects have the following attributes:

Supported Assets

The following list shows the available (162) Futures:

Requesting Data

To add US Futures data to your algorithm, call the AddFuture add_future method. Save a reference to the Future so you can access the data later in your algorithm.

class USFuturesDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2013, 12, 20) 
        self.set_end_date(2014, 2, 20) 
        self.set_cash(1000000) 
        self.universe_settings.asynchronous = True
        future = self.add_future(Futures.Metals.GOLD) 
        future.set_filter(0, 90)
        self.future_symbol = future.symbol
namespace QuantConnect
{
    public class USFuturesDataAlgorithm : QCAlgorithm
    {
        private Symbol _futureSymbol;
        
        public override void Initialize()
        {
            SetStartDate(2013, 12, 20);
            SetEndDate(2014, 2, 20);
            SetCash(1000000);
            UniverseSettings.Asynchronous = True;
            var future = AddFuture(Futures.Metals.Gold);
            future.SetFilter(0, 90);
            _futureSymbol = future.Symbol;
        }
    }
}

For more information about creating Future subscriptions, see Requesting Data or Futures Universes .

Accessing Data

To get the current US Futures data, index the FuturesChains futures_chains property of the current Slice with the canonical Futures Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your Future at every time step.

def on_data(self, slice: Slice) -> None:
    chain = slice.futures_chains.get(self.future_symbol)
    if chain:
        for contract in chain:
            self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice)
{
    if (slice.FuturesChains.TryGetValue(_futureSymbol, out var chain))
    {
        foreach (var contract in chain)
        {
            Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}");
        }
    }
}

You can also iterate through all of the FuturesChain objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for canonical_symbol, chain in slice.futures_chains.items():
        for contract in chain:
            self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.FuturesChains)
    {
        var canonicalSymbol = kvp.Key;
        var chain = kvp.Value;
        foreach (var contract in chain)
        {
            Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}");
        }
    }
}

For more information about accessing Futures data, see Handling Data .

Historical Data

You can get historical US Futures data in an algorithm and the Research Environment.

Historical Data In Algorithms

To get historical US Futures data in an algorithm, call the History history method with the canonical Futures Symbol or a Futures contract Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame objects
contract_history_df = self.history(contract.symbol, 100, Resolution.MINUTE)
continuous_history_df = self.history(self.future_symbol,
    start=self.time - timedelta(days=15), 
    end=self.time, 
    resolution=Resolution.MINUTE, 
    fill_forward=False, 
    extended_market_hours=False,
    data_mapping_mode=DataMappingMode.OPEN_INTEREST, 
    data_normalization_mode=DataNormalizationMode.RAW, 
    contract_depth_offset=0)

# TradeBar objects
contract_history_trade_bars = self.history[TradeBar](contract.symbol, 100, Resolution.MINUTE)
continous_history_trade_bars = self.history[TradeBar](self.future_symbol, 100, Resolution.MINUTE)

# QuoteBar objects
contract_history_quote_bars = self.history[QuoteBar](contract.symbol, 100, Resolution.MINUTE)
continous_history_quote_bars = self.history[QuoteBar](self.future_symbol, 100, Resolution.MINUTE)

# Tick objects
contract_history_ticks = self.history[Tick](contract.symbol, timedelta(seconds=10), Resolution.TICK)
continous_history_ticks = self.history[Tick](self.future_symbol, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects
var contractHistoryTradeBars = History(contract.Symbol, 100, Resolution.Minute);
var continuousHistoryTradeBars = History(
    symbols: new[] {_futureSymbol}, 
    start: Time - TimeSpan.FromDays(15),
    end: Time,
    resolution: Resolution.Minute,
    fillForward: False,
    extendedMarketHours: False,
    dataMappingMode: DataMappingMode.OpenInterest,
    dataNormalizationMode: DataNormalizationMode.Raw,
    contractDepthOffset: 0);

// QuoteBar objects
var contractHistoryQuoteBars = History<QuoteBar>(contract.Symbol, 100, Resolution.Minute);
var continuousHistoryQuoteBars = History<QuoteBar>(_futureSymbol, 100, Resolution.Minute);

// Tick objects
var contractHistoryTicks = History<Tick>(contract.Symbol, TimeSpan.FromSeconds(10), Resolution.Tick);
var continuousHistoryTicks = History<Tick>(_futureSymbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data in algorithms, see History Requests . For more information about the price adjustments for continuous contracts, see Continous Contracts .

Historical Data In Research

To get historical US Futures data in the Research Environment for an entire Futures chain, call the FutureHistory future_history method with the canonical Future Symbol .

qb = QuantBook()
future = qb.add_future(Futures.Metals.GOLD) 
future.set_filter(0, 90)
history = qb.future_history(future.symbol, datetime(2020, 6, 1), datetime(2020, 6, 5))

all_history = history.get_all_data()
expiries = history.get_expiry_dates()
var qb = new QuantBook();
var future = qb.AddFuture(Futures.Metals.Gold);
future.SetFilter(0, 90);
var history = qb.FutureHistory(future.Symbol, new DateTime(2020, 6, 1), new DateTime(2020, 6, 5));
    
var contracts = history.SelectMany(x => x.OptionChains.SelectMany(y => y.Value.Contracts.Keys)).Distinct().ToList();
var expiries = contracts.Select(x => x.ID.Date).Distinct().ToList();

To get historical data for a single US Futures contract or the continuous Futures contract, call the History history method like you would in an algorithm but on the QuantBook object. For more information about historical data in the Research Environment, see Futures .

Example Applications

The US Futures dataset enables you to accurately design Futures strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

AlgoSeek

US Index Options

Introduction

The US Index Options dataset by AlgoSeek covers European Option contracts for 3 US Indices: SPX, VIX, and NDX. The dataset starts from January 2012 and is delivered on minute resolution. This dataset is created by monitoring the Options Price Reporting Authority (OPRA) data feed, which consolidates last sale and quotation information originating from the national securities exchanges that have been approved by the Securities and Exchange Commission.

For more information about the US Index Options dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

AlgoSeek is a leading historical intraday US market data provider offering the most comprehensive and detailed market data and analytics products in the financial industry covering Equities, Futures, Options, cash FOREX, and Cryptocurrencies. AlgoSeek data is built for quantitative trading and machine learning. For more information about AlgoSeek, visit algoseek.com .

Getting Started

The following snippet demonstrates how to request data from the US Index Options dataset:

from QuantConnect.DataSource import *

self.index_symbol = self.add_index('VIX').symbol
option = self.add_index_option(self.index_symbol)
option.set_filter(-2, 2, 0, 90)
self.option_symbol = option.symbol
using QuantConnect.DataSource;

_indexSymbol = AddIndex("VIX").Symbol;
var option = AddIndexOption(_indexSymbol);
option.SetFilter(-2, 2, 0, 90);
_optionSymbol = option.Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2012
Asset Coverage 7 Index Options
Data Density Regular
Resolution Minute, Hourly, & Daily
Timezone New York
Market Hours Regular Only

Specification Over Time

According to the SPX Options contract specification , some SPX contracts expire every month and SPXW contracts expires every day. Before 2021, you could only trade SPX contracts with the following expiration dates:

During this time, SPXW didn't have 0DTE every day.

Sources :
- Cboe Options Exchange to List Three Long-Dated SPX Options Expirations, Beginning November 1, 2021
- S&P 500 Weekly Options Now Expire Five Days a Week

Example Applications

The US Index Options dataset enables you to accurately design strategies for Index Options. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Index Options dataset provides TradeBar and QuoteBar objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Supported Assets

The following table shows the available Index Options:

Underlying Index Underlying Ticker Target Ticker Standard Contracts Weekly Contracts Tradable on Expiry Day
S&P500 VIX green check
S&P500 VIX VIXW green check
S&P500 SPX green check
S&P500 SPX SPXW green check green check
NASDAQ-100 NDX green check
NASDAQ-100 NDX NDXP green check green check
NASDAQ-100 NDX NQX green check green check green check

For more information about each underlying Index, see Supported Indices .

Requesting Data

To add US Index Options data to your algorithm, call the AddIndexOption add_index_option method. Save a reference to the Index Option Symbol so you can access the data later in your algorithm.

class IndexOptionsDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2021, 1, 1);
        self.set_end_date(2021, 6, 1);
        self.set_cash(1000000);
        self.universe_settings.asynchronous = True
        self.index_symbol = self.add_index('VIX').symbol
        
        standard_option = self.add_index_option(self.index_symbol)
        standard_option.set_filter(-2, 2, 0, 90)
        self.standard_option_symbol = standard_option.symbol

        weekly_option = self.add_index_option(self.index_symbol, "VIXW")
        weekly_option.set_filter(-2, 2, 0, 90)
        self.weekly_option_symbol = weekly_option.symbol
namespace QuantConnect
{
    public class IndexOptionsDataAlgorithm : QCAlgorithm
    {
    	private Symbol _indexSymbol, _standardOptionSymbol, _weeklyOptionSymbol;

        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
            UniverseSettings.Asynchronous = True;
            _indexSymbol = AddIndex("VIX").Symbol;

            var standardOption = AddIndexOption(_indexSymbol);
            standardOption.SetFilter(-2, 2, 0, 90);
            _standardOptionSymbol = standardOption.Symbol;

            var weeklyOption = AddIndexOption(_indexSymbol, "VIXW");
            weeklyOption.SetFilter(-2, 2, 0, 90);
            _weeklyOptionSymbol = weeklyOption.Symbol;
        }
    }
}

The Index resolution must be less than or equal to the Index Option resolution. For example, if you set the Index resolution to minute, then you must set the Index Option resolution to minute, hour, or daily.

For more information about creating US Index Option subscriptions, see Requesting Data or Index Options Universes .

Accessing Data

To get the current US Index Options data, index the OptionChains option_chains property of the current Slice with the canonical Index Option Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your Index Option at every time step.

def on_data(self, slice: Slice) -> None:
    standard_chain = slice.option_chains.get(self.standard_option_symbol)
    if standard_chain:
        for contract in standard_chain:
            self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")

    weekly_chain = slice.option_chains.get(self.weekly_option_symbol)
    if weekly_chain:
        for contract in weekly_chain:
            self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice)
{
    if (slice.OptionChains.ContainsKey(_standardOptionSymbol))
    {
        var standardChain = slice.OptionChains[_standardOptionSymbol];
        foreach (var contract in standardChain)
        {
            Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}");
        }
    }

    if (slice.OptionChains.ContainsKey(_weeklyOptionSymbol))
    {
        var weeklyChain = slice.OptionChains[_weeklyOptionSymbol];
        foreach (var contract in weeklyChain)
        {
            Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}");
        }
    }
}

You can also iterate through all of the OptionChain objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for canonical_symbol, chain in slice.option_chains.items():
        for contract in chain:
            self.log(f"{contract.symbol} price at {slice.time}: {contract.last_price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.OptionChains)
    {
        var canonicalSymbol = kvp.Key;
        var chain = kvp.Value;
        foreach (var contract in chain)
        {
            Log($"{contract.Symbol} price at {slice.Time}: {contract.LastPrice}");
        }
    }
}

For more information about accessing US Index Options data, see Handling Data .

Historical Data

You can get historical US Index Options data in an algorithm and the Research Environment.

Historical Data In Algorithms

To get historical US Index Options data in an algorithm, call the History history method with the Index Option contract Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(contract.symbol, 100, Resolution.MINUTE)

# TradeBar objects
history_trade_bars = self.history[TradeBar](contract.symbol, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](contract.symbol, 100, Resolution.MINUTE)
// TradeBar objects 
var historyTradeBars = History(contract.Symbol, 100, Resolution.Minute);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(contract.Symbol, 100, Resolution.Minute);

For more information about historical data in algorithms, see History Requests .

Historical Data In Research

To get historical US Index Options data in the Research Environment for an entire Option chain, call the OptionHistory option_history method with the canonical Option Symbol .

qb = QuantBook()
index_symbol = qb.add_index('VIX').symbol
option = qb.add_index_option(index_symbol) # or qb.add_index_option(index_symbol, "VIXW")
option.set_filter(-2, 2, 0, 90)
history = qb.option_history(option.symbol, datetime(2020, 6, 1), datetime(2020, 6, 5))

all_history = history.get_all_data()
expiries = history.get_expiry_dates() 
strikes = history.get_strikes()
var qb = new QuantBook();
var indexSymbol = qb.AddIndex("VIX").Symbol;
var option = qb.AddIndexOption(indexSymbol); // or qb.AddIndexOption(indexSymbol, "VIXW");
option.SetFilter(-2, 2, 0, 90);
var history = qb.OptionHistory(option.Symbol, new DateTime(2020, 6, 1), new DateTime(2020, 6, 5));

var contracts = history.SelectMany(x => x.OptionChains.SelectMany(y => y.Value.Contracts.Keys)).Distinct().ToList();
var expiries = contracts.Select(x => x.ID.Date).Distinct().ToList();
var strikes = contracts.Select(x => x.ID.StrikePrice).Distinct().ToList();

To get historical data for a single US Index Option contract, call the History history method like you would in an algorithm but on the QuantBook object. For more information about historical data in the Research Environment, see Index Options .

Example Applications

The US Index Options dataset enables you to accurately design strategies for Index Options. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Morningstar

Morningstar was founded by Joe Mansueto in 1984 with the goal of empowering investors by connecting people to the investing information and tools they need. Morningstar provides access extensive line of products and services for individual investors, financial advisors, asset managers, and retirement plan providers. Morningstar provides data on approximately 525,000 investment offerings including stocks, mutual funds, and similar vehicles, along with real-time global market data on nearly 18 million equities, indexes, futures, options, commodities, and precious metals, in addition to foreign exchange and Treasury markets. Morningstar also offers investment management services through its investment advisory subsidiaries, with $244 billion in assets under advisement or management as of 2021.

 

Morningstar

US Fundamental Data

Introduction

The US Fundamental Data by Morningstar tracks US Equity fundamentals. The data covers 8,000 US Equities, starts in January 1998, and is delivered on a daily frequency. This dataset is created by using a combination of string matching, Regular Expressions, and Machine Learning to gather the fundamental data published by companies.

For older symbols, the file date is approximated 45 days after the as of date. When a filing date is present on the Morningstar data, it is used. As we are a quant platform, all the data is loaded using "As Original Reported" figures. If there was a mistake reporting the figure, this will not be fixed later. The market typically responds quickly to these initially reported figures. Data is available for multiple periods depending on the property. Periods available include: 1 mo, 2 mo, 3 mo, 6 mo, 9 mo, 12 mo, 1 Yr, 2 Yr, 3 Yr, and 5 Yr. Morningstar symbols cover the NYSE, NASDAQ, AMEX, and BATS exchanges.

In live trading, Morningstar data is delivered to your algorithm at approximately 6 am each day. The majority of the fundamental data update occurs once per month. This includes updates to all of the key information for each security Morningstar supports. On top of this monthly update, there are daily updates of the financial ratios.

As Morningstar data arrives, it updates the master copy and is passed into your algorithm, similar to how TradeBars are fill-forwarded in your data feed. If there have been no updates for a day, you'll receive the same fundamental data.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

QuantConnect/LEAN combines the data of this dataset with US Coarse Universe data in runtime.

For more information about the US Fundamental Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Morningstar was founded by Joe Mansueto in 1984 with the goal of empowering investors by connecting people to the investing information and tools they need. Morningstar provides access extensive line of products and services for individual investors, financial advisors, asset managers, and retirement plan providers. Morningstar provides data on approximately 525,000 investment offerings including stocks, mutual funds, and similar vehicles, along with real-time global market data on nearly 18 million equities, indexes, futures, options, commodities, and precious metals, in addition to foreign exchange and Treasury markets. Morningstar also offers investment management services through its investment advisory subsidiaries, with $244 billion in assets under advisement or management as of 2021.

Getting Started

The following snippets demonstrate how to request data from the US Fundamental dataset:

equity = self.add_equity("IBM")
ibm_fundamental = equity.fundamentals
var equity = AddEquity("IBM");
var ibmFundamental = equity.Fundamentals;
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)
ibm_fundamental = self.fundamentals(ibm)
var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);
var ibmFundamental = Fundamentals(ibm);
def initialize(self) -> None:
    self._universe = self.add_universe(self.fundamental_filter_function)

def fundamental_filter_function(self, fundamental: List[Fundamental]):
    filtered = [f for f in fundamental if f.has_fundamental_data and f.price > 10 and not np.isnan(f.valuation_ratios.pe_ratio)]
    sorted_by_pe_ratio = sorted(filtered, key=lambda f: f.valuation_ratios.pe_ratio)
    return [f.symbol for f in sorted_by_pe_ratio[:10]]
public override void Initialize()
{
    _universe = AddUniverseSelection(new FundamentalUniverseSelectionModel(FundamentalFilterFunction));
}

public override List<Symbol> FundamentalFilterFunction(List<Fundamental> fundamental)
{
    return (from f in fundamental
            where f.HasFundamentalData && f.Price > 10 && !Double.IsNaN(f.ValuationRatios.PERatio)
            orderby f.ValuationRatios.PERatio
            select f.Symbol).Take(10);
}

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 1998
Asset Coverage 8,000 US Equities
Corporate Indicators / Tracked Fields 900 Fields
Data Density Sparse
Resolution Daily
Timezone New York

Example Applications

The US Fundamentals dataset enables you to design strategies harnessing fundamental data points. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Fundamentals dataset provides Fundamental objects. To filter Fundamental objects, you can use the MorningstarSectorCode , MorningstarIndustryGroupCode , and MorningstarIndustryCode enumeration values.

Fundamental Attributes

Fundamental objects have the following attributes:

MorningstarSectorCode Enumeration

Sectors are large super categories of data. To access the sector of an Equity, use the MorningstarSectorCode property.

filteredFundamentals = fundamental.Where(x =>
    x.AssetClassification.MorningstarSectorCode == MorningstarSectorCode.Technology);
filtered_fundamentals = [x for x in fundamental
    if x.AssetClassification.MorningstarSectorCode == MorningstarSectorCode.Technology]

The MorningstarSectorCode enumeration has the following members:

MorningstarIndustryGroupCode Enumeration

Industry groups are clusters of related industries that tie together. To access the industry group of an Equity, use the MorningstarIndustryGroupCode property.

filteredFundamentals = fundamental.Where(x =>
    x.AssetClassification.MorningstarIndustryGroupCode == MorningstarIndustryGroupCode.ApplicationSoftware);
filtered_fundamentals = [x for x in fundamental
    if x.AssetClassification.MorningstarIndustryGroupCode == MorningstarIndustryGroupCode.ApplicationSoftware]

The MorningstarIndustryGroupCode enumeration has the following members:

MorningstarIndustryCode Enumeration

Industries are the finest classification level available and are the individual industries according to the Morningstar classification system. To access the industry group of an Equity, use the MorningstarIndustryCode property.

filteredFundamentals = fundamental.Where(x =>
    x.AssetClassification.MorningstarIndustryCode == MorningstarIndustryCode.SoftwareApplication);
filtered_fundamentals = [x for x in fundamental
    if x.AssetClassification.MorningstarIndustryCode == MorningstarIndustryCode.SoftwareApplication]

The MorningstarIndustryCode enumeration has the following members:

Exchange ID Values

The exchange ID represents the exchange that lists the Equity. To access the exchange ID of an Equity, use the PrimaryExchangeID property.

filteredFundamentals = fundamental.Where(x =>
    x.CompanyReference.PrimaryExchangeID == "NAS");
filtered_fundamentals = [x for x in fundamental
    if x.CompanyReference.PrimaryExchangeID == "NAS"]

The exchanges are represented by the following string values:

String Representation Exchange
NYS New York Stock Exchange (NYSE)
NAS NASDAQ
ASE American Stock Exchange (AMEX)
TSE Tokyo Stock Exchange
AMS Amsterdam Internet Exchange
SGO Santiago Stock Exchange
XMAD Madrid Stock Exchange
ASX Australian Securities Exchange
BVMF B3 (stock exchange)
LON London Stock Exchange
TKS Istanbul Stock Exchange Settlement and Custody Bank
SHG Shanghai Exchange
LIM Lima Stock Exchange
FRA Frankfurt Stock Exchange
JSE Johannesburg Stock Exchange
MIL Milan Stock Exchange
TAE Tel Aviv Stock Exchange
STO Stockholm Stock Exchange
ETR Deutsche Boerse Xetra Core
PAR Paris Stock Exchange
BUE Buenos Aires Stock Exchange
KRX Korea Exchange
SWX SIX Swiss Exchange
PINX Pink Sheets (OTC)
CSE Canadian Securities Exchange
PHS Philippine Stock Exchange
MEX Mexican Stock Exchange
TAI Taiwan Stock Exchange
IDX Indonesia Stock Exchange
OSL Oslo Stock Exchange
BOG Colombia Stock Exchange
NSE National Stock Exchange of India
HEL Nasdaq Helsinki
MISX Moscow Exchange
HKG Hong Kong Stock Exchange
IST Istanbul Stock Exchange
BOM Bombay Stock Exchange
TSX Toronto Stock Exchange
BRU Brussels Stock Exchange
BATS BATS Global Markets
ARCX NYSE Arca
GREY Grey Market (OTC)
DUS Dusseldorf Stock Exchange
BER Berlin Stock Exchange
ROCO Taipei Exchange
CNQ Canadian Trading and Quotation System Inc.
BSP Bangko Sentral ng Pilipinas
NEOE NEO Exchange

Requesting Data

You don't need any special code to request US Fundamental Data. You can access the current and historical fundamental data for any of the US Equities that this dataset includes.

class MorningStarDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2021, 1, 1)
        self.set_end_date(2021, 7, 1)
        self.set_cash(100000) 
        self.universe_settings.asynchronous = True

        # Option 1: Subscribe to individual US Equity assets
        self.add_equity("IBM")        

        # Option 2A: Create a fundamental universe (classic version)
        self._universe = self.add_universe(self.fundamental_function)

        # Option 2B: Create a fundamental universe (framework version)
        self.add_universe_selection(FundamentalUniverseSelectionModel(self.fundamental_function))
namespace QuantConnect
{
    private Universe _universe;
    public class MorningStarDataAlgorithm : QCAlgorithm
    {    	
        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2021, 7, 1);
            SetCash(100000);
            UniverseSettings.Asynchronous = True;
            
            // Option 1: Subscribe to individual US Equity assets
            AddEquity("IBM");

            // Option 2A: Create a fundamental universe (classic version)
            _universe = AddUniverse(FundamentalFilterFunction);

            // Option 2B: Create a fundamental universe (framework version)
            AddUniverseSelection(new FundamentalUniverseSelectionModel(FundamentalFilterFunction));
        }
    }
}

For more information about universe settings, see Settings .

Accessing Data

If you add a fundamental universe to your algorithm, you can access fundamental data in the universe selection function.

def fundamental_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    return [f.symbol for f in fundamental if f.price > 10 f.valuation_ratios.pe_ratios > 30]
public IEnumerable<Symbol> FundamentalFunction(IEnumerable<Fundamental> fundamental)
{
    return fundamental.Where(f => f.Price > 10 && f.ValuationRatios.PERatios > 30).Select(f => f.Symbol);
}

To get fundamental data for Equities in your algorithm, use the Fundamentals fundamentals property of the Equity objects. The fundamental data represent the corporate fundamentals for the current algorithm time.

fundamentals = self.securities[symbol].fundamentals
var fundamentals = Securities[symbol].Fundamentals;

To get fundamental data for Equities, regardless of whether or not you have subscribed to them in your algorithm, call the Fundamentals fundamentals method. If you pass one Symbol , the method returns a Fundamental object. If you pass a list of Symbol objects, the method returns a list of Fundamental objects.

// Single asset 
var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);
var ibmFundamental = Fundamentals(ibm);

// Multiple assets
var nb = QuantConnect.Symbol.Create("NB", SecurityType.Equity, Market.USA);
var fundamentals = Fundamentals(new List<Symbol>{ nb, ibm }).ToList();
# Single asset
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)
ibm_fundamental = self.fundamentals(ibm)

# Multiple assets
nb = Symbol.create("NB", SecurityType.EQUITY, Market.USA)
fundamentals = self.fundamentals([ nb, ibm ])

Historical Data

You can get historical fundamental data in an algorithm and in the Research Environment.

Historical Data in Algorithms

To get historical fundamental data in an algorithm, call the History history method with Fundamental type and the Equity Symbol or the Universe object. If there is no data in the period you request, the history result is empty.

var ibm = QuantConnect.Symbol.Create("IBM", SecurityType.Equity, Market.USA);

// Fundamental objects
var fundamentalHistory = History<Fundamental>(ibm, TimeSpan.FromDays(30));

// Fundamentals objects for all US Equities (including delisted companies)
var fundamentalsHistory = History<Fundamentals>(TimeSpan.FromDays(30));

// Collection of Fundamental objects for all US Equities (including delisted companies)
var collectionHistory = History(_universe, 30, Resolution.Daily);
foreach (var fundamental in collectionHistory)
{
    // Cast to Fundamental is required
    var highestMarketCap = fundamental.OfType<Fundamental>().OrderByDescending(x => x.MarketCap).Take(5);
}
ibm = Symbol.create("IBM", SecurityType.EQUITY, Market.USA)

# DataFrame objects
asset_df_history = self.history(Fundamental, ibm, timedelta(30))

# Fundamental objects
fundamental_history= self.history[Fundamental](ibm, timedelta(30))

# Fundamentals objects for all US Equities (including delisted companies)
fundamentals_history = self.history[Fundamentals](timedelta(30))

# Multi-index Series objects of list of Fundamental objects
series_history = self.history(self.universe, 30, Resolution.DAILY)
for (universe_symbol, time), fundamental in series_history.items():
    highest_market_cap = sorted(fundamental, key=lambda x: x.market_cap)[-5:]

Historical Data in the Research Environment

To get historical data in the Research Environment, call any of the preceding methods or call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. Alternatively, call the GetFundamental get_fundamental method with the Equity Symbol , a Fundamental property, a start date, and an end date. If there is no data in the period you request, the history result is empty.

universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (universe_symbol, time), fundamentals in universe_history.items():
    for fundamental in fundamentals:
        print(f"{fundamental.symbol} market cap at {fundamental.end_time}: {fundamental.market_cap}")

history = qb.get_fundamental(symbol, "ValuationRatios.pe_ratios", datetime(2021, 1, 1), datetime(2021, 7, 1))
var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);foreach (var fundamentals in universeHistory)
{
    foreach (Fundamental fundamental in fundamentals)
    {
        Console.WriteLine($"{fundamental.Symbol} market cap at {fundamental.EndTime}: {fundamental.MarketCap}");
    }
}

var history = qb.GetFundamental(symbol, "ValuationRatios.PERatios", new DateTime(2021, 1, 1), new DateTime(2021, 7, 1));

For more information about historical US Equity fundamental data, see Equity Fundamental Data .

Example Applications

The US Fundamentals dataset enables you to design strategies harnessing fundamental data points. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

TickData

TickData was founded by a futures broker and a programmer in 1984 as the first company in the world to offer historical tick-by-tick prices on the futures and index markets. TickData provides access to comprehensive and detailed market data and analytics products in the financial industry covering Equities, Futures, Options, cash FOREX, and Cash Indices.

 

TickData

US Cash Indices

Introduction

The US Cash Indices dataset by TickData covers 3 US Indices: SPX, VIX, and NDX. The data starts on various dates from Janunary 1998 and is delivered on any frequency from tick to daily. This dataset is created by TickData negotiating directly with exchanges for their official archive and by partnering with real-time data providers who have direct exchange connections and multiple redundant ticker plants.

For more information about the US Cash Indices dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

TickData was founded by a futures broker and a programmer in 1984 as the first company in the world to offer historical tick-by-tick prices on the futures and index markets. TickData provides access to comprehensive and detailed market data and analytics products in the financial industry covering Equities, Futures, Options, cash FOREX, and Cash Indices.

Getting Started

The following snippet demonstrates how to request data from the US Cash Indices dataset:

self.vix = self.add_index("VIX", Resolution.DAILY).symbol
_symbol = AddIndex("VIX", Resolution.Daily).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 1998*
Coverage 3 US Indices
Data Density Dense
Resolution Minute, Hour, & Daily
Timezone New York
Market Hours Regular Only

Example Applications

The US Cash Indices enables you to incorporate popular US indices into your trading algorithms. Examples include the following use cases:

For more example algorithms, see Examples .

Data Point Attributes

The US Cash Indices dataset provides TradeBar and Tick objects.

TradeBar Attributes

TradeBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

Supported Indices

The following table shows the available indices:

Ticker Index Expiry Start Date
VIX S&P500 30 Days Jul 2003
SPX S&P500 - Jan 1998
NDX NASDAQ-100 - Jan 1998

VIX - CBOE Volatility Index

The Cboe Volatility Index (VIX) is a real-time index that represents the market's expectations for the relative strength of near-term price changes of the S&P 500 index (SPX). Because it's derived from the prices of SPX index Options with near-term expiration dates, it generates a 30-day forward projection of volatility. Volatility, or how fast prices change, is often seen as a way to gauge market sentiment, and in particular, the degree of fear among market participants.

SPX - S&P 500 Index

The S&P 500 Index, or the Standard & Poor's 500 Index, is a market-capitalization-weighted index of the 500 largest publicly-traded companies in the U.S. It is not an exact list of the top 500 U.S. companies by market capitalization because there are other criteria included in the index. The index is widely regarded as the best gauge of large-cap U.S. Equities.

NDX - Nasdaq 100 Index

The Nasdaq-100 Index is a modified market-capitalization-weighted index composed of securities issued by 100 of the largest non-financial companies listed on the Nasdaq Stock Market (Nasdaq). The index includes companies from various industries except for the financial industry, like commercial and investment banks. These non-financial sectors include retail, biotechnology, industrial, technology, health care, and others.

Requesting Data

To add US Cash Indices data to your algorithm, call the AddIndex add_index method. Save a reference to the Index Symbol so you can access the data later in your algorithm.

class USCashIndexAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)

        self.vix = self.add_index("VIX").symbol
namespace QuantConnect
{
    public class USCashIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
            
            _symbol = AddIndex("VIX").Symbol;
        }
    }
}

For more information about creating Index subscriptions, see Requesting Data .

Accessing Data

To get the current US Cash Indices data, index the Bars bars or Ticks ticks properties of the current Slice with the Index Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.vix in slice.bars:
        trade_bar = slice.bars[self.vix]
        self.log(f"{self.vix} close at {slice.time}: {trade_bar.close}"

    if self.vix in slice.ticks:
        ticks = slice.ticks[self.vix]
        for tick in ticks:
            self.log(f"{self.vix} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, ticks in slice.ticks.items()::
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing US Index data, see Handling Data .

Historical Data

To get historical US Cash Indices data, call the History history method with the Index Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.vix, 100, Resolution.DAILY)

# TradeBar objects
history_bars = self.history[TradeBar](self.vix, 100, Resolution.DAILY)

# Tick objects
history_ticks = self.history[Tick](self.vix, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects
var historyBars = History(_symbol, 100, Resolution.Daily);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a US Index subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.vix)
RemoveSecurity(_symbol);

Example Applications

The US Cash Indices enables you to incorporate popular US indices into your trading algorithms. Examples include the following use cases:

For more example algorithms, see Examples .

 

Datasets

CoinAPI

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

 

CoinAPI

Binance Crypto Future Price Data

Introduction

The Binance Crypto Future Price Data by CoinAPI is for Crypto-currency futures price and volume data points. The data covers 348 Cryptocurrency pairs, starts in August 2020, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on Binance.

The Binance Crypto Future Margin Rate Data dataset provides margin interest data to model margin costs.

For more information about the Binance Crypto Future Price Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

Getting Started

The following snippet demonstrates how to request data from the Binance Crypto Future Price dataset:

def initialize(self) -> None:
    self.set_brokerage_model(BrokerageName.BINANCE_FUTURES, AccountType.MARGIN)
    self.set_brokerage_model(BrokerageName.BINANCE_COIN_FUTURES, AccountType.MARGIN)

    self.crypto_future_symbol = self.add_crypto_future("BTCBUSD", Resolution.MINUTE).symbol
private Symbol _cryptoFutureSymbol;

public override void Initialize
{
    SetBrokerageModel(BrokerageName.BinanceFutures, AccountType.Margin);
    SetBrokerageModel(BrokerageName.BinanceCoinFutures, AccountType.Margin);

    // perpetual futures does not have a filter function
    _cryptoFutureSymbol = AddCryptoFuture("BTCBUSD", Resolution.Minute).Symbol;
}

Data Summary

The following table describes the dataset properties:

Property Value
Start Date August 2020
Asset Coverage 292 Crypto Futures Pairs
Data Density Dense
Resolution Tick, Second, Minute, Hourly, & Daily
Timezone UTC
Market Hours Always Open

Example Applications

The Binance Crypto Future Price dataset enables you to accurately design strategies for Cryptocurrencies with term structure. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Binance Crypto Future Price dataset provides TradeBar , QuoteBar , and Tick objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

Supported Assets

The following table shows the available Crypto Future pairs:

Requesting Data

To add Binance Crypto Future Price data to your algorithm, call the AddCryptoFuture add_crypto_future method. Save a reference to the Crypto Future Symbol so you can access the data later in your algorithm.

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)

        # Set Account Currency to Binance Stable Coin for USD
        self.set_account_currency("BUSD")
        self.set_cash(100000)

        self.set_brokerage_model(BrokerageName.BINANCE_FUTURES, AccountType.MARGIN)
        self.set_brokerage_model(BrokerageName.BINANCE_COIN_FUTURES, AccountType.MARGIN)
        
        crypto_future = self.add_crypto_future("BTCBUSD", Resolution.MINUTE)
        # perpetual futures does not have a filter function
        self.btcbusd = crypto_future.symbol
namespace QuantConnect
{
    public class CoinAPIDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol ;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);

            // Set Account Currency to Binance Stable Coin for USD
            SetAccountCurrency("BUSD");
            SetCash(100000);

            SetBrokerageModel(BrokerageName.BinanceFutures, AccountType.Margin);
            SetBrokerageModel(BrokerageName.BinanceCoinFutures, AccountType.Margin);
            
            var cryptoFuture = AddCryptoFuture("BTCBUSD", Resolution.Minute);
            // perpetual futures does not have a filter function
            _symbol = cryptoFuture.Symbol;
        }
    }
}

For more information about creating Crypto Future subscriptions, see Requesting Data .

Accessing Data

To get the current Binance Crypto Future Price data, index the Bars bars , QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Crypto Future Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.btcbusd in slice.bars:
        trade_bar = slice.bars[self.btcbusd]
        self.log(f"{self.btcbusd} close at {slice.time}: {trade_bar.close}")

    if self.btcbusd in slice.quote_bars:
        quote_bar = slice.quote_bars[self.btcbusd]
        self.log(f"{self.btcbusd} bid at {slice.time}: {quote_bar.bid.close}")

    if self.btcbusd in slice.ticks:
        ticks = slice.ticks[self.btcbusd]
        for tick in ticks:
            self.log(f"{self.btcbusd} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing Crypto Future data, see Handling Data .

Historical Data

To get historical Binance Crypto Future Price data, call the History history method with the Crypto Future Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.btcbusd, 100, Resolution.DAILY)

# TradeBar objects
history_trade_bars = self.history[TradeBar](self.btcbusd, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.btcbusd, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.btcbusd, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects 
var historyTradeBars = History(_symbol, 100, Resolution.Daily);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Remove Subscriptions

To unsubscribe from a Crypto Future contract that you added with the AddCryptoFuture add_crypto_future method, call the RemoveSecurity remove_security method.

self.remove_security(self.btcbusd)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your Crypto Future holdings.

Example Applications

The Binance Crypto Future Price dataset enables you to accurately design strategies for Cryptocurrencies with term structure. Examples include the following strategies:

For more example algorithms, see Examples .

 

CoinAPI

Binance Crypto Price Data

Introduction

The Binance Crypto Price Data by CoinAPI is for Cryptocurrency price and volume data points. The data covers 2,407 Cryptocurrency pairs, starts in July 2017, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on Binance.

For more information about the Binance Crypto Price Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

Getting Started

The following snippet demonstrates how to request data from the Binance Crypto Price dataset:

# Binance accepts both Cash and Margin account types only.
self.set_brokerage_model(BrokerageName.BINANCE, AccountType.CASH)
self.set_brokerage_model(BrokerageName.BINANCE, AccountType.MARGIN)

self.btcbusd = self.add_crypto("BTCBUSD", Resolution.MINUTE, Market.BINANCE).symbol

self._universe = self.add_universe(CryptoUniverse.binance(self.universe_selection_filter))
// Binance accepts both Cash and Margin account types only.
SetBrokerageModel(BrokerageName.Binance, AccountType.Cash);
SetBrokerageModel(BrokerageName.Binance, AccountType.Margin);

_symbol = AddCrypto("BTCBUSD", Resolution.Minute, Market.Binance).Symbol;

_universe = AddUniverse(CryptoUniverse.Binance(UniverseSelectionFilter));

Data Summary

The following table describes the dataset properties:

Property Value
Start Date July 2017
Asset Coverage 2,255 Currency Pairs
Data Density Dense
Resolution Tick, Second, Minute, Hourly, & Daily
Timezone UTC
Market Hours Always Open

Example Applications

The Binance Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Binance Crypto Price dataset provides TradeBar , QuoteBar , Tick , and CryptoUniverse objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

CryptoUniverse Attributes

CryptoUniverse objects have the following attributes:

Supported Assets

The following table shows the available Cryptocurrency pairs:

Requesting Data

To add Binance Crypto Price data to your algorithm, call the AddCrypto add_crypto method. Save a reference to the Crypto Symbol so you can access the data later in your algorithm.

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)

        # Set Account Currency to Binance Stable Coin for USD
        self.set_account_currency("BUSD")
        self.set_cash(100000)

        # Binance accepts both Cash and Margin account types.
        self.set_brokerage_model(BrokerageName.BINANCE, AccountType.MARGIN)
        
        self.btcbusd = self.add_crypto("BTCBUSD", Resolution.MINUTE, Market.BINANCE).symbol
namespace QuantConnect
{
    public class CoinAPIDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);

            // Set Account Currency to Binance Stable Coin for USD
            SetAccountCurrency("BUSD");
            SetCash(100000);

            // Binance accepts both Cash and Margin account types.
            SetBrokerageModel(BrokerageName.Binance, AccountType.Margin);
            
            _symbol = AddCrypto("BTCBUSD", Resolution.Minute, Market.Binance).Symbol;
        }
    }
}

For more information about creating Crypto subscriptions, see Requesting Data .

Accessing Data

To get the current Binance Crypto Price data, index the Bars bars , QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Crypto Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.btcbusd in slice.bars:
        trade_bar = slice.bars[self.btcbusd]
        self.log(f"{self.btcbusd} close at {slice.time}: {trade_bar.close}")

    if self.btcbusd in slice.quote_bars:
        quote_bar = slice.quote_bars[self.btcbusd]
        self.log(f"{self.btcbusd} bid at {slice.time}: {quote_bar.bid.close}")

    if self.btcbusd in slice.ticks:
        ticks = slice.ticks[self.btcbusd]
        for tick in ticks:
            self.log(f"{self.btcbusd} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing Crypto data, see Handling Data .

Historical Data

To get historical Binance Crypto Price data, call the History history method with the Crypto Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.btcbusd, 100, Resolution.DAILY)

# TradeBar objects
history_trade_bars = self.history[TradeBar](self.btcbusd, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.btcbusd, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.btcbusd, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects 
var historyTradeBars = History(_symbol, 100, Resolution.Daily);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of Binance Crypto pairs, call the AddUniverse add_universe method with a CryptoUniverse object. A Crypto universe uses a selection function to select Crypto pairs based on their OHLCV and dollar volume of the previous day as of midnight Coordinated Universal Time (UTC).

from QuantConnect.Data.universe_selection import *

def initialize(self) -> None:
    self.universe_settings.asynchronous = True
    self.set_brokerage_model(BrokerageName.BINANCE, AccountType.MARGIN)
    self._universe = self.add_universe(CryptoUniverse.binance(self.universe_selection_filter))

def universe_selection_filter(self, universe_day):
    return [c.symbol for c in universe_day if c.volume >= 100 and c.volume_in_usd > 10000]
using QuantConnect.Data.UniverseSelection;

public override void Initialize()
{
    UniverseSettings.Asynchronous = True;
    SetBrokerageModel(BrokerageName.Binance, AccountType.Margin);
    _universe = AddUniverse(CryptoUniverse.Binance(UniverseSelectionFilter));
}

private IEnumerable<Symbol> UniverseSelectionFilter(IEnumerable<CryptoUniverse> universeDay)
{
    return from c in universeDay
           where c.Volume >= 100m && c.VolumeInUsd > 10000m
           select c.Symbol;
}

For more information about universe settings, see Settings .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object, and the lookback period. If there is no data in the period you request, the history result is empty.

var history = History(_universe, 30, Resolution.Daily);
foreach (var universeDay in history)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Log($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), universe_day in history.items():
    for universe_item in universe_day:
        self.log(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, and the lookback period. The UniverseHistory universe_history returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var universeDay in universeHistory)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Console.WriteLine($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (univere_symbol, time), universe_day in universe_history.items():
    for universe_item in universe_day:
        print(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

You can call the History history method in Research.

Remove Subcriptions

To unsubscribe from a Crypto pair that you added with the AddCrypto add_crypto method, call the RemoveSecurity remove_security method.

self.remove_security(self.btcbusd)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings in the virtual pair .

Example Applications

The Binance Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

 

CoinAPI

Binance US Crypto Price Data

Introduction

The Binance US Crypto Price Data by CoinAPI is for Cryptocurrency price and volume data points. The data covers 537 Cryptocurrency pairs, starts in October 2019, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on Binance US.

For more information about the Binance US Crypto Price Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

Getting Started

The following snippets demonstrates how to set the brokerage model, request data, and perform universe selection with the Binance US dataset:

# Binance US only accepts cash accounts
self.set_brokerage_model(BrokerageName.BINANCE_US, AccountType.CASH)

self.btcbusd = self.add_crypto("BTCUSD", Resolution.MINUTE, Market.BINANCE_US).symbol

self._universe = AddUniverse(CryptoUniverse.binance_us(self.universe_selection_filter));
// Binance US only accepts cash accounts
SetBrokerageModel(BrokerageName.BinanceUS, AccountType.Cash);

_symbol = AddCrypto("BTCUSD", Resolution.Minute, Market.BinanceUS).Symbol;

_universe = AddUniverse(CryptoUniverse.BinanceUS(UniverseSelectionFilter));

Data Summary

The following table describes the dataset properties:

Property Value
Start Date October 2019
Asset Coverage 537 Cryptocurrency Pairs
Data Density Dense
Resolution Tick, Second, Minute, Hourly, & Daily
Timezone UTC
Market Hours Always Open

Example Applications

The Binance US Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Binance US Crypto Price dataset provides TradeBar , QuoteBar , Tick , and CryptoUniverse objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

CryptoUniverse Attributes

CryptoUniverse objects have the following attributes:

Supported Assets

The following table shows the available Cryptocurrency pairs:

Requesting Data

To add Binance US Crypto Price data to your algorithm, call the AddCrypto add_crypto method. Save a reference to the Crypto Symbol so you can access the data later in your algorithm.

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)

        # BinanceUS accepts Cash account type only, AccountType.MARGIN will result in an exception.
        self.set_brokerage_model(BrokerageName.BINANCE_US, AccountType.CASH)
        
        self.btcbusd = self.add_crypto("BTCUSD", Resolution.MINUTE, Market.BINANCE_US).symbol
namespace QuantConnect
{
    public class CoinAPIDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
        
            // BinanceUS accepts Cash account type only, AccountType.Margin will result in an exception.
            SetBrokerageModel(BrokerageName.BinanceUS, AccountType.Cash);
            
            _symbol = AddCrypto("BTCUSD", Resolution.Minute, Market.BinanceUS).Symbol;
        }
    }
}

For more information about creating Crypto subscriptions, see Requesting Data .

Accessing Data

To get the current Binance US Crypto Price data, index the Bars bars , QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Crypto Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.btcbusd in slice.bars:
        trade_bar = slice.bars[self.btcbusd]
        self.log(f"{self.btcbusd} close at {slice.time}: {trade_bar.close}")

    if self.btcbusd in slice.quote_bars:
        quote_bar = slice.quote_bars[self.btcbusd]
        self.log(f"{self.btcbusd} bid at {slice.time}: {quote_bar.bid.close}")

    if self.btcbusd in slice.ticks:
        ticks = slice.ticks[self.btcbusd]
        for tick in ticks:
            self.log(f"{self.btcbusd} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing Crypto data, see Handling Data .

Historical Data

To get historical Binance US Crypto Price data, call the History history method with the Crypto Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.btcbusd, 100, Resolution.DAILY)

# TradeBar objects
history_trade_bars = self.history[TradeBar](self.btcbusd, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.btcbusd, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.btcbusd, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects 
var historyTradeBars = History(_symbol, 100, Resolution.Daily);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of Binance US Crypto pairs, call the AddUniverse add_universe method with a CryptoUniverse object. A Crypto universe uses a selection function to select Crypto pairs based on their OHLCV and dollar volume of the previous day as of midnight Coordinated Universal Time (UTC).

def initialize(self) -> None:
    self.universe_settings.asynchronous = True
    self.set_brokerage_model(BrokerageName.BINANCE_US, AccountType.CASH)
    self._universe = self.add_universe(CryptoUniverse.binance_us(self.universe_selection_filter))

def universe_selection_filter(self, universe_day):
    return [c.symbol for c in universe_day if c.volume >= 100 and c.volume_in_usd > 10000]
public override void Initialize()
{
    UniverseSettings.Asynchronous = True;
    SetBrokerageModel(BrokerageName.BinanceUS, AccountType.Cash);
    _universe = AddUniverse(CryptoUniverse.BinanceUS(UniverseSelectionFilter));
}

private IEnumerable<Symol> UniverseSelectionFilter(IEnumerable<CryptoUniverse> universeDay)
{
    return from c in universeDay
           where c.Volume >= 100m && c.VolumeInUsd > 10000m
           select c.Symbol;
}

For more information about universe settings, see Settings .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object, and the lookback period. If there is no data in the period you request, the history result is empty.

var history = History(_universe, 30, Resolution.Daily);
foreach (var universeDay in history)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Log($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), universe_day in history.items():
    for universe_item in universe_day:
        self.log(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, and the lookback period. The UniverseHistory universe_history returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var universeDay in universeHistory)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Console.WriteLine($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (univere_symbol, time), universe_day in universe_history.items():
    for universe_item in universe_day:
        print(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

You can call the History history method in Research.

Remove Subscriptions

To unsubscribe from a Crypto pair that you added with the AddCrypto add_crypto method, call the RemoveSecurity remove_security method.

self.remove_security(self.btcbusd)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings in the virtual pair .

Example Applications

The Binance US Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

 

CoinAPI

Bitfinex Crypto Price Data

Introduction

The Bitfinex Crypto Price Data by CoinAPI is for Cryptocurrency price and volume data points. The data covers 383 Cryptocurrency pairs, starts in January 2013, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on Bitfinex.

For more information about the Bitfinex Crypto Price Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

Getting Started

The following snippet demonstrates how to request data from the Bitfinex Crypto Price dataset:

# Bitfinex accepts both Cash and Margin type account.
self.set_brokerage_model(BrokerageName.BITFINEX, AccountType.CASH)
self.set_brokerage_model(BrokerageName.BITFINEX, AccountType.MARGIN)

self.btcusd = self.add_crypto("BTCUSD", Resolution.MINUTE, Market.BITFINEX).symbol

self._universe = self.add_universe(CryptoUniverse.bitfinex(self.universe_selection_filter))
// Bitfinex accepts both Cash and Margin type account.
SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Cash);
SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Margin);

_symbol = AddCrypto("BTCUSD", Resolution.Minute, Market.Bitfinex).Symbol;

_universe = AddUniverse(CryptoUniverse.Bitfinex(UniverseSelectionFilter));

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2013
Asset Coverage 383 Currency Pairs
Data Density Dense
Resolution Tick, Second, Minute, Hourly, & Daily
Timezone UTC
Market Hours Always Open

Example Applications

The Bitfinex Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Bitfinex Crypto Price dataset provides TradeBar , QuoteBar , Tick , and CryptoUniverse objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

CryptoUniverse Attributes

CryptoUniverse objects have the following attributes:

Supported Assets

The following table shows the available Cryptocurrency pairs:

Requesting Data

To add Bitfinex Crypto Price data to your algorithm, call the AddCrypto add_crypto method. Save a reference to the Crypto Symbol so you can access the data later in your algorithm.

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)

        # Bitfinex accepts both Cash and Margin type account.
        self.set_brokerage_model(BrokerageName.BITFINEX, AccountType.MARGIN)
        
        self.btcusd = self.add_crypto("BTCUSD", Resolution.MINUTE, Market.BITFINEX).symbol
namespace QuantConnect
{
    public class CoinAPIDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);

            // Bitfinex accepts both Cash and Margin type account.
            SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Margin);
            
            _symbol = AddCrypto("BTCUSD", Resolution.Minute, Market.Bitfinex).Symbol;
        }
    }
}

For more information about creating Crypto subscriptions, see Requesting Data .

Accessing Data

To get the current Bitfinex Crypto Price data, index the Bars bars , QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Crypto Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.btcusd in slice.bars:
        trade_bar = slice.bars[self.btcusd]
        self.log(f"{self.btcusd} close at {slice.time}: {trade_bar.close}")

    if self.btcusd in slice.quote_bars:
        quote_bar = slice.quote_bars[self.btcusd]
        self.log(f"{self.btcusd} bid at {slice.time}: {quote_bar.bid.close}")

    if self.btcusd in slice.ticks:
        ticks = slice.ticks[self.btcusd]
        for tick in ticks:
            self.log(f"{self.btcusd} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing Crypto data, see Handling Data .

Historical Data

To get historical Bitfinex Crypto Price data, call the History history method with the Crypto Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.btcusd, 100, Resolution.DAILY)

# TradeBar objects
history_trade_bars = self.history[TradeBar](self.btcusd, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.btcusd, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.btcusd, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects 
var historyTradeBars = History(_symbol, 100, Resolution.Daily);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of Bitfinex Crypto pairs, call the AddUniverse add_universe method with a CryptoUniverse object. A Crypto universe uses a selection function to select Crypto pairs based on their OHLCV and dollar volume of the previous day as of midnight Coordinated Universal Time (UTC).

def initialize(self) -> None:
    self.universe_settings.asynchronous = True
    self.set_brokerage_model(BrokerageName.BITFINEX, AccountType.MARGIN)
    self._universe = self.add_universe(CryptoUniverse.bitfinex(self.universe_selection_filter))

def universe_selection_filter(self, universe_day):
    return [c.symbol for c in universe_day if c.volume >= 100 and c.volume_in_usd > 10000]
public override void Initialize()
{
    UniverseSettings.Asynchronous = True;
    SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Margin);
    _universe = AddUniverse(CryptoUniverse.Bitfinex(UniverseSelectionFilter));
}

private IEnumerable<Symbol> UniverseSelectionFilter(IEnumerable<CryptoUniverse> universeDay)
{
    return from c in universeDay
           where c.Volume >= 100m && c.VolumeInUsd > 10000m
           select c.Symbol;
}

For more information about universe settings, see Settings .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object, and the lookback period. If there is no data in the period you request, the history result is empty.

var history = History(_universe, 30, Resolution.Daily);
foreach (var universeDay in history)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Log($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), universe_day in history.items():
    for universe_item in universe_day:
        self.log(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, and the lookback period. The UniverseHistory universe_history returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var universeDay in universeHistory)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Console.WriteLine($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (univere_symbol, time), universe_day in universe_history.items():
    for universe_item in universe_day:
        print(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

You can call the History history method in Research.

Remove Subscriptions

To unsubscribe from a Crypto pair that you added with the AddCrypto add_crypto method, call the RemoveSecurity remove_security method.

self.remove_security(self.btcusd)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings in the virtual pair .

Data Points Attributes

The Bitfinex Crypto Price dataset provides TradeBar , QuoteBar , Tick , and CryptoUniverse objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

CryptoUniverse Attributes

CryptoUniverse objects have the following attributes:

Example Applications

The Bitfinex Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

 

CoinAPI

Bybit Crypto Future Price Data

Introduction

The Bybit Crypto Future Price Data by CoinAPI is for Cryptocurrency Futures price and volume data points. The data covers 370 Cryptocurrency pairs, starts in August 2020, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on Bybit.

The Bybit Crypto Future Margin Rate Data dataset provides margin interest rate data to model margin costs.

For more information about the Bybit Crypto Future Price Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

Getting Started

The following snippet demonstrates how to request data from the Bybit Crypto Future Price dataset:

def initialize(self) -> None:
    self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)

    self.crypto_future_symbol = self.add_crypto_future("BTCUSDT", Resolution.MINUTE).symbol
private Symbol _cryptoFutureSymbol;

public override void Initialize
{
    SetBrokerageModel(BrokerageName.Bybit, AccountType.Margin);

    _cryptoFutureSymbol = AddCryptoFuture("BTCUSDT", Resolution.Minute).Symbol;
}

Data Summary

The following table describes the dataset properties:

Property Value
Start Date October 2019
Asset Coverage 370 Crypto Futures Pairs
Data Density Dense
Resolution Tick, Second, Minute, Hourly, & Daily
Timezone UTC
Market Hours Always Open

Example Applications

The Bybit Crypto Future Price dataset enables you to accurately design strategies for Crypto Futures with term structure. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Bybit Crypto Future Price dataset provides TradeBar , QuoteBar , and Tick objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

Supported Assets

The following table shows the available Crypto Future pairs:

Requesting Data

To add Bybit Crypto Future Price data to your algorithm, call the AddCryptoFuture add_crypto_future method. Save a reference to the Crypto Future Symbol so you can access the data later in your algorithm.

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)

        # Set Account Currency to Tether
        self.set_account_currency("USDT", 100000)

        self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)
        
        crypto_future = self.add_crypto_future("BTCUSDT", Resolution.MINUTE)
        self.btcusdt = crypto_future.symbol
namespace QuantConnect
{
    public class CoinAPIDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);

            // Set Account Currency to Tether
            SetAccountCurrency("USDT", 100000);

            SetBrokerageModel(BrokerageName.Bybit, AccountType.Margin);
            
            var cryptoFuture = AddCryptoFuture("BTCUSDT", Resolution.Minute);
            _symbol = cryptoFuture.Symbol;
        }
    }
}

For more information about creating Crypto Future subscriptions, see Requesting Data .

Accessing Data

To get the current Bybit Crypto Future Price data, index the Bars bars , QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Crypto Future Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.btcusdt in slice.bars:
        trade_bar = slice.bars[self.btcusdt]
        self.log(f"{self.btcusdt} close at {slice.time}: {trade_bar.close}")

    if self.btcusdt in slice.quote_bars:
        quote_bar = slice.quote_bars[self.btcusdt]
        self.log(f"{self.btcusdt} bid at {slice.time}: {quote_bar.bid.close}")

    if self.btcusdt in slice.ticks:
        ticks = slice.ticks[self.btcusdt]
        for tick in ticks:
            self.log(f"{self.btcusdt} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing Crypto Future data, see Handling Data .

Historical Data

To get historical Bybit Crypto Future Price data, call the History history method with the Crypto Future Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.btcusdt, 100, Resolution.DAILY)

# TradeBar objects
history_trade_bars = self.history[TradeBar](self.btcusdt, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.btcusdt, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.btcusdt, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects 
var historyTradeBars = History(_symbol, 100, Resolution.Daily);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Remove Subscriptions

To unsubscribe from a Crypto Future contract that you added with the AddCryptoFuture add_crypto_future method, call the RemoveSecurity remove_security method.

self.remove_security(self.btcusdt)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your Crypto Future holdings.

Example Applications

The Bybit Crypto Future Price dataset enables you to accurately design strategies for Crypto Futures with term structure. Examples include the following strategies:

For more example algorithms, see Examples .

 

CoinAPI

Bybit Crypto Price Data

Introduction

The Bybit Crypto Price Data by CoinAPI is for Cryptocurrency price and volume data points. The data covers 602 Cryptocurrency pairs, starts in July 2017, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on Bybit.

For more information about the Bybit Crypto Price Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

Getting Started

The following snippet demonstrates how to request data from the Bybit Crypto Price dataset:

# Bybit accepts both Cash and Margin account types only.
self.set_brokerage_model(BrokerageName.BYBIT, AccountType.CASH)
self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)

self.btcusdt = self.add_crypto("BTCUSDT", Resolution.MINUTE, Market.BYBIT).symbol

self._universe = self.add_universe(CryptoUniverse.bybit(self.universe_selection_filter))
// Bybit accepts both Cash and Margin account types only.
SetBrokerageModel(BrokerageName.Bybit, AccountType.Cash);
SetBrokerageModel(BrokerageName.Bybit, AccountType.Margin);

_symbol = AddCrypto("BTCUSDT", Resolution.Minute, Market.Bybit).Symbol;

_universe = AddUniverse(CryptoUniverse.Bybit(UniverseSelectionFilter));

Data Summary

The following table describes the dataset properties:

Property Value
Start Date April 2022
Asset Coverage 428 Currency Pairs
Data Density Dense
Resolution Tick, Second, Minute, Hourly, & Daily
Timezone UTC
Market Hours Always Open

Example Applications

The Bybit Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Bybit Crypto Price dataset provides TradeBar , QuoteBar , Tick , and CryptoCoarseFundamental objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

CryptoCoarseFundamental Attributes

CryptoCoarseFundamental objects have the following attributes:

Supported Assets

The following table shows the available Cryptocurrency pairs:

Requesting Data

To add Bybit Crypto Price data to your algorithm, call the AddCrypto add_crypto method. Save a reference to the Crypto Symbol so you can access the data later in your algorithm.

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)

        # Set Account Currency to Tether
        self.set_account_currency("USDT", 100000)

        # Bybit accepts both Cash and Margin account types.
        self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)
        
        self.btcusdt = self.add_crypto("BTCUSDT", Resolution.MINUTE, Market.BYBIT.symbol
namespace QuantConnect
{
    public class CoinAPIDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);

            // Set Account Currency to Tether
            SetAccountCurrency("USDT", 100000);

            // Bybit accepts both Cash and Margin account types.
            SetBrokerageModel(BrokerageName.Bybit, AccountType.Margin);
            
            _symbol = AddCrypto("BTCUSDT", Resolution.Minute, Market.Bybit).Symbol;
        }
    }
}

For more information about creating Crypto subscriptions, see Requesting Data .

Accessing Data

To get the current Bybit Crypto Price data, index the Bars bars , QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Crypto Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.btcusdt in slice.bars:
        trade_bar = slice.bars[self.btcusdt]
        self.log(f"{self.btcusdt} close at {slice.time}: {trade_bar.close}")

    if self.btcusdt in slice.quote_bars:
        quote_bar = slice.quote_bars[self.btcusdt]
        self.log(f"{self.btcusdt} bid at {slice.time}: {quote_bar.bid.close}")

    if self.btcusdt in slice.ticks:
        ticks = slice.ticks[self.btcusdt]
        for tick in ticks:
            self.log(f"{self.btcusdt} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing Crypto data, see Handling Data .

Historical Data

To get historical Bybit Crypto Price data, call the History history method with the Crypto Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.btcusdt, 100, Resolution.DAILY)

# TradeBar objects
history_trade_bars = self.history[TradeBar](self.btcusdt, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.btcusdt, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.btcusdt, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects 
var historyTradeBars = History(_symbol, 100, Resolution.Daily);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of Bybit Crypto pairs, call the AddUniverse add_universe method with a CryptoUniverse object. A Crypto universe uses a selection function to select Crypto pairs based on their OHLCV and dollar volume of the previous day as of midnight Coordinated Universal Time (UTC).

from QuantConnect.Data.universe_selection import *

def initialize(self) -> None:
    self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)
    self.universe_settings.asynchronous = True
    self._universe = self.add_universe(CryptoUniverse.bybit(self.universe_selection_filter))

def universe_selection_filter(self, universe_day):
    return [c.symbol for c in universe_day if c.volume >= 100 and c.volume_in_usd > 10000]
using QuantConnect.Data.UniverseSelection;

public override void Initialize()
{
    SetBrokerageModel(BrokerageName.Bybit, AccountType.Margin);
    UniverseSettings.Asynchronous = True;
    _universe = AddUniverse(CryptoUniverse.Bybit(UniverseSelectionFilter));
}

private IEnumerable<Symbol> UniverseSelectionFilter(IEnumerable<CryptoUniverse> universeDay)
{
    return from c in universeDay
           where c.Volume >= 100m && c.VolumeInUsd > 10000m
           select c.Symbol;
}

For more information about universe settings, see Settings .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object, and the lookback period. If there is no data in the period you request, the history result is empty.

var history = History(_universe, 30, Resolution.Daily);
foreach (var universeDay in history)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Log($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), universe_day in history.items():
    for universe_item in universe_day:
        self.log(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, and the lookback period. The UniverseHistory universe_history returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var universeDay in universeHistory)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Console.WriteLine($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (univere_symbol, time), universe_day in universe_history.items():
    for universe_item in universe_day:
        print(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

You can call the History history method in Research.

Remove Subscriptions

To unsubscribe from a Crypto pair that you added with the AddCrypto add_crypto method, call the RemoveSecurity remove_security method.

self.remove_security(self.btcusdt)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings in the virtual pair .

Example Applications

The Bybit Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

 

CoinAPI

Coinbase Crypto Price Data

Introduction

The Coinbase Crypto Price Data by CoinAPI provides Cryptocurrency price and volume data points. The data covers 801 Cryptocurrency pairs, starts in January 2015, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on Coinbase.

For more information about the Coinbase Crypto Price Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

Getting Started

The following snippet demonstrates how to request data from the Coinbase Crypto Price dataset:

# Coinbase only accepts Cash account type
self.set_brokerage_model(BrokerageName.COINBASE, AccountType.CASH)

self.btcusd = self.add_crypto("BTCUSD", Resolution.MINUTE, Market.COINBASE).symbol

self._universe = self.add_universe(CryptoUniverse.coinbase(self.universe_selection_filter))
// Coinbase only accepts Cash account type
SetBrokerageModel(BrokerageName.Coinbase, AccountType.Cash);

_symbol = AddCrypto("BTCUSD", Resolution.Minute, Market.Coinbase).Symbol;

_universe = AddUniverse(CryptoUniverse.Coinbase(UniverseSelectionFilter));

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2015
Asset Coverage 445 Currency Pairs
Data Density Dense
Resolution Tick, Second, Minute, Hourly, & Daily
Timezone UTC
Market Hours Always Open

Example Applications

The Coinbase Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Coinbase Crypto Price dataset provides TradeBar , QuoteBar , Tick , and CryptoUniverse objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

CryptoUniverse Attributes

CryptoUniverse objects have the following attributes:

Supported Assets

The following table shows the available Cryptocurrency pairs:

Requesting Data

To add Coinbase Crypto Price data to your algorithm, call the AddCrypto add_crypto method. Save a reference to the Crypto Symbol so you can access the data later in your algorithm.

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)

        # Coinbase accepts Cash account type only, AccountType.MARGIN will result in an exception.
        self.set_brokerage_model(BrokerageName.COINBASE, AccountType.CASH)
        
        self.btcusd = self.add_crypto("BTCUSD", Resolution.MINUTE, Market.COINBASE).symbol
namespace QuantConnect
{
    public class CoinAPIDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
        
            // Coinbase accepts Cash account type only, AccountType.Margin will result in an exception.
            SetBrokerageModel(BrokerageName.Coinbase, AccountType.Cash);
            
            _symbol = AddCrypto("BTCUSD", Resolution.Minute, Market.Coinbase).Symbol;
        }
    }
}

For more information about creating Crypto subscriptions, see Requesting Data .

Accessing Data

To get the current Coinbase Crypto Price data, index the Bars bars , QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Crypto Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.btcusd in slice.bars:
        trade_bar = slice.bars[self.btcusd]
        self.log(f"{self.btcusd} close at {slice.time}: {trade_bar.close}")

    if self.btcusd in slice.quote_bars:
        quote_bar = slice.quote_bars[self.btcusd]
        self.log(f"{self.btcusd} bid at {slice.time}: {quote_bar.bid.close}")

    if self.btcusd in slice.ticks:
        ticks = slice.ticks[self.btcusd]
        for tick in ticks:
            self.log(f"{self.btcusd} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing Crypto data, see Handling Data .

Historical Data

To get historical Coinbase Crypto Price data, call the History history method with the Crypto Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.btcusd, 100, Resolution.DAILY)

# TradeBar objects
history_trade_bars = self.history[TradeBar](self.btcusd, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.btcusd, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.btcusd, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects 
var historyTradeBars = History(_symbol, 100, Resolution.Daily);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of Coinbase Crypto pairs, call the AddUniverse add_universe method with a CryptoUniverse object. A Crypto universe uses a selection function to select Crypto pairs based on their OHLCV and dollar volume of the previous day as of midnight Coordinated Universal Time (UTC).

from QuantConnect.Data.universe_selection import *

def initialize(self) -> None:
    self.universe_settings.asynchronous = True
    self.set_brokerage_model(BrokerageName.COINBASE, AccountType.CASH)
    self._universe = self.add_universe(CryptoUniverse.coinbase(self.universe_selection_filter))

def universe_selection_filter(self, universe_day):
    return [c.symbol for c in universe_day if c.volume >= 100 and c.volume_in_usd > 10000]
using QuantConnect.Data.UniverseSelection;

public override void Initialize()
{
    UniverseSettings.Asynchronous = True;
    SetBrokerageModel(BrokerageName.Coinbase, AccountType.Cash);
    _universe = AddUniverse(CryptoUniverse.Coinbase(UniverseSelectionFilter));
}

private IEnumerable<Symbol> UniverseSelectionFilter(IEnumerable<CryptoUniverse> universeDay)
{
    return from c in universeDay
           where c.Volume >= 100m && c.VolumeInUsd > 10000m
           select c.Symbol;
}

For more information about universe settings, see Settings .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object, and the lookback period. If there is no data in the period you request, the history result is empty.

var history = History(_universe, 30, Resolution.Daily);
foreach (var universeDay in history)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Log($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), universe_day in history.items():
    for universe_item in universe_day:
        self.log(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, and the lookback period. The UniverseHistory universe_history returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var universeDay in universeHistory)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Console.WriteLine($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (univere_symbol, time), universe_day in universe_history.items():
    for universe_item in universe_day:
        print(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

You can call the History history method in Research.

Remove Subscriptions

To unsubscribe from a Crypto pair that you added with the AddCrypto add_crypto method, call the RemoveSecurity remove_security method.

self.remove_security(self.btcusd)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings in the virtual pair .

Example Applications

The Coinbase Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

 

CoinAPI

Kraken Crypto Price Data

Introduction

The Kraken Crypto Price Data by CoinAPI provides Cryptocurrency price and volume data points. The data covers 710 Cryptocurrency pairs, starts in October 2013, and is delivered on any frequency from tick to daily. This dataset is created by monitoring the trading activity on the Cryptocurrency markets/exchanges supported by QuantConnect.

For more information about the Kraken Crypto Price Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CoinAPI was founded by Artur Pietrzyk in 2016 with the goal of providing real-time and historical cryptocurrency market data, collected from hundreds of exchanges. CoinAPI provides access to Cryptocurrencies for traders, market makers, and developers building third-party applications.

Getting Started

The following snippet demonstrates how to request data from the Kraken Crypto Price dataset:

# Kraken accepts both Cash and Margin type account.
self.set_brokerage_model(BrokerageName.KRAKEN, AccountType.CASH)
self.set_brokerage_model(BrokerageName.KRAKEN, AccountType.MARGIN)

self.btcusd = self.add_crypto("BTCUSD", Resolution.MINUTE, Market.KRAKEN).symbol

self._universe = self.add_universe(CryptoUniverse.kraken(self.universe_selection_filter));
// Kraken accepts both Cash and Margin type account.
SetBrokerageModel(BrokerageName.Kraken, AccountType.Cash);
SetBrokerageModel(BrokerageName.Kraken, AccountType.Margin);

_symbol = AddCrypto("BTCUSD", Resolution.Minute, Market.Kraken).Symbol;

_universe = AddUniverse(CryptoUniverse.Kraken(UniverseSelectionFilter));

Data Summary

The following table describes the dataset properties:

Property Value
Start Date October 2013
Asset Coverage 710 Currency Pairs
Data Density Dense
Resolution Tick, Second, Minute, Hourly, & Daily
Timezone UTC
Market Hours Always Open

Example Applications

The Kraken Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Kraken Crypto Price dataset provides TradeBar , QuoteBar , Tick , and CryptoUniverse objects.

TradeBar Attributes

TradeBar objects have the following attributes:

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

CryptoUniverse Attributes

CryptoUniverse objects have the following attributes:

Supported Assets

The following table shows the available Cryptocurrency pairs:

Requesting Data

To add Kraken Crypto Price data to your algorithm, call the AddCrypto method. Save a reference to the Crypto Symbol so you can access the data later in your algorithm.

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)

        # Kraken accepts both Cash and Margin type account.
        self.set_brokerage_model(BrokerageName.KRAKEN, AccountType.MARGIN)
        
        self.btcusd = self.add_crypto("BTCUSD", Resolution.MINUTE, Market.KRAKEN).symbol
namespace QuantConnect
{
    public class CoinAPIDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        
        public override void Initialize()
        {
            SetStartDate(2020, 6, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);

            // Kraken accepts both Cash and Margin type account.
            SetBrokerageModel(BrokerageName.Kraken, AccountType.Margin);
            
            _symbol = AddCrypto("BTCUSD", Resolution.Minute, Market.Kraken).Symbol;
        }
    }
}

For more information about creating Crypto subscriptions, see Requesting Data .

Accessing Data

To get the current Kraken Crypto Price data, index the Bars bars , QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Crypto Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.btcusd in slice.bars:
        trade_bar = slice.bars[self.btcusd]
        self.log(f"{self.btcusd} close at {slice.time}: {trade_bar.close}")

    if self.btcusd in slice.quote_bars:
        quote_bar = slice.quote_bars[self.btcusd]
        self.log(f"{self.btcusd} bid at {slice.time}: {quote_bar.bid.close}")

    if self.btcusd in slice.ticks:
        ticks = slice.ticks[self.btcusd]
        for tick in ticks:
            self.log(f"{self.btcusd} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.Bars.ContainsKey(_symbol))
    {
        var tradeBar = slice.Bars[_symbol];
        Log($"{_symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, trade_bar in slice.bars.items():
        self.log(f"{symbol} close at {slice.time}: {trade_bar.close}")

    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Bars)
    {
        var symbol = kvp.Key;
        var tradeBar = kvp.Value;
        Log($"{symbol} price at {slice.Time}: {tradeBar.Close}");
    }

    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing Crypto data, see Handling Data .

Historical Data

To get historical Kraken Crypto Price data, call the History history method with the Crypto Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.btcusd, 100, Resolution.DAILY)

# TradeBar objects
history_trade_bars = self.history[TradeBar](self.btcusd, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.btcusd, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.btcusd, timedelta(seconds=10), Resolution.TICK)
// TradeBar objects 
var historyTradeBars = History(_symbol, 100, Resolution.Daily);

// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of Kraken Crypto pairs, call the AddUniverse add_universe method with a CryptoUniverse object. A Crypto universe uses a selection function to select Crypto pairs based on their OHLCV and dollar volume of the previous day as of midnight Coordinated Universal Time (UTC).

from QuantConnect.Data.universe_selection import *

def initialize(self) -> None:
    self.set_brokerage_model(BrokerageName.KRAKEN, AccountType.MARGIN)
    self.universe_settings.asynchronous = True
    self._universe = self.add_universe(CryptoUniverse.kraken(self.universe_selection_filter))

def universe_selection_filter(self, universe_day):
    return [c.symbol for c in universe_day if c.volume >= 100 and c.volume_in_usd > 10000]
using QuantConnect.Data.UniverseSelection;

public override void Initialize()
{
    SetBrokerageModel(BrokerageName.Kraken, AccountType.Margin);
    UniverseSettings.Asynchronous = True;
    _universe = AddUniverse(CryptoUniverse.Kraken(UniverseSelectionFilter));
}

private IEnumerable<Symbol> UniverseSelectionFilter(IEnumerable<CryptoUniverse> universeDay)
{
    return from c in universeDay
           where c.Volume >= 100m && c.VolumeInUsd > 10000m
           select c.Symbol;
}

For more information about universe settings, see Settings .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object, and the lookback period. If there is no data in the period you request, the history result is empty.

var history = History(_universe, 30, Resolution.Daily);
foreach (var universeDay in history)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Log($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), universe_day in history.items():
    for universe_item in universe_day:
        self.log(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, and the lookback period. The UniverseHistory universe_history returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var universeDay in universeHistory)
{
    foreach (CryptoUniverse universeItem in universeDay)
    {
        Console.WriteLine($"{universeItem.Symbol} price at {universeItem.EndTime}: {universeItem.Close}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (univere_symbol, time), universe_day in universe_history.items():
    for universe_item in universe_day:
        print(f"{universe_item.symbol} price at {universe_item.end_time}: {universe_item.close}")

You can call the History history method in Research.

Remove Subscriptions

To unsubscribe from a Crypto pair that you added with the AddCrypto add_crypto method, call the RemoveSecurity remove_security method.

self.remove_security(self.btcusd)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings in the virtual pair .

Example Applications

The Kraken Crypto Price dataset enables you to accurately design strategies for Cryptocurrencies. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

OANDA

OANDA was co-founded by Dr. Stumm, a computer scientist and Dr. Olsen, an economist, in 1997. The company was born out of the belief that the Internet and technology would open up the markets for both currency data and trading. OANDA uses innovative computer and financial technology to provide Internet-based forex trading and currency information services to everyone, from individuals to large corporations, from portfolio managers to financial institutions. OANDA is a market maker and a trusted source for currency data. It has access to one of the world"s largest historical, high-frequency, filtered currency databases.

 

OANDA

CFD Data

Introduction

The CFD Data by OANDA serves 51 contracts for differences (CFD). The data starts as early as May 2002 and is delivered on any frequency from tick to daily. This dataset is created by QuantConnect processing raw tick data from OANDA.

For more information about the CFD Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

OANDA was co-founded by Dr. Stumm, a computer scientist and Dr. Olsen, an economist, in 1997. The company was born out of the belief that the Internet and technology would open up the markets for both currency data and trading. OANDA uses innovative computer and financial technology to provide Internet-based forex trading and currency information services to everyone, from individuals to large corporations, from portfolio managers to financial institutions. OANDA is a market maker and a trusted source for currency data. It has access to one of the world's largest historical, high-frequency, filtered currency databases.

Getting Started

The following snippet demonstrates how to request data from the CFD dataset:

self.xauusd = self.add_cfd("XAUUSD", Resolution.DAILY).symbol
_symbol = AddCfd("XAUUSD", Resolution.Daily).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date Mixed, earliest starts May 2002
Asset Coverage 51 Contracts
Data Density Dense
Resolution Tick, Second, Minute, Hour, & Daily
Timezone Mixed, in which the contract is listed*
Market Hours Always Open , except from Friday 5 PM EST to Sunday 5 PM EST.
Index CFDs depends on the underlying market hour*

* E.g.: DE30EUR tracks DAX30 Index, which is listed in Europe/Berlin timezone.

Example Applications

The CFD price data enables you to trade CFD assets in your algorithm. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The CFD dataset provides QuoteBar and Tick objects.

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

Supported Assets

The following table shows the available contracts:

Requesting Data

To add CFD data to your algorithm, call the AddCfd add_cfd method. Save a reference to the CFD Symbol so you can access the data later in your algorithm.

class CfdAlgorithm (QCAlgorithm):
    def initialize(self) -> None:
        self.set_account_currency('EUR');

        self.set_start_date(2019, 2, 20)
        self.set_end_date(2019, 2, 21)
        self.set_cash('EUR', 100000)

        self.de30eur = self.add_cfd('DE30EUR').symbol

        self.set_benchmark(self.de30eur)
namespace QuantConnect.Algorithm.CSharp
{
    public class CfdAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;

        public override void Initialize()
        {
            SetAccountCurrency("EUR");

            SetStartDate(2019, 2, 20);
            SetEndDate(2019, 2, 21);
            SetCash("EUR", 100000);

            _symbol = AddCfd("DE30EUR").Symbol;

            SetBenchmark(_symbol);
        }
    }
}

For more information about creating CFD subscriptions, see Requesting Data .

Accessing Data

To get the current CFD data, index the QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the CFD Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.de30eur in slice.quote_bars:
        quote_bar = slice.quote_bars[self.de30eur]
        self.log(f"{self.de30eur} bid at {slice.time}: {quote_bar.bid.close}")

    if self.de30eur in slice.ticks:
        ticks = slice.ticks[self.de30eur]
        for tick in ticks:
            self.log(f"{self.de30eur} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing CFD data, see Handling Data .

Historical Data

To get historical CFD data, call the History history method with the CFD Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.de30eur, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.de30eur, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.de30eur, timedelta(seconds=10), Resolution.TICK)
// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a CFD subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.de30eur)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings.

Example Applications

The CFD price data enables you to trade CFD assets in your algorithm. Examples include the following strategies:

For more example algorithms, see Examples .

 

OANDA

FOREX Data

Introduction

The FOREX Data by OANDA serves 71 foreign exchange (FOREX) pairs, starts on various dates from January 2007, and is delivered on any frequency from tick to daily. This dataset is created by QuantConnect processing raw tick data from OANDA.

For more information about the FOREX Data dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

OANDA was co-founded by Dr. Stumm, a computer scientist and Dr. Olsen, an economist, in 1997. The company was born out of the belief that the Internet and technology would open up the markets for both currency data and trading. OANDA uses innovative computer and financial technology to provide Internet-based forex trading and currency information services to everyone, from individuals to large corporations, from portfolio managers to financial institutions. OANDA is a market maker and a trusted source for currency data. It has access to one of the world's largest historical, high-frequency, filtered currency databases.

Getting Started

The following snippet demonstrates how to request data from the FOREX dataset:

self.eurusd = self.add_forex("EURUSD", Resolution.DAILY, Market.OANDA).symbol
_symbol = AddForex("EURUSD", Resolution.Daily, Market.Oanda).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2007
Asset Coverage 71 Currency pairs
Data Density Dense
Resolution Tick, Second, Minute, Hour, & Daily
Timezone UTC
Market Hours Always Open , except from Friday 5 PM EST to Sunday 5 PM EST

Example Applications

The FOREX price data enables you to trade currency pairs in the global mark. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The FOREX dataset provides QuoteBar and Tick objects.

QuoteBar Attributes

QuoteBar objects have the following attributes:

Tick Attributes

Tick objects have the following attributes:

Supported Assets

The following table shows the available Forex pairs:

Requesting Data

To add FOREX data to your algorithm, call the AddForex add_forex method. Save a reference to the Forex Symbol so you can access the data later in your algorithm.

class ForexAlgorithm (QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 2, 20)
        self.set_end_date(2019, 2, 21)
        self.set_cash(100000)

        self.eurusd = self.add_forex('EURUSD', Resolution.MINUTE, Market.OANDA).symbol

        self.set_benchmark(self.eurusd)
namespace QuantConnect.Algorithm.CSharp
{
    public class ForexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;

        public override void Initialize()
        {
            SetStartDate(2019, 2, 20);
            SetEndDate(2019, 2, 21);
            SetCash(100000);

            _symbol = AddForex("EURUSD", Resolution.Minute, Market.Oanda).Symbol;

            SetBenchmark(_symbol);
        }
    }
}

For more information about creating Forex subscriptions, see Requesting Data .

Accessing Data

To get the current Forex data, index the QuoteBars quote_bars , or Ticks ticks properties of the current Slice with the Forex Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your security at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if self.eurusd in slice.quote_bars:
        quote_bar = slice.quote_bars[self.eurusd]
        self.log(f"{self.eurusd} bid at {slice.time}: {quote_bar.bid.close}")

    if self.eurusd in slice.ticks:
        ticks = slice.ticks[self.eurusd]
        for tick in ticks:
            self.log(f"{self.eurusd} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    if (slice.QuoteBars.ContainsKey(_symbol))
    {
        var quoteBar = slice.QuoteBars[_symbol];
        Log($"{_symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    if (slice.Ticks.ContainsKey(_symbol))
    {
        var ticks = slice.Ticks[_symbol];
        foreach (var tick in ticks)
        {
            Log($"{_symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

You can also iterate through all of the data objects in the current Slice .

def on_data(self, slice: Slice) -> None:
    for symbol, quote_bar in slice.quote_bars.items():
        self.log(f"{symbol} bid at {slice.time}: {quote_bar.bid.close}")

    for symbol, ticks in slice.ticks.items():
        for tick in ticks:
            self.log(f"{symbol} price at {slice.time}: {tick.price}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.QuoteBars)
    {
        var symbol = kvp.Key;
        var quoteBar = kvp.Value;
        Log($"{symbol} bid at {slice.Time}: {quoteBar.Bid.Close}");
    }

    foreach (var kvp in slice.Ticks)
    {
        var symbol = kvp.Key;
        var ticks = kvp.Value;
        foreach (var tick in ticks)
        {
            Log($"{symbol} price at {slice.Time}: {tick.Price}");
        }
    }
}

For more information about accessing Forex data, see Handling Data .

Historical Data

To get historical Forex data, call the History history method with the Forex Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.eurusd, 100, Resolution.MINUTE)

# QuoteBar objects
history_quote_bars = self.history[QuoteBar](self.eurusd, 100, Resolution.MINUTE)

# Tick objects
history_ticks = self.history[Tick](self.eurusd, timedelta(seconds=10), Resolution.TICK)
// QuoteBar objects 
var historyQuoteBars = History<QuoteBar>(_symbol, 100, Resolution.Minute);

// Tick objects 
var historyTicks = History<Tick>(_symbol, TimeSpan.FromSeconds(10), Resolution.Tick);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a Forex pair subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.eurusd)
RemoveSecurity(_symbol);

The RemoveSecurity remove_security method cancels your open orders for the security and liquidates your holdings.

Example Applications

The FOREX price data enables you to trade currency pairs in the global mark. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Benzinga

Benzinga was founded by Jason Raznick in 2010 with goal of connecting the world with news, data, and education that makes the path to financial prosperity easier for everyone, everyday. Benzinga provides access to real-time news for individual investors.

 

Benzinga

Benzinga News Feed

Introduction

The Benzinga News Feed dataset by Benzinga tracks US Equity news releases. The data covers about 1,250 articles per day across 8,000 Equities, starts in January 2016, and is delivered on a second frequency. This dataset is created by structuring the content produced by Benzinga's editorial team.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Benzinga News Feed dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Benzinga was founded by Jason Raznick in 2010 with goal of connecting the world with news, data, and education that makes the path to financial prosperity easier for everyone, everyday. Benzinga provides access to real-time news for individual investors.

Getting Started

The following snippet demonstrates how to request data from the Benzinga News Feed dataset:

from QuantConnect.DataSource import *

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(BenzingaNews, self.symbol).symbol
using QuantConnect.DataSource;

_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<BenzingaNews>(_symbol).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date September 2017
Asset Coverage 8,000 Equities
Data Density Sparse
Resolution Second (1,250 Articles/Day)
Timezone New York

Example Applications

The Benzinga News Feed enables you to accurately design strategies harnessing real-time news releases. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Benzinga News Feed dataset provides BenzingaNews objects, which have the following attributes:

Requesting Data

To add Benzinga News Feed data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class BenzingaNewsDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2021, 1, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)
        
        self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
        self.dataset_symbol = self.add_data(BenzingaNews, self.symbol).symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class BenzingaNewsDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;
        
        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
            
            _symbol = AddEquity("AAPL", Resolution.Minute).Symbol;
            _datasetSymbol = AddData<BenzingaNews>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Benzinga News Feed data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        article = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} title at {slice.time}: {article.title}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var article = slice[_datasetSymbol];
        Log($"{_datasetSymbol} title at {slice.Time}: {article.Mentions}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, article in slice.get(BenzingaNews).items():
        self.log(f"{dataset_symbol} title at {slice.time}: {article.title}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<BenzingaNews>())
    {
        var datasetSymbol = kvp.Key;
        var article = kvp.Value;
        Log($"{datasetSymbol} title at {slice.Time}: {article.Title}");
    }
}

Historical Data

To get historical Benzinga News Feed data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[BenzingaNews](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<BenzingaNews>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to Benzinga News Feed data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Benzinga News Feed enables you to accurately design strategies harnessing real-time news releases. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Blockchain

Blockchain is a website that publishes data related to Bitcoin. It has been online since 2011 and publishes the Bitcoin Metadata history back to 2009.

 

Blockchain

Bitcoin Metadata

Introduction

The Bitcoin Metadata dataset by Blockchain provides 23 fundamental metadata of Bitcoin directly fetched from the Bitcoin blockchain. The data starts in January 2009 and delivered on a daily frequency. This dataset contains mining statistics like hash rate and miner revenue; transaction metadata like transaction per block, transaction fee, and number of addresses; and blockchain metadata like blockchain size and block size.

For more information about the Bitcoin Metadata dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Blockchain is a website that publishes data related to Bitcoin. It has been online since 2011 and publishes the Bitcoin Metadata history back to 2009.

Getting Started

The following snippet demonstrates how to request data from the Bitcoin Metadata dataset:

from QuantConnect.DataSource import *

self.btcusd = self.add_crypto("BTCUSD", Resolution.DAILY, Market.BITFINEX).symbol
self.dataset_symbol = self.add_data(BitcoinMetadata, self.btcusd).symbol
using QuantConnect.DataSource;

_symbol = AddCrypto("BTCUSD", Resolution.Daily, Market.Bitfinex).Symbol;
_datasetSymbol = AddData<BitcoinMetadata>(_symbol).Symbol; 

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2009
Coverage Bitcoin blockchain
Data Density Regular
Resolution Daily
Timezone UTC

Example Applications

The Bitcoin Metadata dataset enables you to incorporate metadata from the Bitcoin blockchain into your strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Bitcoin Metadata dataset provides BitcoinMetadata objects, which have the following attributes:

Requesting Data

To add Bitcoin Metadata data to your algorithm, call the AddData add_data method with the BTCUSD Symbol . Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class BlockchainBitcoinMetadataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.btcusd = self.add_crypto("BTCUSD", Resolution.DAILY, Market.BITFINEX).symbol
        self.dataset_symbol = self.add_data(BitcoinMetadata, self.btcusd).symbol 
namespace QuantConnect
{
    public class BlockchainBitcoinMetadataAlgorithm: QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);

            _symbol = AddCrypto("BTCUSD", Resolution.Daily, Market.Bitfinex).Symbol;
            _datasetSymbol = AddData<BitcoinMetadata>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Bitcoin Metadata data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} miner revenue at {slice.time}: {data_point.miners_revenue}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} miner revenue at {slice.Time}: {dataPoint.MinersRevenue}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(BlockchainBitcoinData).items():
        self.log(f"{dataset_symbol} miner revenue at {slice.time}: {data_point.miners_revenue}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<BlockchainBitcoinData>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} miner revenue at {slice.Time}: {dataPoint.MinersRevenue}");
    }
}

Historical Data

To get historical Bitcoin Metadata data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[BlockchainBitcoinData](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<BlockchainBitcoinData>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The Bitcoin Metadata dataset enables you to incorporate metadata from the Bitcoin blockchain into your strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Brain

Brain is a Research Company that creates proprietary datasets and algorithms for investment strategies, combining experience in financial markets with strong competencies in Statistics, Machine Learning, and Natural Language Processing. The founders share a common academic background of research in Physics as well as extensive experience in Financial markets.

 

Brain

Brain Language Metrics on Company Filings

Introduction

The Brain Language Metrics on Company Filings dataset provides the results of an NLP system that monitors several language metrics on 10-K and 10-Q company reports for US Equities. The data covers 5,000 US Equities, starts in January 2010, and is delivered on a daily frequency. The dataset is made of two parts; the first one includes the language metrics of the most recent 10-K or 10-Q report for each firm, namely:

  1. Financial sentiment
  2. Percentage of words belonging to financial domain classified by language types (e.g. “litigious” or “constraining” language)
  3. Readability score
  4. Lexical metrics such as lexical density and richness
  5. Text statistics such as the report length and the average sentence length

The second part includes the differences between the two most recent 10-Ks or 10-Qs reports of the same period for each company, namely:

  1. Difference of the various language metrics (e.g. delta sentiment, delta readability score, delta percentage of a specific language type etc.)
  2. Similarity metrics between documents, also with respect to a specific language type (for example similarity with respect to “litigious” language or “uncertainty” language)

The analysis is available for the whole report and for specific sections of the report (e.g. Risk Factors and MD&A).

For more information, refer to Brain's summary paper .

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Brain Language Metrics on Company Filings dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Brain is a Research Company that creates proprietary datasets and algorithms for investment strategies, combining experience in financial markets with strong competencies in Statistics, Machine Learning, and Natural Language Processing. The founders share a common academic background of research in Physics as well as extensive experience in Financial markets.

Getting Started

The following snippet demonstrates how to request data from the Brain Language Metrics on Company Filings dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_10k_symbol = self.add_data(BrainCompanyFilingLanguageMetrics10K , self.aapl).symbol
self.dataset_all_symbol = self.add_data(BrainCompanyFilingLanguageMetricsAll, self.aapl).symbol

self.universe_10k = self.add_universe(BrainCompanyFilingLanguageMetricsUniverse10K, self.universe_selection)
self.universe_all = self.add_universe(BrainCompanyFilingLanguageMetricsUniverseAll, self.universe_selection)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_dataset10KSymbol = AddData<BrainCompanyFilingLanguageMetrics10K>(_symbol).Symbol;
_datasetAllSymbol = AddData<BrainCompanyFilingLanguageMetricsAll>(_symbol).Symbol;

_universe10k = AddUniverse<BrainCompanyFilingLanguageMetricsUniverse10K>(UniverseSelection);
_universeAll = AddUniverse<BrainCompanyFilingLanguageMetricsUniverseAll>(UniverseSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2010
Asset Coverage* 5,000 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC
The coverage includes all assets since the start date. It increases over time.

Example Applications

The Brain Language Metrics on Company Filings dataset enables you to test strategies using language metrics and their differences gathered from 10K and 10Q reports. Examples include the following strategies:

Disclaimer: The dataset is provided by the data provider for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor do they constitute an offer to provide investment advisory or other services by the data provider.

For more example algorithms, see Examples .

Data Point Attributes

The Brain Language Metrics on Company Filings dataset provides BrainCompanyFilingLanguageMetrics and BrainCompanyFilingLanguageMetricsUniverse objects.

BrainCompanyFilingLanguageMetrics Attributes

BrainCompanyFilingLanguageMetrics objects have the following attributes:

BrainCompanyFilingLanguageMetricsUniverse Attributes

BrainCompanyFilingLanguageMetricsUniverse objects have the following attributes:

Requesting Data

To add Brain Language Metrics on Company Filings data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class BrainCompanyFilingNLPDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2010, 1, 1)
        self.set_end_date(2021, 7, 8)
        self.set_cash(100000)
        
        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_10k_symbol = self.add_data(BrainCompanyFilingLanguageMetrics10K, self.aapl).symbol
        self.dataset_all_symbol = self.add_data(BrainCompanyFilingLanguageMetricsAll, self.aapl).symbol
namespace QuantConnect
{
    public class BrainCompanyFilingNLPDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _dataset10KSymbol, _datasetAllSymbol;
    	
        public override void Initialize()
        {
            SetStartDate(2010, 1, 1);
            SetEndDate(2021, 7, 8);
            SetCash(100000);
            
            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _dataset10KSymbol= AddData<BrainCompanyFilingLanguageMetrics10K>(_symbol).Symbol;
            _datasetAllSymbol= AddData<BrainCompanyFilingLanguageMetricsAll>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Brain Language Metrics on Company Filings data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_10k_symbol):
        data_point = slice[self.dataset_10k_symbol]
        self.log(f"{self.dataset_10k_symbol} report sentiment at {slice.time}: {data_point.report_sentiment.sentiment}")

    if slice.contains_key(self.dataset_all_symbol):
        data_point = slice[self.dataset_all_symbol]
        self.log(f"{self.dataset_all_symbol} report sentiment at {slice.time}: {data_point.report_sentiment.sentiment}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_dataset10KSymbol))
    {
        var dataPoint = slice[_dataset10KSymbol];
        Log($"{_dataset10KSymbol} report sentiment at {slice.Time}: {dataPoint.ReportSentiment.Sentiment}");
    }

    if (slice.ContainsKey(_datasetAllSymbol))
    {
        var dataPoint = slice[_datasetAllSymbol];
        Log($"{_datasetAllSymbol} report sentiment at {slice.Time}: {dataPoint.ReportSentiment.Sentiment}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(BrainCompanyFilingLanguageMetrics10K).items():
        self.log(f"{dataset_symbol} report sentiment at {slice.time}: {data_point.report_sentiment.sentiment}")

    for dataset_symbol, data_point in slice.get(BrainCompanyFilingLanguageMetricsAll).items():
        self.log(f"{dataset_symbol} report sentiment at {slice.time}: {data_point.report_sentiment.sentiment}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<BrainCompanyFilingLanguageMetrics10K>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} report sentiment at {slice.Time}: {dataPoint.ReportSentiment.Sentiment}");
    }

    foreach (var kvp in slice.Get<BrainCompanyFilingLanguageMetricsAll>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} report sentiment at {slice.Time}: {dataPoint.ReportSentiment.Sentiment}");
    }
}

Historical Data

To get historical Brain Language Metrics on Company Filings data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrames
ten_k_history_df = self.history(self.dataset_10k_symbol, 100, Resolution.DAILY)
all_history_df = self.history(self.dataset_all_symbol, 100, Resolution.DAILY)
history_df = self.history([self.dataset_10k_symbol, self.dataset_all_symbol], 100, Resolution.DAILY)

# Dataset objects
ten_k_history_bars = self.history[BrainCompanyFilingLanguageMetrics10K](self.dataset_10k_symbol, 100, Resolution.DAILY)
all_history_bars = self.history[BrainCompanyFilingLanguageMetricsAll](self.dataset_all_symbol, 100, Resolution.DAILY)
// Dataset objects
var tenKHistory = History<BrainCompanyFilingLanguageMetrics10K>(_dataset10KSymbol, 100, Resolution.Daily);
var allHistory = History<BrainCompanyFilingLanguageMetricsAll>(_datasetAllSymbol, 100, Resolution.Daily);

// Slice objects
var history = History(new[] {_dataset10KSymbol, _datasetAllSymbol}, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on Brain Language Metrics on Company Filings data, call the AddUniverse add_universe method with the BrainCompanyFilingLanguageMetricsUniverseAll class or the BrainCompanyFilingLanguageMetricsUniverse10K class and a selection function.

def initialize(self) -> None:
    self._universe = self.add_universe(BrainCompanyFilingLanguageMetricsUniverseAll, self.universe_selection)

def universe_selection(self, alt_coarse: List[BrainCompanyFilingLanguageMetricsUniverseAll]) -> List[Symbol]:
    return [d.symbol for d in alt_coarse \
                if d.report_sentiment.sentiment > 0 \
                and d.management_discussion_analyasis_of_financial_condition_and_results_of_operations.sentiment > 0]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<BrainCompanyFilingLanguageMetricsUniverseAll>(altCoarse =>
    {
        return from d in altCoarse.OfType<BrainCompanyFilingLanguageMetricsUniverseAll>()
            where d.ReportSentiment.Sentiment > 0m && 
                       d.ManagementDiscussionAnalyasisOfFinancialConditionAndResultsOfOperations.Sentiment > 0m
            select d.Symbol;
    });
}

For more information about dynamic universes, see Universes .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(_universe, 30, Resolution.Daily);
foreach (var universeDay in universeHistory)
{
    foreach (BrainCompanyFilingLanguageMetricsUniverse10K languageMetrics in universeDay)
    {
        Log($"{languageMetrics.Symbol} sentiment at {languageMetrics.EndTime}: {languageMetrics.ReportSentiment.Sentiment}");
    }
}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (_, time), universeDay in universe_history.items():
    for language_metrics in universeDay:
        self.log(f"{language_metrics.symbol} sentiment at {language_metrics.end_time}: {language_metrics.report_sentiment.sentiment}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var universeDay in universeHistory)
{
    foreach (BrainCompanyFilingLanguageMetricsUniverse10K languageMetrics in universeDay)
    {
        Console.WriteLine($"{languageMetrics.Symbol} sentiment at {languageMetrics.EndTime}: {languageMetrics.ReportSentiment.Sentiment}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (_, time), universeDay in universe_history.items():
    for language_metrics in universeDay:
        print(f"{language_metrics.symbol} sentiment at {language_metrics.end_time}: {language_metrics.report_sentiment.sentiment}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_10k_symbol)
self.remove_security(self.dataset_all_symbol)
RemoveSecurity(_dataset10KSymbol);
RemoveSecurity(_datasetAllSymbol);

If you subscribe to Brain Language Metrics on Company Filings data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Brain Language Metrics on Company Filings dataset enables you to test strategies using language metrics and their differences gathered from 10K and 10Q reports. Examples include the following strategies:

Disclaimer: The dataset is provided by the data provider for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor do they constitute an offer to provide investment advisory or other services by the data provider.

For more example algorithms, see Examples .

 

Brain

Brain ML Stock Ranking

Introduction

The Brain ML Stock Ranking dataset by Brain generates a daily ranking for US Equities based on their predicted ranking of future returns relative to the universe median across four-time horizons: next 2, 3, 5, 10, and 21 days (one trading month). The data covers 1,000 US Equities (universe updated yearly by including the largest 1,000 US companies of the previous year), starts in January 2010, and is delivered on a daily frequency. This dataset is created by a voting scheme of machine learning classifiers that non-linearly combine a variety of features with a series of techniques aimed at mitigating the well-known overfitting problem for financial data with a low signal-to-noise ratio. Examples of features are time-varying stock-specific features like price and volume-related metrics or fundamentals; time-fixed stock-specific features like the sector and other database information; market regime features such as volatility and other financial stress indicators; calendar features representing possible anomalies, for example, the month of the year.

More precisely the ML Stock Ranking score is related to the confidence of a Machine Learning classifier in predicting top or bottom quintile returns for the next N trading days (e.g. next 21 trading days) for a stock with the respect to the median of the universe and ranges from -1 to +1.

A negative score means that the system is more confident that the stock belongs to the lower returns quintile, a positive score means that the system is more confident that the stock belongs to the higher returns quintile. It is important to note that the score has a meaning only if used to compare different stocks to perform a ranking.

Typical use is to download the score for a large stock universe for a given day, e.g. 500 stocks or the full universe of 1000 stocks, order the stocks by mlAlpha score and go long the top K stocks, or build a long-short strategy going long the top K and short the bottom K stocks.

For more information, refer to Brain's summary paper .

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Brain ML Stock Ranking dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Brain is a Research Company that creates proprietary datasets and algorithms for investment strategies, combining experience in financial markets with strong competencies in Statistics, Machine Learning, and Natural Language Processing. The founders share a common academic background of research in Physics as well as extensive experience in Financial markets.

Getting Started

The following snippet demonstrates how to request data from the Brain ML Stock Ranking dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(BrainStockRanking2Day, self.aapl).symbol

self._universe = self.add_universe(BrainStockRankingUniverse, self.universe_selection)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<BrainStockRanking2Day>(_symbol).Symbol;

_universe = AddUniverse<BrainStockRankingUniverse>(UniverseSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2010
Asset Coverage* 1,000 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC
The coverage includes all assets since the start date. It increases over time.

Example Applications

The Brain ML Stock Ranking dataset enables you to test strategies using the machine learning ranking provided by Brain. Examples include the following strategies:

Disclaimer: The dataset is provided by the data provider for informational purposes only and do not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor do they constitute an offer to provide investment advisory or other services by the data provider.

For more example algorithms, see Examples .

Data Point Attributes

The Brain ML Stock Ranking dataset provides BrainStockRankingBase and BrainStockRankingUniverse objects.

BrainStockRankingBase Attributes

BrainStockRankingBase objects have the following attributes:

BrainStockRankingUniverse Attributes

BrainStockRankingUniverse objects have the following attributes:

Requesting Data

To add Brain ML Stock Ranking data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class BrainMLRankingDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2021, 1, 1)
        self.set_end_date(2021, 7, 8)
        self.set_cash(100000)
        
        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.two_day_symbol = self.add_data(BrainStockRanking2Day, self.aapl).symbol
        self.three_day_symbol = self.add_data(BrainStockRanking3Day, self.aapl).symbol
        self.five_day_symbol = self.add_data(BrainStockRanking5Day, self.aapl).symbol
        self.ten_day_symbol = self.add_data(BrainStockRanking10Day, self.aapl).symbol
        self.month_symbol = self.add_data(BrainStockRanking21Day, self.aapl).symbol
namespace QuantConnect
{
    public class BrainMLRankingDataAlgorithm : QCAlgorithm
    {
    	private Symbol _symbol, _2DaySymbol, _3DaySymbol, _5DaySymbol, _10DaySymbol, _monthSymbol;
    	
        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2021, 7, 8);
            SetCash(100000);
            
            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _2DaySymbol = AddData<BrainStockRanking2Day>(_symbol).Symbol;
            _3DaySymbol = AddData<BrainStockRanking3Day>(_symbol).Symbol;
            _5DaySymbol = AddData<BrainStockRanking5Day>(_symbol).Symbol;
            _10DaySymbol = AddData<BrainStockRanking10Day>(_symbol).Symbol;
            _monthSymbol = AddData<BrainStockRanking21Day>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Brain ML Stock Ranking data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.two_day_symbol):
        data_point = slice[self.two_day_symbol]
        self.log(f"{self.two_day_symbol} rank at {slice.time}: {data_point.rank}")

    if slice.contains_key(self.three_day_symbol):
        data_point = slice[self.three_day_symbol]
        self.log(f"{self.three_day_symbol} rank at {slice.time}: {data_point.rank}")

    if slice.contains_key(self.five_day_symbol):
        data_point = slice[self.five_day_symbol]
        self.log(f"{self.five_day_symbol} rank at {slice.time}: {data_point.rank}")

    if slice.contains_key(self.ten_day_symbol):
        data_point = slice[self.ten_day_symbol]
        self.log(f"{self.ten_day_symbol} rank at {slice.time}: {data_point.rank}")

    if slice.contains_key(self.month_symbol):
        data_point = slice[self.month_symbol]
        self.log(f"{self.month_symbol} rank at {slice.time}: {data_point.rank}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_2DaySymbol))
    {
        var dataPoint = slice[_2DaySymbol];
        Log($"{_2DaySymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }

    if (slice.ContainsKey(_3DaySymbol))
    {
        var dataPoint = slice[_3DaySymbol];
        Log($"{_3DaySymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }

    if (slice.ContainsKey(_5DaySymbol))
    {
        var dataPoint = slice[_5DaySymbol];
        Log($"{_5DaySymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }

    if (slice.ContainsKey(_10DaySymbol))
    {
        var dataPoint = slice[_10DaySymbol];
        Log($"{_10DaySymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }

    if (slice.ContainsKey(_monthSymbol))
    {
        var dataPoint = slice[_monthSymbol];
        Log($"{_monthSymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(BrainStockRanking2Day).items():
        self.log(f"{dataset_symbol} rank at {slice.time}: {data_point.rank}")

    for dataset_symbol, data_point in slice.get(BrainStockRanking3Day).items():
        self.log(f"{dataset_symbol} rank at {slice.time}: {data_point.rank}")

    for dataset_symbol, data_point in slice.get(BrainStockRanking5Day).items():
        self.log(f"{dataset_symbol} rank at {slice.time}: {data_point.rank}")

    for dataset_symbol, data_point in slice.get(BrainStockRanking10Day).items():
        self.log(f"{dataset_symbol} rank at {slice.time}: {data_point.rank}")

    for dataset_symbol, data_point in slice.get(BrainStockRanking21Day).items():
        self.log(f"{dataset_symbol} rank at {slice.time}: {data_point.rank}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<BrainStockRanking2Day>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }

    foreach (var kvp in slice.Get<BrainStockRanking3Day>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }

    foreach (var kvp in slice.Get<BrainStockRanking5Day>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }

    foreach (var kvp in slice.Get<BrainStockRanking10Day>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }

    foreach (var kvp in slice.Get<BrainStockRanking21Day>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} rank at {slice.Time}: {dataPoint.Rank}");
    }
}

Historical Data

To get historical Brain ML Stock Ranking data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrames
two_day_history_df = self.history(self.two_day_symbol, 100, Resolution.DAILY)
three_day_history_df = self.history(self.three_day_symbol, 100, Resolution.DAILY)
five_day_history_df = self.history(self.five_day_symbol, 100, Resolution.DAILY)
ten_day_history_df = self.history(self.ten_day_symbol, 100, Resolution.DAILY)
thirty_day_history_df = self.history(self.month_symbol, 100, Resolution.DAILY)
history_df = self.history([self.two_day_symbol, 
                           self.three_day_symbol, 
                           self.five_day_symbol, 
                           self.ten_day_symbol,
                           self.month_symbol], 100, Resolution.DAILY)

# Dataset objects
two_day_history_bars = self.history[BrainStockRanking2Day](self.two_day_symbol, 100, Resolution.DAILY)
three_day_history_bars = self.history[BrainStockRanking3Day](self.three_day_symbol, 100, Resolution.DAILY)
five_day_history_bars = self.history[BrainStockRanking5Day](self.five_day_symbol, 100, Resolution.DAILY)
ten_day_history_bars = self.history[BrainStockRanking10Day](self.ten_day_symbol, 100, Resolution.DAILY)
month_history_bars = self.history[BrainStockRanking21Day](self.month_symbol, 100, Resolution.DAILY)
// Dataset objects
var twoDayHistory = History<BrainStockRanking2Day>(_2DaySymbol, 100, Resolution.Daily);
var threeDayHistory = History<BrainStockRanking3Day>(_3DaySymbol, 100, Resolution.Daily);
var fiveDayHistory = History<BrainStockRanking5Day>(_5DaySymbol, 100, Resolution.Daily);
var tenDayHistory = History<BrainStockRanking10Day>(_10DaySymbol, 100, Resolution.Daily);
var monthHistory = History<BrainStockRanking21Day>(_monthSymbol, 100, Resolution.Daily);

// Slice objects
var history = History(new[] {_2DaySymbol, _3DaySymbol, _5DaySymbol, 
                             _10DaySymbol, _monthSymbol}, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on Brain ML Stock Ranking data, call the AddUniverse add_universe method with the BrainStockRankingUniverse class and a selection function.

def initialize(self) -> None:
    self._universe = self.add_universe(BrainStockRankingUniverse, self.universe_selection)

def universe_selection(self, alt_coarse: List[BrainStockRankingUniverse]) -> List[Symbol]:
    return [d.symbol for d in alt_coarse \
                if d.rank2_days > 0 \
                and d.rank3_days > 0 \
                and d.rank5_days > 0]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<BrainStockRankingUniverse>(altCoarse =>
    {
        return from d in altCoarsee.OfType<BrainStockRankingUniverse>() 
            where d.Rank2Days > 0m && d.Rank3Days > 0m  && d.Rank5Days > 0m
            select d.Symbol;
    })
};

For more information about dynamic universes, see Universes .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(_universe, 30, Resolution.Daily);
foreach (var ranks in universeHistory)
{
    foreach (BrainStockRankingUniverse rank in ranks)
    {
        Log($"{rank.Symbol} 2-day rank at {rank.EndTime}: {rank.Rank2Days}");
    }
}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (_, time), ranks in universe_history.items():
    for rank in ranks:
        self.log(f"{rank.symbol} 2-day rank at {rank.end_time}: {rank.rank2_days}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var ranks in universeHistory)
{
    foreach (BrainStockRankingUniverse rank in ranks)
    {
        Console.WriteLine($"{rank.Symbol} 2-day rank at {rank.EndTime}: {rank.Rank2Days}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (_, time), ranks in universe_history.items():
    for rank in ranks:
        print(f"{rank.symbol} 2-day rank at {rank.end_time}: {rank.rank2_days}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.two_day_symbol)
self.remove_security(self.three_day_symbol)
self.remove_security(self.five_day_symbol)
self.remove_security(self.ten_day_symbol)
self.remove_security(self.month_symbol)
RemoveSecurity(_2DaySymbol);
RemoveSecurity(_3DaySymbol);
RemoveSecurity(_5DaySymbol);
RemoveSecurity(_10DaySymbol);
RemoveSecurity(_monthSymbol);

If you subscribe to Brain ML Stock Ranking data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Brain ML Stock Ranking dataset enables you to test strategies using the machine learning ranking provided by Brain. Examples include the following strategies:

Disclaimer: The dataset is provided by the data provider for informational purposes only and do not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor do they constitute an offer to provide investment advisory or other services by the data provider.

For more example algorithms, see Examples .

 

Brain

Brain Sentiment Indicator

Introduction

The Brain Sentiment Indicator dataset by Brain tracks the public sentiment around US Equities. The data covers 4,500 US Equities, starts in August 2016, and is delivered on a daily frequency. This dataset is created by analyzing financial news using Natural Language Processing techniques while taking into account the similarity and repetition of news on the same topic. The sentiment score assigned to each stock ranges from -1 (most negative) to +1 (most positive). The sentiment score corresponds to the average sentiment for each piece of news. The score is updated daily and is available on two time scales: 7 days and 30 days. For more information, see Brain's summary paper .

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Brain Sentiment Indicator dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Brain is a Research Company that creates proprietary datasets and algorithms for investment strategies, combining experience in financial markets with strong competencies in Statistics, Machine Learning, and Natural Language Processing. The founders share a common academic background of research in Physics as well as extensive experience in Financial markets.

Getting Started

The following snippet demonstrates how to request data from the Brain Sentiment Indicator dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_7day_symbol = self.add_data(BrainSentimentIndicator7Day, self.aapl).symbol
self.dataset_30day_symbol = self.add_data(BrainSentimentIndicator30Day, self.aapl).symbol

self._universe = self.add_universe(BrainSentimentIndicatorUniverse, self.universe_selection)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_dataset7DaySymbol = AddData<BrainSentimentIndicator7Day>(_symbol).Symbol;
_dataset30DaySymbol = AddData<BrainSentimentIndicator30Day>(_symbol).Symbol;

_universe = AddUniverse<BrainSentimentIndicatorUniverse>(UniverseSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date August 2016
Asset Coverage* 4,500 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC
The coverage includes all assets since the start date. It increases over time.

Example Applications

The Brain Sentiment Indicator dataset enables you to incorporate sentiment from financial news sources into your strategies. Examples include the following strategies:

Disclaimer: The dataset is provided by the data provider for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor do they constitute an offer to provide investment advisory or other services by the data provider.

For more example algorithms, see Examples .

Data Point Attributes

The Brain Sentiment Indicator dataset provides BrainSentimentIndicatorBase and BrainSentimentIndicatorUniverse objects.

BrainSentimentIndicatorBase Attributes

BrainSentimentIndicatorBase objects have the following attributes:

BrainSentimentIndicatorUniverse Attributes

BrainSentimentIndicatorUniverse objects have the following attributes:

Requesting Data

To add Brain Sentiment Indicator data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class BrainSentimentDataAlgorithm(QCAlgorithm):
    
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2021, 7, 8)
        self.set_cash(100000)
        
        symbol = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_7day_symbol = self.add_data(BrainSentimentIndicator7Day, symbol).symbol
        self.dataset_30day_symbol = self.add_data(BrainSentimentIndicator30Day, symbol).symbol
namespace QuantConnect
{
    public class BrainSentimentDataAlgorithm : QCAlgorithm
    {
        private Symbol _dataset7DaySymbol, _dataset30DaySymbol;
    	
        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2021, 7, 8);
            SetCash(100000);
            
            var symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _dataset7DaySymbol = AddData<BrainSentimentIndicator7Day>(symbol).Symbol;
            _dataset30DaySymbol = AddData<BrainSentimentIndicator30Day>(symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Brain Sentiment Indicator data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_7day_symbol):
        data_point = slice[self.dataset_7day_symbol]
        self.log(f"{self.dataset_7day_symbol} sentiment at {slice.time}: {data_point.sentiment}")

    if slice.contains_key(self.dataset_30day_symbol):
        data_point = slice[self.dataset_30day_symbol]
        self.log(f"{self.dataset_30day_symbol} sentiment at {slice.time}: {data_point.sentiment}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_dataset7DaySymbol))
    {
        var dataPoint = slice[_dataset7DaySymbol];
        Log($"{_dataset7DaySymbol} sentiment at {slice.Time}: {dataPoint.Sentiment}");
    }

    if (slice.ContainsKey(_dataset30DaySymbol))
    {
        var dataPoint = slice[_dataset30DaySymbol];
        Log($"{_dataset30DaySymbol} sentiment at {slice.Time}: {dataPoint.Sentiment}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(BrainSentimentIndicator7Day).items():
        self.log(f"{dataset_symbol} sentiment at {slice.time}: {data_point.sentiment}")

    for dataset_symbol, data_point in slice.get(BrainSentimentIndicator30Day).items():
        self.log(f"{dataset_symbol} sentiment at {slice.time}: {data_point.sentiment}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<BrainSentimentIndicator7Day>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} sentiment at {slice.Time}: {dataPoint.Sentiment}");
    }

    foreach (var kvp in slice.Get<BrainSentimentIndicator30Day>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} sentiment at {slice.Time}: {dataPoint.Sentiment}");
    }
}

Historical Data

To get historical Brain Sentiment Indicator data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrames
week_history_df = self.history(self.dataset_7day_symbol, 100, Resolution.DAILY)
month_history_df = self.history(self.dataset_30day_symbol, 100, Resolution.DAILY)
history_df = self.history([self.dataset_7day_symbol, self.dataset_30day_symbol], 100, Resolution.DAILY)

# Dataset objects
week_history_bars = self.history[BrainSentimentIndicator7Day](self.dataset_7day_symbol, 100, Resolution.DAILY)
month_history_bars = self.history[BrainSentimentIndicator30Day](self.dataset_30day_symbol, 100, Resolution.DAILY)
// Dataset objects
var weekHistory = History<BrainSentimentIndicator7Day>(_dataset7DaySymbol, 100, Resolution.Daily);
var monthHistory = History<BrainSentimentIndicator30Day>(_dataset30DaySymbol, 100, Resolution.Daily);

// Slice objects
var history = History(new[] {_dataset7DaySymbol, _dataset30DaySymbol}, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on Brain Sentiment Indicator data, call the AddUniverse add_universe method with the BrainSentimentIndicatorUniverse class and a selection function.

def initialize(self) -> None:
    self._universe = self.add_universe(BrainSentimentIndicatorUniverse, self.universe_selection)

def universe_selection(self, alt_coarse: List[BrainSentimentIndicatorUniverse]) -> List[Symbol]:
    return [d.symbol for d in alt_coarse \
                if d.total_article_mentions7_days > 0 \
                and d.sentiment7_days]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<BrainSentimentIndicatorUniverse>(altCoarse=>
    {
        return from d in altCoarse.OfType<BrainSentimentIndicatorUniverse>()
            where d.TotalArticleMentions7Days > 0m && d.Sentiment7Days > 0m
            select d.Symbol;
    });
}

The Brain Sentiment Indicator universe runs at 7 AM Eastern Time (ET) in live trading. For more information about dynamic universes, see Universes .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(_universe, 30, Resolution.Daily);
foreach (var sentiments in universeHistory)
{
    foreach (BrainSentimentIndicatorUniverse sentiment in sentiments)
    {
        Log($"{sentiment.Symbol} 7-day sentiment at {sentiment.EndTime}: {sentiment.Sentiment7Days}");
    }
}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (_, time), sentiments in universe_history.items():
    for sentiment in sentiments:
        self.log(f"{sentiment.symbol} 7-day sentiment at {sentiment.end_time}: {sentiment.sentiment7_days}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var sentiments in universeHistory)
{
    foreach (BrainSentimentIndicatorUniverse sentiment in sentiments)
    {
        Console.WriteLine($"{sentiment.Symbol} 7-day sentiment at {sentiment.EndTime}: {sentiment.Sentiment7Days}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (_, time), sentiments in universe_history.items():
    for sentiment in sentiments:
        print(f"{sentiment.symbol} 7-day sentiment at {sentiment.end_time}: {sentiment.sentiment7_days}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_7day_symbol)
self.remove_security(self.dataset_30day_symbol)
RemoveSecurity(_dataset7DaySymbol);
RemoveSecurity(_dataset30DaySymbol);

If you subscribe to Brain Sentiment Indicator data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Brain Sentiment Indicator dataset enables you to incorporate sentiment from financial news sources into your strategies. Examples include the following strategies:

Disclaimer: The dataset is provided by the data provider for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor do they constitute an offer to provide investment advisory or other services by the data provider.

For more example algorithms, see Examples .

 

Datasets

CBOE

The Chicago Board Options Exchange ( CBOE ) is the largest U.S. options exchange with annual trading volume that hovered around 1.27 billion contracts at the end of 2014. CBOE offers Options on over 2,200 companies, 22 Equity indices, and 140 exchange-traded funds (ETFs).

 

CBOE

VIX Daily Price

Introduction

The VIX Daily Price dataset by CBOE covers 14 US volatility indices. The data starts in January 1990 and is delivered on a daily frequency. The dataset is cached daily from the CBOE website. The volatility index measures the stock market's expectation of volatility on the market index (e.g.: S&P500) using implied volatility from its Options for a fixed time horizon.

For more information about the VIX Daily Price dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

The Chicago Board Options Exchange ( CBOE ) is the largest U.S. options exchange with annual trading volume that hovered around 1.27 billion contracts at the end of 2014. CBOE offers Options on over 2,200 companies, 22 Equity indices, and 140 exchange-traded funds (ETFs).

Getting Started

The following snippet demonstrates how to request data from the VIX Daily Price dataset:

using QuantConnect.DataSource;

_datasetSymbol = AddData<CBOE>("VIX", Resolution.Daily).Symbol;
from QuantConnect.DataSource import *

self.dataset_symbol = self.add_data(CBOE, "VIX", Resolution.DAILY).symbol

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 1990
Asset Coverage 14 US Volatility Indices
Data Density Regular
Resolution Daily
Timezone New York

Example Applications

The VIX Daily Price enables you to incorporate popular US volatility indices in your strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The VIX Daily Price dataset provides CBOE objects, which have the following attributes:

Supported Indicies

The following table shows the volatility indices in the VIX Daily Price dataset:

Ticker Index Expiry Start Date Data Points
VIX S&P500 30 Days Jan 1990 OHLC
VIX9D S&P500 9 Days Apr 2011 OHLC
VIX3M S&P500 3 Months Sep 2009 OHLC
VIX6M S&P500 6 Months Jan 2008 OHLC
VIX1Y S&P500 1 Year Jan 2007 OHLC
VXO S&P100 30 Days Feb 1993 OHLC
VXN Nasdaq 100 30 Days Sep 2009 OHLC
RVX Russell 2000 30 Days Sep 2009 OHLC
VVIX VIX 30 Days Mar 2006 Close
TYVIX 10-year US Treasury Note 30 Days Jan 2003 OHLC
VXTLT 20-year US Treasury Bond 30 Days Jan 2004 Close
VXEEM MSCI Emerging Markets 30 Days Mar 2011 OHLC
OVX United States Oil Fund (USO) 30 Days Sep 2009 Close
GVZ SPDR Gold Shares ETF (GLD) 30 Days Sep 2009 Close
FVX 5 Year Treasury Yield Index 30 Days Dec 1993 Close
VXEFA EFA VIX Index 30 Days Jan 2008 OHLC
VXAPL Apple VIX Index 30 Days Jan 2011 OHLC
VXAZN Amazon VIX Index 30 Days Jan 2011 OHLC
VXGOG Google VIX Index 30 Days Jan 2011 OHLC
VXGS Goldman Sachs VIX Index 30 Days Jan 2011 OHLC
VXIBM IBM VIX Index 30 Days Jan 2011 OHLC
VXD DJIA VIX Index 30 Days Sep 2009 OHLC

Requesting Data

To add VIX Daily Price data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class CboeDataAlgorithm(QCAlgorithm):
 
    def initialize(self) -> None:
        self.set_start_date(2003, 1, 1)
        self.set_end_date(2019, 10, 11)
        self.set_cash(100000)
 
        self.dataset_symbol = self.add_data(CBOE, "VIX", Resolution.DAILY).symbol
namespace QuantConnect
{
    public class CboeDataAlgorithm : QCAlgorithm
    {
        private Symbol _datasetSymbol;
 
        public override void Initialize()
        {
            SetStartDate(2003, 1, 1);
            SetEndDate(2019, 10, 11);
            SetCash(100000);
 
            _datasetSymbol = AddData<CBOE>("VIX", Resolution.Daily).Symbol;
        }
    }
}

Accessing Data

To get the current VIX Daily Price data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} close at {slice.time}: {data_point.close}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} close at {slice.Time}: {dataPoint.Close}");
    }
}

Historical Data

To get historical VIX Daily Price data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[CBOE](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<CBOE>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove your subscription to VIX Daily Price data, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The VIX Daily Price enables you to incorporate popular US volatility indices in your strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

CoinGecko

CoinGecko was founded in 2014 by TM Lee (CEO) and Bobby Ong (COO) with the mission to democratize the access of crypto data and empower users with actionable insights. We also deep dive into the crypto space to deliver valuable insights to our users through our cryptocurrency reports, as well as our publications, newsletter, and more.

 

CoinGecko

Crypto Market Cap

Introduction

The Crypto Market Cap dataset by CoinGecko tracks the market cap of cryptocurrencies. The data covers 620 cryptocurrencies that are supported by QuantConnect, starts in 28 April 2013, and is delivered on a daily frequency. This dataset is created by scraping CoinGecko's Market Chart.

For more information about the Crypto Market Cap dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CoinGecko was founded in 2014 by TM Lee (CEO) and Bobby Ong (COO) with the mission to democratize the access of crypto data and empower users with actionable insights. We also deep dive into the crypto space to deliver valuable insights to our users through our cryptocurrency reports, as well as our publications, newsletter, and more.

Getting Started

The following snippet demonstrates how to request data from the CoinGecko Crypto Market Cap dataset:

self.btc = self.add_data(CoinGecko, "BTC").symbol
self._universe = self.add_universe(CoinGeckoUniverse, self.universe_selection)
_symbol = AddData<CoinGecko>("BTC").Symbol;
_universe = AddUniverse(CoinGeckoUniverse, UniverseSelection)

Data Summary

The following table describes the dataset properties:

Property Value
Start Date 28 April 2013
Asset Coverage 620 cryptocurrencies
Resolution Daily
Timezone UTC

Example Applications

The CoinGecko Crypto Market Cap dataset provide information on the size of the crypto coin and can be used to compare the size of one coin to another. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Crypto Market Cap dataset provides CoinGecko and CoinGeckoUniverse objects.

CoinGecko Attributes

CoinGecko objects have the following attributes:

CoinGeckoUniverse Attributes

CoinGeckoUniverse objects have the following attributes:

Supported Assets

The following table shows the available Cryptocurrencies:

Requesting Data

To add CoinGecko Crypto Market Cap data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

from Algorithm import *

class CoinGeckoMarketCapDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.btcusd = self.add_crypto("BTCUSD", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(CoinGecko, "BTC").symbol
using QuantConnect.DataSource;

namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class CoinGeckoMarketCapDataAlgorithm: QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);

            _symbol = AddCrypto("BTCUSD", Resolution.Daily).Symbol;
            _datasetSymbol = AddData<CoinGecko>("BTC").Symbol;
        }
    }
}

Accessing Data

To get the current Crypto Market Cap data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} market cap::volume at {slice.time}: {data_point.market_cap}::{data_point.volume}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} market cap::volume at {slice.Time}: {dataPoint.MarketCap}::{dataPoint.Volume}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(CoinGecko).items():
        self.log(f"{dataset_symbol} market cap::volume at {slice.time}: {data_point.market_cap}::{data_point.volume}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<CoinGecko>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} market cap::volume at {slice.Time}: {dataPoint.MarketCap}::{dataPoint.Volume}");
    }
}

Historical Data

To get historical CoinGecko Crypto Market Cap data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[CoinGecko](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<CoinGecko>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of Cryptos based on CoinGecko Crypto Market Cap data, call the AddUniverse add_universe method with the CoinGeckoUniverse class and a selection function. Note that the filtered output is a list of names of the coins. If corresponding tradable crypto pairs are preferred, call CreateSymbol(market, quoteCurrency) create_symbol(market, quoteCurrency) method for each output item.

def initialize(self) -> None:
    self._universe = self.add_universe(CoinGeckoUniverse, self.universe_selection)

def universe_selection(self, data: List[CoinGeckoUniverse]) -> List[Symbol]:
    for datum in data:
        self.debug(f'{datum.coin},{datum.market_cap},{datum.price}')

    # define our selection criteria
    selected = sorted(data, key=lambda x: x.market_cap, reverse=True)[:3]
            
    # Use the CreateSymbol method to generate the Symbol object for
    # the desired market (Coinbase) and quote currency (e.g. USD)
    return [x.create_symbol(Market.COINBASE, "USD") for x in selected]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<CoinGecko>(data =>
    {
        foreach (var datum in data.OfType<CoinGecko>())
        {
            Debug($"{datum.Coin},{datum.MarketCap},{datum.Price}");
        }

        // define our selection criteria
        // Use the CreateSymbol method to generate the Symbol object for
        // the desired market (Coinbase) and quote currency (e.g. USD)
        return (from d in data.OfType<CoinGeckoUniverse>()
            orderby d.MarketCap descending
            select d.CreateSymbol(Market.Coinbase, "USD")).Take(3);
    });
}

For more information about dynamic universes, see Universes .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(_universe, 30, Resolution.Daily);
foreach (var coins in universeHistory)
{
    foreach (CoinGecko coin in coins)
    {
        Log($"{coin.Symbol.Value} market cap at {coin.EndTime}: {coin.MarketCap}");
    }
}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (_, time), coins in universe_history.items():
    for coin in coins:
        self.log(f"{coin.symbol.value} market cap at {coin.end_time}: {coin.market_cap}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var coins in universeHistory)
{
    foreach (CoinGecko coin in coins)
    {
        Console.WriteLine($"{coin.Symbol.Value} market cap at {coin.EndTime}: {coin.MarketCap}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (_, time), coins in universe_history.items():
    for coin in coins:
        print(f"{coin.symbol.value} market cap at {coin.end_time}: {coin.market_cap}")

You can call the History history method in Research.

Remove Subscriptions

To remove your subscription to CoinGecko Crypto Market Cap data, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The CoinGecko Crypto Market Cap dataset provide information on the size of the crypto coin and can be used to compare the size of one coin to another. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

CryptoSlam!

CryptoSlam! is an NFT industry data aggregator backed by Mark Cuban. Features project analytics, NFT values, rarity, scarcity, most popular collections, activity history & more.

 

CryptoSlam!

NFT Sales

Introduction

The NFT Sales dataset by CryptoSlam! provides Non-Fungible Tokens (NFT) sales volume data in various blockchain marketplaces. This dataset covers 11 blockchains that have their own native Cryptocurrencies. The data starts in June 2017 and is delivered on a daily frequency. This dataset fetches the number of transactions, unique buyers, unique sellers, and the dollar volume of NFT transactions on all secondary marketplaces tracked by CryptoSlam, which includes owner-to-owner sales only (not initial sales from the product directly to the owners).

For more information about the NFT Sales dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

CryptoSlam! is an NFT industry data aggregator backed by Mark Cuban. Features project analytics, NFT values, rarity, scarcity, most popular collections, activity history & more.

Getting Started

The following snippet demonstrates how to request data from the NFT Sales dataset:

from QuantConnect.DataSource import *

self.ethusd = self.add_crypto("ETHUSD", Resolution.DAILY, Market.BITFINEX).symbol
self.dataset_symbol = self.add_data(CryptoSlamNFTSales, "ETH").symbol
using QuantConnect.DataSource;

_symbol = AddCrypto("ETHUSD", Resolution.Daily, Market.Bitfinex).Symbol;
_datasetSymbol = AddData<CryptoSlamNFTSales>("ETH").Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date June 2017
Asset Coverage 11 blockchains
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The NFT Sales dataset enables you to incorporate NFT sales information into your strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The NFT Sales dataset provides CryptoSlamNFTSales objects, which have the following attributes:

Supported Blockchains and Symbols

The following table shows the blockchains tracked in the NFT Sales dataset:

Symbol Blockchain Represented Start Date (yyyy-mm-dd)
AVAX Avalanche 2021-09-01
CRO Cronos 2021-12-18
ETH Ethereum 2017-06-23
FLOW Flow 2020-07-28
FTM Fantom 2021-09-15
MATIC Polygon 2021-03-01
SOL Solana 2021-08-05
THETA Theta 2021-06-24
WAVE Waves 2021-06-03
WAX Wax 2020-03-16
XTZ Tezos 2021-03-01

Requesting Data

To add NFT Sales data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class CryptoSlamNFTSalesAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.ethusd = self.add_crypto("ETHUSD", Resolution.DAILY, Market.BITFINEX).symbol
        self.dataset_symbol = self.add_data(CryptoSlamNFTSales, "ETH").symbol
namespace QuantConnect
{
    public class CryptoSlamNFTSalesAlgorithm: QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);

            _symbol = AddCrypto("ETHUSD", Resolution.Daily, Market.Bitfinex).Symbol;
            _datasetSymbol = AddData<CryptoSlamNFTSales>("ETH").Symbol;
        }
    }
}

Accessing Data

To get the current NFT Sales data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} unique buyers at {slice.time}: {data_point.unique_buyers}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} unique buyers at {slice.Time}: {dataPoint.UniqueBuyers}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(CryptoSlamNFTSales).items():
        self.log(f"{dataset_symbol} unique buyers at {slice.time}: {data_point.unique_buyers}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<CryptoSlamNFTSales>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} unique buyers at {slice.Time}: {dataPoint.UniqueBuyers}");
    }
}

Historical Data

To get historical NFT Sales data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame 
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[CryptoSlamNFTSales](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<CryptoSlamNFTSales>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The NFT Sales dataset enables you to incorporate NFT sales information into your strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Energy Information Administration

The Treasury Department is the executive agency responsible for promoting economic prosperity and ensuring the financial security of the United States. The Department is responsible for a wide range of activities such as advising the President on economic and financial issues, encouraging sustainable economic growth, and fostering improved governance in financial institutions. The Department of the Treasury operates and maintains systems that are critical to the nation"s financial infrastructure, such as the production of coin and currency, the disbursement of payments to the American public, revenue collection, and the borrowing of funds necessary to run the federal government.

 

Energy Information Administration

US Energy Information Administration (EIA)

Introduction

The US Energy Information Administration (EIA) datasets by the Department of the Treasury tracks national and international oil production and consumption. The data covers 190 datasets, starts in January 1991, and is delivered on a daily frequency. This dataset is created by QuantConnect processing and caching the EIA archives.

For more information about the US Energy Information Administration (EIA) dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

The Treasury Department is the executive agency responsible for promoting economic prosperity and ensuring the financial security of the United States. The Department is responsible for a wide range of activities such as advising the President on economic and financial issues, encouraging sustainable economic growth, and fostering improved governance in financial institutions. The Department of the Treasury operates and maintains systems that are critical to the nation's financial infrastructure, such as the production of coin and currency, the disbursement of payments to the American public, revenue collection, and the borrowing of funds necessary to run the federal government.

Getting Started

The following snippet demonstrates how to request data from the EIA dataset:

from QuantConnect.DataSource import *

self.dataset_symbol = self.add_data(USEnergy, USEnergy.petroleum.united_states.weekly_net_imports_of_total_petroleum_products).symbol
using QuantConnect.DataSource;

_datasetSymbol = AddData<USEnergy>(USEnergy.Petroleum.UnitedStates.WeeklyNetImportsOfTotalPetroleumProducts).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 1991
Asset Coverage 190 Datasets
Data Density Sparse
Resolution Daily
Timezone New York

Example Applications

The EIA dataset enables you to monitor national and international oil production and consumption in you trading strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The EIA dataset provides USEnergy objects, which have the following attributes:

Supported Datasets

The following table shows the accessor code you need to add each EIA dataset to your algorithm:

Symbol Accessor Code Description
UnitedStates
PET.WGFRPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderAdjustedNetProductionOfFinishedMotorGasoline U.S. Refiner and Blender Adjusted Net Production of Finished Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.WGFSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfFinishedMotorGasoline U.S. Ending Stocks of Finished Motor Gasoline in Thousand Barrels (Mbbl)
PET.WGFUPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyProductSuppliedOfFinishedMotorGasoline U.S. Product Supplied of Finished Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.WCSSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfCrudeOilInSpr U.S. Ending Stocks of Crude Oil in SPR in Thousand Barrels (Mbbl)
PET.WDGRPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfDistillateFuelOilGreaterThan500PpmSulfur U.S. Refiner and Blender Net Production of Distillate Fuel Oil Greater than 500 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.WDGSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfDistillateFuelOilGreaterThan500PpmSulfur U.S. Ending Stocks of Distillate Fuel Oil, Greater Than 500 ppm Sulfur in Thousand Barrels (Mbbl)
PET.WDIEXUS2.W USEnergy.Petroleum.UnitedStates.WeeklyExportsOfTotalDistillate U.S. Exports of Total Distillate in Thousand Barrels per Day (Mbbl/d)
PET.WDIIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfDistillateFuelOil U.S. Imports of Distillate Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.WDIRPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfDistillateFuelOil U.S. Refiner and Blender Net Production of Distillate Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.WKJSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfKeroseneTypeJetFuel U.S. Ending Stocks of Kerosene-Type Jet Fuel in Thousand Barrels (Mbbl)
PET.WKJUPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyProductSuppliedOfKeroseneTypeJetFuel U.S. Product Supplied of Kerosene-Type Jet Fuel in Thousand Barrels per Day (Mbbl/d)
PET.WGTIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfTotalGasoline U.S. Imports of Total Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.WGTSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfTotalGasoline U.S. Ending Stocks of Total Gasoline in Thousand Barrels (Mbbl)
PET.WGIRIUS2.W USEnergy.Petroleum.UnitedStates.WeeklyGrossInputsIntoRefineries U.S. Gross Inputs into Refineries in Thousand Barrels per Day (Mbbl/d)
PET.WGRIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfReformulatedMotorGasoline U.S. Imports of Reformulated Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.WGRRPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfReformulatedMotorGasoline U.S. Refiner and Blender Net Production of Reformulated Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.WGRSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfReformulatedMotorGasoline U.S. Ending Stocks of Reformulated Motor Gasoline in Thousand Barrels (Mbbl)
PET.WDISTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfDistillateFuelOil U.S. Ending Stocks of Distillate Fuel Oil in Thousand Barrels (Mbbl)
PET.WDIUPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyProductSuppliedOfDistillateFuelOil U.S. Product Supplied of Distillate Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.WKMRPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfMilitaryKeroseneTypeJetFuel U.S. Refiner and Blender Net Production of Military Kerosene-Type Jet Fuel in Thousand Barrels per Day (Mbbl/d)
PET.WOCLEUS2.W USEnergy.Petroleum.UnitedStates.WeeklyOperableCrudeOilDistillationCapacity U. S. Operable Crude Oil Distillation Capacity in Thousand Barrels per Calendar Day (Mbbl/d)
PET.WPLSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyPropyleneNonfuelUseStocksAtBulkTerminals U.S. Propylene Nonfuel Use Stocks at Bulk Terminals in Thousand Barrels (Mbbl)
PET.WPRSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfPropaneAndPropylene U.S. Ending Stocks of Propane and Propylene in Thousand Barrels (Mbbl)
PET.WPULEUS3.W USEnergy.Petroleum.UnitedStates.WeeklyPercentUtilizationOfRefineryOperableCapacity U.S. Percent Utilization of Refinery Operable Capacity in Percent (%)
PET.WREEXUS2.W USEnergy.Petroleum.UnitedStates.WeeklyExportsOfResidualFuelOil U.S. Exports of Residual Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.WREIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfResidualFuelOil U.S. Imports of Residual Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.WKCRPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfCommercialKeroseneTypeJetFuel U.S. Refiner and Blender Net Production of Commercial Kerosene-Type Jet Fuel in Thousand Barrels per Day (Mbbl/d)
PET.WKJEXUS2.W USEnergy.Petroleum.UnitedStates.WeeklyExportsOfKeroseneTypeJetFuel U.S. Exports of Kerosene-Type Jet Fuel in Thousand Barrels per Day (Mbbl/d)
PET.WKJIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfKeroseneTypeJetFuel U.S. Imports of Kerosene-Type Jet Fuel in Thousand Barrels per Day (Mbbl/d)
PET.WKJRPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfKeroseneTypeJetFuel U.S. Refiner and Blender Net Production of Kerosene-Type Jet Fuel in Thousand Barrels per Day (Mbbl/d)
PET.WCESTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksExcludingSprOfCrudeOil U.S. Ending Stocks excluding SPR of Crude Oil in Thousand Barrels (Mbbl)
PET.WCREXUS2.W USEnergy.Petroleum.UnitedStates.WeeklyExportsOfCrudeOil U.S. Exports of Crude Oil in Thousand Barrels per Day (Mbbl/d)
PET.WCRFPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyFieldProductionOfCrudeOil U.S. Field Production of Crude Oil in Thousand Barrels per Day (Mbbl/d)
PET.WCRIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfCrudeOil U.S. Imports of Crude Oil in Thousand Barrels per Day (Mbbl/d)
PET.WCRNTUS2.W USEnergy.Petroleum.UnitedStates.WeeklyNetImportsOfCrudeOil U.S. Net Imports of Crude Oil in Thousand Barrels per Day (Mbbl/d)
PET.WCRRIUS2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetInputOfCrudeOil U.S. Refiner Net Input of Crude Oil in Thousand Barrels per Day (Mbbl/d)
PET.WRERPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfResidualFuelOil U.S. Refiner and Blender Net Production of Residual Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.WRESTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfResidualFuelOil U.S. Ending Stocks of Residual Fuel Oil in Thousand Barrels (Mbbl)
PET.WREUPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyProductSuppliedOfResidualFuelOil U.S. Product Supplied of Residual Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.WRPEXUS2.W USEnergy.Petroleum.UnitedStates.WeeklyExportsOfTotalPetroleumProducts U.S. Exports of Total Petroleum Products in Thousand Barrels per Day (Mbbl/d)
PET.WRPIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfTotalPetroleumProducts U.S. Imports of Total Petroleum Products in Thousand Barrels per Day (Mbbl/d)
PET.WRPNTUS2.W USEnergy.Petroleum.UnitedStates.WeeklyNetImportsOfTotalPetroleumProducts U.S. Net Imports of Total Petroleum Products in Thousand Barrels per Day (Mbbl/d)
PET.WRPUPUS2.W USEnergy.Petroleum.UnitedStates.WeeklyProductSuppliedOfPetroleumProducts U.S. Product Supplied of Petroleum Products in Thousand Barrels per Day (Mbbl/d)
PET.WTESTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksExcludingSprOfCrudeOilAndPetroleumProducts U.S. Ending Stocks excluding SPR of Crude Oil and Petroleum Products in Thousand Barrels (Mbbl)
PET.WTTEXUS2.W USEnergy.Petroleum.UnitedStates.WeeklyExportsOfCrudeOilAndPetroleumProducts U.S. Exports of Crude Oil and Petroleum Products in Thousand Barrels per Day (Mbbl/d)
PET.WTTIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfCrudeOilAndPetroleumProducts U.S. Imports of Crude Oil and Petroleum Products in Thousand Barrels per Day (Mbbl/d)
PET.WTTNTUS2.W USEnergy.Petroleum.UnitedStates.WeeklyNetImportsOfCrudeOilAndPetroleumProducts U.S. Net Imports of Crude Oil and Petroleum Products in Thousand Barrels per Day (Mbbl/d)
PET.WTTSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfCrudeOilAndPetroleumProducts U.S. Ending Stocks of Crude Oil and Petroleum Products in Thousand Barrels (Mbbl)
PET.WUOSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfUnfinishedOils U.S. Ending Stocks of Unfinished Oils in Thousand Barrels (Mbbl)
PET.WG6TP_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfOtherFinishedConventionalMotorGasoline U.S. Refiner and Blender Net Production of Other Finished Conventional Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.WD0TP_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfDistillateFuelOil0To15PpmSulfur U.S. Refiner and Blender Net Production of Distillate Fuel Oil, 0 to 15 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.WD1ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfDistillateFuelOilGreaterThan15To500PpmSulfur U.S. Ending Stocks of Distillate Fuel Oil, Greater than 15 to 500 ppm Sulfur in Thousand Barrels (Mbbl)
PET.WD1TP_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyProductionOfDistillateFuelOilGreaterThan15To500PpmSulfur U.S. Production of Distillate Fuel Oil, Greater than 15 to 500 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.WG1ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfReformulatedMotorGasolineWithFuelAlcohol U.S. Ending Stocks of Reformulated Motor Gasoline with Fuel ALcohol in Thousand Barrels (Mbbl)
PET.WCRSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfCrudeOil U.S. Ending Stocks of Crude Oil in Thousand Barrels (Mbbl)
PET.WCSIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyCrudeOilImportsBySpr U.S. Crude Oil Imports by SPR in Thousand Barrels per Day (Mbbl/d)
PET.WBCIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfGasolineBlendingComponents U.S. Imports of Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.WBCSTUS1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfGasolineBlendingComponents U.S. Ending Stocks of Gasoline Blending Components in Thousand Barrels (Mbbl)
PET.WCEIMUS2.W USEnergy.Petroleum.UnitedStates.WeeklyCommercialCrudeOilImportsExcludingSpr U.S. Commercial Crude Oil Imports Excluding SPR in Thousand Barrels per Day (Mbbl/d)
PET.WPRTP_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerBlenderAndGasPlantNetProductionOfPropaneAndPropylene U.S. Refiner, Blender, and Gas Plant Net Production of Propane and Propylene in Thousand Barrels per Day (Mbbl/d)
PET.WG1TP_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfFinishedReformulatedMotorGasolineWithEthanol U.S. Refiner and Blender Net Production of Finished Reformulated Motor Gasoline with Ethanol in Thousand Barrels per Day (Mbbl/d)
PET.WG3ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfReformulatedMotorGasolineNonOxygentated U.S. Ending Stocks of Reformulated Motor Gasoline, Non-Oxygentated in Thousand Barrels (Mbbl)
PET.WG4ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfConventionalMotorGasoline U.S. Ending Stocks of Conventional Motor Gasoline in Thousand Barrels (Mbbl)
PET.WG4TP_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfConventionalMotorGasoline U.S. Refiner and Blender Net Production of Conventional Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.WG5ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfConventionalMotorGasolineWithFuelEthanol U.S. Ending Stocks of Conventional Motor Gasoline with Fuel Ethanol in Thousand Barrels (Mbbl)
PET.WG5TP_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfFinishedConventionalMotorGasolineWithEthanol U.S. Refiner and Blender Net Production of Finished Conventional Motor Gasoline with Ethanol in Thousand Barrels per Day (Mbbl/d)
PET.WG6ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfOtherConventionalMotorGasoline U.S. Ending Stocks of Other Conventional Motor Gasoline in Thousand Barrels (Mbbl)
PET.WO6RI_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetInputOfConventionalCbobGasolineBlendingComponents U.S. Refiner and Blender Net Input of Conventional CBOB Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.WO6ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfConventionalCbobGasolineBlendingComponents U.S. Ending Stocks of Conventional CBOB Gasoline Blending Components in Thousand Barrels (Mbbl)
PET.WO7RI_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetInputOfConventionalGtabGasolineBlendingComponents U.S. Refiner and Blender Net Input of Conventional GTAB Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.WO7ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfConventionalGtabGasolineBlendingComponents U.S. Ending Stocks of Conventional GTAB Gasoline Blending Components in Thousand Barrels (Mbbl)
PET.WO9RI_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetInputOfConventionalOtherGasolineBlendingComponents U.S. Refiner and Blender Net Input of Conventional Other Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.WO9ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfConventionalOtherGasolineBlendingComponents U.S. Ending Stocks of Conventional Other Gasoline Blending Components in Thousand Barrels (Mbbl)
PET.W_EPD2F_PWR_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyNo2HeatingOilWholesaleResalePrice U.S. No. 2 Heating Oil Wholesale/Resale Price in Dollars per Gallon ($/gal)
PET.W_EPC0_SKA_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyCrudeOilStocksInTransitOnShipsFromAlaska U.S. Crude Oil Stocks in Transit (on Ships) from Alaska in Thousand Barrels (Mbbl)
PET.W_EPC0_VSD_NUS_DAYS.W USEnergy.Petroleum.UnitedStates.WeeklyDaysOfSupplyOfCrudeOilExcludingSpr U.S. Days of Supply of Crude Oil excluding SPR in Number of Days (Days)
PET.W_EPD0_VSD_NUS_DAYS.W USEnergy.Petroleum.UnitedStates.WeeklyDaysOfSupplyOfTotalDistillate U.S. Days of Supply of Total Distillate in Number of Days (Days)
PET.W_EPD2F_PRS_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyWeeklyNo2HeatingOilResidentialPrice U.S. Weekly No. 2 Heating Oil Residential Price in Dollars per Gallon ($/gal)
PET.WPRUP_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyProductSuppliedOfPropaneAndPropylene U.S. Product Supplied of Propane and Propylene in Thousand Barrels per Day (Mbbl/d)
PET.WWOUP_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyProductSuppliedOfOtherOils U.S. Product Supplied of Other Oils in Thousand Barrels per Day (Mbbl/d)
PET.WBCRI_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetInputOfGasolineBlendingComponents U.S. Refiner and Blender Net Input of Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.WD0ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfDistillateFuelOil0To15PpmSulfur U.S. Ending Stocks of Distillate Fuel Oil, 0 to 15 ppm Sulfur in Thousand Barrels (Mbbl)
PET.W_EPJK_VSD_NUS_DAYS.W USEnergy.Petroleum.UnitedStates.WeeklyDaysOfSupplyOfKeroseneTypeJetFuel U.S. Days of Supply of Kerosene-Type Jet Fuel in Number of Days (Days)
PET.W_EPM0_VSD_NUS_DAYS.W USEnergy.Petroleum.UnitedStates.WeeklyDaysOfSupplyOfTotalGasoline U.S. Days of Supply of Total Gasoline in Number of Days (Days)
PET.W_EPPA_SAE_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfAsphaltAndRoadOil U.S. Ending Stocks of Asphalt and Road Oil in Thousand Barrels (Mbbl)
PET.W_EPPK_SAE_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfKerosene U.S. Ending Stocks of Kerosene in Thousand Barrels (Mbbl)
PET.W_EPDM10_VUA_NUS_2.W USEnergy.Petroleum.UnitedStates.WeeklySupplyAdjustmentOfDistillateFuelOilGreaterThan15To500PpmSulfur U.S. Supply Adjustment of Distillate Fuel Oil, Greater than 15 to 500 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.WG5IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfConventionalMotorGasolineWithFuelEthanol U.S. Imports of Conventional Motor Gasoline with Fuel Ethanol in Thousand Barrels per Day (Mbbl/d)
PET.WG6IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfOtherConventionalMotorGasoline U.S. Imports of Other Conventional Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.WD0IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfDistillateFuelOil0To15PpmSulfur U.S. Imports of Distillate Fuel Oil, 0 to 15 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.WD1IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfDistillateFuelOilGreaterThan15To500PpmSulfur U.S. Imports of Distillate Fuel Oil, Greater than 15 to 500 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.WD2IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfDistillateFuelOilGreaterThan500To2000PpmSulfur U.S. Imports of Distillate Fuel Oil, Greater than 500 to 2000 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.WPRIM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfPropaneAndPropylene U.S. Imports of Propane and Propylene in Thousand Barrels per Day (Mbbl/d)
PET.WO7IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfConventionalGtabGasolineBlendingComponents U.S. Imports of Conventional GTAB Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.WD3IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfDistillateFuelOilGreaterThan2000PpmSulfur U.S. Imports of Distillate Fuel Oil, Greater than 2000 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.WG1IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfReformulatedMotorGasolineWithFuelAlcohol U.S. Imports of Reformulated Motor Gasoline with Fuel ALcohol in Thousand Barrels per Day (Mbbl/d)
PET.WG4IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfConventionalMotorGasoline U.S. Imports of Conventional Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.WO9IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfConventionalOtherGasolineBlendingComponents U.S. Imports of Conventional Other Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.WO6IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfConventionalCbobGasolineBlendingComponents U.S. Imports of Conventional CBOB Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.W_EPPK_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfKerosene U.S. Blender Net Production of Kerosene in Thousand Barrels per Day (Mbbl/d)
PET.W_EPPK_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfKerosene U.S. Refiner Net Production of Kerosene in Thousand Barrels per Day (Mbbl/d)
PET.W_EPPO6_SAE_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfOtherOilsExcludingFuelEthanol U.S. Ending Stocks of Other Oils (Excluding Fuel Ethanol) in Thousand Barrels (Mbbl)
PET.W_EPPR_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfResidualFuelOil U.S. Refiner Net Production of Residual Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0R_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfReformulatedMotorGasoline U.S. Blender Net Production of Reformulated Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0R_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfReformulatedMotorGasoline U.S. Refiner Net Production of Reformulated Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPOOXE_SAE_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfFuelEthanol U.S. Ending Stocks of Fuel Ethanol in Thousand Barrels (Mbbl)
PET.W_EPD0_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfDistillateFuelOil U.S. Blender Net Production of Distillate Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.W_EPD0_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfDistillateFuelOil U.S. Refiner Net Production of Distillate Fuel Oil in Thousand Barrels per Day (Mbbl/d)
PET.W_EPJK_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfKeroseneTypeJetFuel U.S. Blender Net Production of Kerosene-Type Jet Fuel in Thousand Barrels per Day (Mbbl/d)
PET.W_EPJK_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfKeroseneTypeJetFuel U.S. Refiner Net Production of Kerosene-Type Jet Fuel in Thousand Barrels per Day (Mbbl/d)
PET.W_EPLLPA_PRS_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyPropaneResidentialPrice U.S. Propane Residential Price in Dollars per Gallon ($/gal)
PET.W_EPLLPA_PWR_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyPropaneWholesaleResalePrice U.S. Propane Wholesale/Resale Price in Dollars per Gallon ($/gal)
PET.W_EPOBGRR_YIR_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetInputOfMotorGasolineBlendingComponentsRbob U.S. Refiner and Blender Net Input of Motor Gasoline Blending Components, RBOB in Thousand Barrels per Day (Mbbl/d)
PET.W_EPL0XP_SAE_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfNgplsLrgsExcludingPropanePropylene U.S. Ending Stocks of NGPLs/LRGs (Excluding Propane/Propylene) in Thousand Barrels (Mbbl)
PET.W_EPLLPZ_VSD_NUS_DAYS.W USEnergy.Petroleum.UnitedStates.WeeklyDaysOfSupplyOfPropanePropylene U.S. Days of Supply of Propane/Propylene in Number of Days (Days)
PET.W_EPM0C_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfConventionalMotorGasoline U.S. Blender Net Production of Conventional Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0C_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfConventionalMotorGasoline U.S. Refiner Net Production of Conventional Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0F_VUA_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklySupplyAdjustmentOfFinishedMotorGasoline U.S. Supply Adjustment of Finished Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0F_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfFinishedMotorGasoline U.S. Blender Net Production of Finished Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0F_YPR_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfFinishedMotorGasoline U.S. Refiner and Blender Net Production of Finished Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0F_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfFinishedMotorGasoline U.S. Refiner Net Production of Finished Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPD00H_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfDistillateFuelOilGreaterThan500PpmSulfur U.S. Blender Net Production of Distillate Fuel Oil, Greater Than 500 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.W_EPD00H_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfDistillateFuelOilGreaterThan500PpmSulfur U.S. Refiner Net Production of Distillate Fuel Oil, Greater Than 500 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.W_EPDM10_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfDistillateFuelOilGreaterThan15To500PpmSulfur U.S. Blender Net Production of Distillate Fuel Oil, Greater than 15 to 500 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.W_EPDM10_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfDistillateFuelOilGreaterThan15To500PpmSulfur U.S. Refiner Net Production of Distillate Fuel Oil, Greater than 15 to 500 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.W_EPDXL0_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfDistillateFuelOil0To15PpmSulfur U.S. Blender Net Production of Distillate Fuel Oil, 0 to 15 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.W_EPDXL0_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfDistillateFuelOil0To15PpmSulfur U.S. Refiner Net Production of Distillate Fuel Oil, 0 to 15 ppm Sulfur in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CA_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfConventionalMotorGasolineWithFuelEthanol U.S. Blender Net Production of Conventional Motor Gasoline with Fuel Ethanol in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CA_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfConventionalMotorGasolineWithFuelEthanol U.S. Refiner Net Production of Conventional Motor Gasoline with Fuel Ethanol in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CO_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfOtherConventionalMotorGasoline U.S. Blender Net Production of Other Conventional Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CO_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfOtherConventionalMotorGasoline U.S. Refiner Net Production of Other Conventional Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0RA_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfReformulatedMotorGasolineWithFuelAlcohol U.S. Blender Net Production of Reformulated Motor Gasoline with Fuel ALcohol in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0RA_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfReformulatedMotorGasolineWithFuelAlcohol U.S. Refiner Net Production of Reformulated Motor Gasoline with Fuel ALcohol in Thousand Barrels per Day (Mbbl/d)
PET.W_EPOOXE_YOP_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyOxygenatePlantProductionOfFuelEthanol U.S. Oxygenate Plant Production of Fuel Ethanol in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAL55_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfMotorGasolineFinishedConventionalEd55AndLower U.S. Blender Net Production of Motor Gasoline, Finished, Conventional, Ed55 and Lower in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAL55_YPT_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfFinishedConventionalMotorGasolineEd55AndLower U.S. Refiner and Blender Net Production of Finished Conventional Motor Gasoline, Ed 55 and Lower in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAL55_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfMotorGasolineFinishedConventionalEd55AndLower U.S. Refiner Net Production of Motor Gasoline, Finished, Conventional, Ed55 and Lower in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0F_EEX_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyExportsOfFinishedMotorGasoline U.S. Exports of Finished Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0F_IM0_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfFinishedMotorGasoline U.S. Imports of Finished Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0RO_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfOtherReformulatedMotorGasoline U.S. Blender Net Production of Other Reformulated Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0RO_YPT_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfOtherFinishedReformulatedMotorGasoline U.S. Refiner and Blender Net Production of Other Finished Reformulated Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0RO_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfOtherReformulatedMotorGasoline U.S. Refiner Net Production of Other Reformulated Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPOBGRR_SAE_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfMotorGasolineBlendingComponentsRbob U.S. Ending Stocks of Motor Gasoline Blending Components, RBOB in Thousand Barrels (Mbbl)
PET.W_EPOOXE_YIR_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetInputOfFuelEthanol U.S. Refiner and Blender Net Input of Fuel Ethanol in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAG55_IM0_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfMotorGasolineFinishedConventionalGreaterThanEd55 U.S. Imports of Motor Gasoline, Finished, Conventional, Greater than Ed55 in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAL55_IM0_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfMotorGasolineFinishedConventionalEd55AndLower U.S. Imports of Motor Gasoline, Finished, Conventional, Ed55 and Lower in Thousand Barrels per Day (Mbbl/d)
PET.W_EPC0_IMU_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyCrudeOilImportsForSprByOthers U.S. Crude Oil Imports for SPR by Others in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAG55_SAE_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfConventionalMotorGasolineGreaterThanEd55 U.S. Ending Stocks of Conventional Motor Gasoline, Greater than Ed55 in Thousand Barrels (Mbbl)
PET.W_EPOOXE_IM0_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfFuelEthanol U.S. Imports of Fuel Ethanol in Thousand Barrels per Day (Mbbl/d)
PET.W_EPL0XP_IM0_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfLiquefiedPetroleumGassesLessPropanePropylene U.S. Imports of Liquefied Petroleum Gasses Less Propane/Propylene in Thousand Barrels per Day (Mbbl/d)
PET.W_EPLLPZ_EEX_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyExportsOfPropaneAndPropylene U.S. Exports of Propane and Propylene in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0RO_IM0_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfOtherReformulatedMotorGasoline U.S. Imports of Other Reformulated Motor Gasoline in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAG55_YPB_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyBlenderNetProductionOfMotorGasolineFinishedConventionalGreaterThanEd55 U.S. Blender Net Production of Motor Gasoline, Finished, Conventional, Greater Than Ed55 in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAG55_YPT_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerAndBlenderNetProductionOfFinishedConventionalMotorGasolineGreaterThanEd55 U.S. Refiner and Blender Net Production of Finished Conventional Motor Gasoline, Greater than Ed 55 in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAG55_YPY_NUS_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyRefinerNetProductionOfFinishedConventionalMotorGasolineGreaterThanEd55 U.S. Refiner Net Production of Finished Conventional Motor Gasoline, Greater than Ed 55 in Thousand Barrels per Day (Mbbl/d)
PET.W_EPM0CAL55_SAE_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfConventionalMotorGasolineEd55AndLower U.S. Ending Stocks of Conventional Motor Gasoline, Ed55 and Lower in Thousand Barrels (Mbbl)
PET.W_EPPK_IM0_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfKerosene U.S. Imports of Kerosene in Thousand Barrels per Day (Mbbl/d)
PET.W_EPPO4_EEX_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyExportsOfOtherOils U.S. Exports of Other Oils in Thousand Barrels per Day (Mbbl/d)
PET.W_EPPO6_IM0_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfOtherOilsExcludingFuelEthanol U.S. Imports of Other Oils (Excluding Fuel Ethanol) in Thousand Barrels per Day (Mbbl/d)
PET.W_EPOBGRR_IM0_NUS-Z00_MBBLD.W USEnergy.Petroleum.UnitedStates.WeeklyImportsFromAllCountriesOfMotorGasolineBlendingComponentsRbob U.S. Imports from All Countries of Motor Gasoline Blending Components, RBOB in Thousand Barrels per Day (Mbbl/d)
PET.EMM_EPMR_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyRegularAllFormulationsRetailGasolinePrices U.S. Regular All Formulations Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPMM_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyMidgradeAllFormulationsRetailGasolinePrices U.S. Midgrade All Formulations Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPMP_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyPremiumAllFormulationsRetailGasolinePrices U.S. Premium All Formulations Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPM0_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyAllGradesAllFormulationsRetailGasolinePrices U.S. All Grades All Formulations Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPM0R_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyAllGradesReformulatedRetailGasolinePrices U.S. All Grades Reformulated Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPMMR_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyMidgradeReformulatedRetailGasolinePrices U.S. Midgrade Reformulated Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPMPR_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyPremiumReformulatedRetailGasolinePrices U.S. Premium Reformulated Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPMRU_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyRegularConventionalRetailGasolinePrices U.S. Regular Conventional Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPMRR_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyRegularReformulatedRetailGasolinePrices U.S. Regular Reformulated Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMD_EPD2D_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyNo2DieselRetailPrices U.S. No 2 Diesel Retail Prices in Dollars per Gallon ($/gal)
PET.EMM_EPMPU_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyPremiumConventionalRetailGasolinePrices U.S. Premium Conventional Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPMMU_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyMidgradeConventionalRetailGasolinePrices U.S. Midgrade Conventional Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMM_EPM0U_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyAllGradesConventionalRetailGasolinePrices U.S. All Grades Conventional Retail Gasoline Prices in Dollars per Gallon ($/gal)
PET.EMD_EPD2DXL0_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyNo2DieselUltraLowSulfur015PpmRetailPrices U.S. No 2 Diesel Ultra Low Sulfur (0-15 ppm) Retail Prices in Dollars per Gallon ($/gal)
PET.W_EPC0_SAX_NUS_MBBL.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksExcludingSprAndIncludingLeaseStockOfCrudeOil U.S. Ending Stocks excluding SPR and including Lease Stock of Crude Oil in Thousand Barrels (Mbbl)
PET.EMD_EPD2DM10_PTE_NUS_DPG.W USEnergy.Petroleum.UnitedStates.WeeklyNo2DieselLowSulfur15500PpmRetailPrices U.S. No 2 Diesel Low Sulfur (15-500 ppm) Retail Prices in Dollars per Gallon ($/gal)
PET.WO3IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfReformulatedRbobWithAlcoholGasolineBlendingComponents U.S. Imports of Reformulated RBOB with Alcohol Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.WO4IM_NUS-Z00_2.W USEnergy.Petroleum.UnitedStates.WeeklyImportsOfReformulatedRbobWithEtherGasolineBlendingComponents U.S. Imports of Reformulated RBOB with Ether Gasoline Blending Components in Thousand Barrels per Day (Mbbl/d)
PET.WO2ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfReformulatedGtabGasolineBlendingComponents U.S. Ending Stocks of Reformulated GTAB Gasoline Blending Components in Thousand Barrels (Mbbl)
PET.WO3ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfReformulatedRbobWithAlcoholGasolineBlendingComponents U.S. Ending Stocks of Reformulated RBOB with Alcohol Gasoline Blending Components in Thousand Barrels (Mbbl)
PET.WO4ST_NUS_1.W USEnergy.Petroleum.UnitedStates.WeeklyEndingStocksOfReformulatedRbobWithEtherGasolineBlendingComponents U.S. Ending Stocks of Reformulated RBOB with Ether Gasoline Blending Components in Thousand Barrels (Mbbl)
EquatorialGuinea
PET.W_EPC0_IM0_NUS-NEK_MBBLD.W USEnergy.Petroleum.EquatorialGuinea.WeeklyImportsFromEquatorialGuineaOfCrudeOil U.S. Imports from Equatorial Guinea of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Iraq
PET.W_EPC0_IM0_NUS-NIZ_MBBLD.W USEnergy.Petroleum.Iraq.WeeklyImportsFromIraqOfCrudeOil U.S. Imports from Iraq of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Kuwait
PET.W_EPC0_IM0_NUS-NKU_MBBLD.W USEnergy.Petroleum.Kuwait.WeeklyImportsFromKuwaitOfCrudeOil U.S. Imports from Kuwait of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Mexico
PET.W_EPC0_IM0_NUS-NMX_MBBLD.W USEnergy.Petroleum.Mexico.WeeklyImportsFromMexicoOfCrudeOil U.S. Imports from Mexico of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Nigeria
PET.W_EPC0_IM0_NUS-NNI_MBBLD.W USEnergy.Petroleum.Nigeria.WeeklyImportsFromNigeriaOfCrudeOil U.S. Imports from Nigeria of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Norway
PET.W_EPC0_IM0_NUS-NNO_MBBLD.W USEnergy.Petroleum.Norway.WeeklyImportsFromNorwayOfCrudeOil U.S. Imports from Norway of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Russia
PET.W_EPC0_IM0_NUS-NRS_MBBLD.W USEnergy.Petroleum.Russia.WeeklyImportsFromRussiaOfCrudeOil U.S. Imports from Russia of Crude Oil in Thousand Barrels per Day (Mbbl/d)
SaudiArabia
PET.W_EPC0_IM0_NUS-NSA_MBBLD.W USEnergy.Petroleum.SaudiArabia.WeeklyImportsFromSaudiArabiaOfCrudeOil U.S. Imports from Saudi Arabia of Crude Oil in Thousand Barrels per Day (Mbbl/d)
UnitedKingdom
PET.W_EPC0_IM0_NUS-NUK_MBBLD.W USEnergy.Petroleum.UnitedKingdom.WeeklyImportsFromUnitedKingdomOfCrudeOil U.S. Imports from United Kingdom of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Venezuela
PET.W_EPC0_IM0_NUS-NVE_MBBLD.W USEnergy.Petroleum.Venezuela.WeeklyImportsFromVenezuelaOfCrudeOil U.S. Imports from Venezuela of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Algeria
PET.W_EPC0_IM0_NUS-NAG_MBBLD.W USEnergy.Petroleum.Algeria.WeeklyImportsFromAlgeriaOfCrudeOil U.S. Imports from Algeria of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Angola
PET.W_EPC0_IM0_NUS-NAO_MBBLD.W USEnergy.Petroleum.Angola.WeeklyImportsFromAngolaOfCrudeOil U.S. Imports from Angola of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Brazil
PET.W_EPC0_IM0_NUS-NBR_MBBLD.W USEnergy.Petroleum.Brazil.WeeklyImportsFromBrazilOfCrudeOil U.S. Imports from Brazil of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Canada
PET.W_EPC0_IM0_NUS-NCA_MBBLD.W USEnergy.Petroleum.Canada.WeeklyImportsFromCanadaOfCrudeOil U.S. Imports from Canada of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Congo
PET.W_EPC0_IM0_NUS-NCF_MBBLD.W USEnergy.Petroleum.Congo.WeeklyImportsFromCongoBrazzavilleOfCrudeOil U.S. Imports from Congo (Brazzaville) of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Colombia
PET.W_EPC0_IM0_NUS-NCO_MBBLD.W USEnergy.Petroleum.Colombia.WeeklyImportsFromColombiaOfCrudeOil U.S. Imports from Colombia of Crude Oil in Thousand Barrels per Day (Mbbl/d)
Ecuador
PET.W_EPC0_IM0_NUS-NEC_MBBLD.W USEnergy.Petroleum.Ecuador.WeeklyImportsFromEcuadorOfCrudeOil U.S. Imports from Ecuador of Crude Oil in Thousand Barrels per Day (Mbbl/d)

Requesting Data

To add EIA data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class USEnergyDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.dataset_symbol = self.add_data(USEnergy, USEnergy.petroleum.united_states.weekly_net_imports_of_total_petroleum_products).symbol
namespace QuantConnect
{
    public class USEnergyDataAlgorithm: QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            _datasetSymbol = AddData<USEnergy>(USEnergy.Petroleum.UnitedStates.WeeklyNetImportsOfTotalPetroleumProducts).Symbol;
        }
    }
}

Accessing Data

To get the current EIA data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} value at {slice.time}: {data_point.value}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} value at {slice.Time}: {dataPoint.Value}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(USEnergy).items():
        self.log(f"{dataset_symbol} value at {slice.time}: {data_point.value}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<USEnergy>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} value at {slice.Time}: {dataPoint.Value}");
    }
}

Historical Data

To get historical EIA data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[USEnergy](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<USEnergy>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove your subscription to EIA data, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The EIA dataset enables you to monitor national and international oil production and consumption in you trading strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

ExtractAlpha

ExtractAlpha was founded by Vinesh Jha in 2013 with the goal of providing alternative data for investors. ExtractAlpha"s rigorously researched data sets and quantitative stock selection models leverage unique sources and analytical techniques, allowing users to gain an investment edge.

 

ExtractAlpha

Cross Asset Model

Introduction

The Cross Asset Model by ExtractAlpha provides stock scoring values based on the trading activity in the Options market. Since the Options market has a higher proportion of institutional traders than the Equities market, the Options market is composed of investors who are more informed and information-driven on average. The data covers a dynamic universe of over 3,000 US Equities, starts in July 2005, and is delivered on a daily frequency. This dataset is created by feature engineering on the Options market put-call spread, volatility skewness, and volume.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Cross Asset Model dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

ExtractAlpha was founded by Vinesh Jha in 2013 with the goal of providing alternative data for investors. ExtractAlpha's rigorously researched data sets and quantitative stock selection models leverage unique sources and analytical techniques, allowing users to gain an investment edge.

Getting Started

The following snippet demonstrates how to request data from the Cross Asset Model dataset:

from QuantConnect.DataSource import *

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(ExtractAlphaCrossAssetModel, self.aapl).symbol
using QuantConnect.DataSource;

_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<ExtractAlphaCrossAssetModel>(_symbol).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date July 2005
Asset Coverage Over 3,000 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The Cross Asset Model dataset by ExtractAlpha enables you to utilize Options market information to extract alpha. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Cross Asset Model dataset provides ExtractAlphaCrossAssetModel objects, which have the following attributes:

Requesting Data

To add Cross Asset Model data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class ExtractAlphaCrossAssetModelDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(ExtractAlphaCrossAssetModel, self.aapl).symbol
namespace QuantConnect
{
    public class ExtractAlphaCrossAssetModelDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);

            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol = AddData<ExtractAlphaCrossAssetModel>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Cross Asset Model data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} score at {slice.time}: {data_point.score}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} score at {slice.Time}: {dataPoint.Score}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(ExtractAlphaCrossAssetModel).items():
        self.log(f"{dataset_symbol} score at {slice.time}: {data_point.score}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<ExtractAlphaCrossAssetModel>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} score at {slice.Time}: {dataPoint.Score}");
    }
}

Historical Data

To get historical Cross Asset Model data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[ExtractAlphaCrossAssetModel](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<ExtractAlphaCrossAssetModel>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to Cross Asset Model data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Cross Asset Model dataset by ExtractAlpha enables you to utilize Options market information to extract alpha. Examples include the following strategies:

For more example algorithms, see Examples .

 

ExtractAlpha

Estimize

Introduction

The Estimize dataset by ExtractAlpha estimates the financials of companies, including EPS, and revenues. The data covers over 2,800 US-listed Equities’ EPS/Revenue. The data starts in January 2011 and is updated on a daily frequency. The data is sparse, and it doesn't have new updates every day. This dataset is crowdsourced from a community of 100,000+ contributors via the data provider’s web platform.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Estimize dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

ExtractAlpha was founded by Vinesh Jha in 2013 with the goal of providing alternative data for investors. ExtractAlpha's rigorously researched data sets and quantitative stock selection models leverage unique sources and analytical techniques, allowing users to gain an investment edge.

Getting Started

The following snippet demonstrates how to request data from the Estimize dataset:

from QuantConnect.DataSource import *

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.estimize_consensus_symbol = self.add_data(EstimizeConsensus, self.symbol).symbol
self.estimize_estimate_symbol = self.add_data(EstimizeEstimate, self.symbol).symbol
self.estimize_release_symbol = self.add_data(EstimizeRelease, self.symbol).symbol
using QuantConnect.DataSource;

_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_estimizeConsensusSymbol = AddData<EstimizeConsensus>(_symbol).Symbol;
_estimizeEstimateSymbol = AddData<EstimizeEstimate>(_symbol).Symbol; 
_estimizeReleaseSymbol = AddData<EstimizeRelease>(_symbol).Symbol; 

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2011
Asset Coverage 2,800 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The Estimize dataset enables you to estimate the financial data of a company more accurately for alpha. Examples include the following use cases:

For more example algorithms, see Examples .

Data Point Attributes

The Estimize dataset provides EstimizeConsensus , EstimizeEstimate , and EstimizeRelease objects.

EstimizeConsensus Attributes

EstimizeConsensus objects have the following attributes:

EstimizeEstimate Attributes

EstimizeEstimate objects have the following attributes:

EstimizeRelease Attributes

EstimizeRelease objects have the following attributes:

Requesting Data

To add Estimize data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class ExtractAlphaEstimizeDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.estimize_consensus_symbol = self.add_data(EstimizeConsensus, self.symbol).symbol
        self.estimize_estimate_symbol = self.add_data(EstimizeEstimate, self.symbol).symbol
        self.estimize_release_symbol = self.add_data(EstimizeRelease, self.symbol).symbol
namespace QuantConnect
{
    public class ExtractAlphaEstimizeDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _estimizeConsensusSymbol, _estimizeEstimateSymbol, _estimizeReleaseSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);

            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _estimizeConsensusSymbol = AddData<EstimizeConsensus>(_symbol).Symbol;
            _estimizeEstimateSymbol = AddData<EstimizeEstimate>(_symbol).Symbol; 
            _estimizeReleaseSymbol = AddData<EstimizeRelease>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Estimize data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.estimize_consensus_symbol):
        data_point = slice[self.estimize_consensus_symbol]
        self.log(f"{self.estimize_consensus_symbol} mean at {slice.time}: {data_point.mean}")

    if slice.contains_key(self.estimize_estimate_symbol):
        data_point = slice[self.estimize_estimate_symbol]
        self.log(f"{self.estimize_estimate_symbol} EPS at {slice.time}: {data_point.eps}")

    if slice.contains_key(self.estimize_release_symbol):
        data_point = slice[self.estimize_release_symbol]
        self.log(f"{self.estimize_release_symbol} EPS at {slice.time}: {data_point.eps}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_estimizeConsensusSymbol))
    {
        var dataPoint = slice[_estimizeConsensusSymbol];
        Log($"{_estimizeConsensusSymbol} mean at {slice.Time}: {dataPoint.Mean}");
    }

    if (slice.ContainsKey(_estimizeEstimateSymbol))
    {
        var dataPoint = slice[_estimizeEstimateSymbol];
        Log($"{_estimizeEstimateSymbol} EPS at {slice.Time}: {dataPoint.Eps}");
    }

    if (slice.ContainsKey(_estimizeReleaseSymbol))
    {
        var dataPoint = slice[_estimizeReleaseSymbol];
        Log($"{_estimizeReleaseSymbol} EPS at {slice.Time}: {dataPoint.Eps}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(EstimizeConsensus).items():
        self.log(f"{dataset_symbol} mean at {slice.time}: {data_point.mentions}")

    for dataset_symbol, data_point in slice.get(EstimizeEstimate).items():
        self.log(f"{dataset_symbol} EPS at {slice.time}: {data_point.eps}")

    for dataset_symbol, data_point in slice.get(EstimizeRelease).items():
        self.log(f"{dataset_symbol} EPS at {slice.time}: {data_point.eps}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<EstimizeConsensus>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} mean at {slice.Time}: {dataPoint.Mentions}");
    }

    foreach (var kvp in slice.Get<EstimizeEstimate>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} EPS at {slice.Time}: {dataPoint.Eps}");
    }

    foreach (var kvp in slice.Get<EstimizeRelease>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} EPS at {slice.Time}: {dataPoint.Eps}");
    }
}

Historical Data

To get historical Estimize data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrames
consensus_history_df = self.history(self.estimize_consensus_symbol, 100, Resolution.DAILY)
estimate_history_df = self.history(self.estimize_estimate_symbol, 100, Resolution.DAILY)
release_history_df = self.history(self.estimize_release_symbol, 100, Resolution.DAILY)
history_df = self.history([
    self.estimize_consensus_symbol,
    self.estimize_estimate_symbol,
    self.estimize_release_symbol], 100, Resolution.DAILY)

# Dataset objects
consensus_history_bars = self.history[EstimizeConsensus](self.estimize_consensus_symbol, 100, Resolution.DAILY)
estimate_history_bars = self.history[EstimizeEstimate](self.estimize_estimate_symbol, 100, Resolution.DAILY)
release_history_bars = self.history[EstimizeRelease](self.estimize_release_symbol, 100, Resolution.DAILY)
// Dataset objects
var concensusHistory = History<EstimizeConsensus>(_estimizeConsensusSymbol, 100, Resolution.Daily);
var estimateHistory = History<EstimizeEstimate>(_estimizeEstimateSymbol, 100, Resolution.Daily);
var releaseHistory = History<EstimizeRelease>(_estimizeReleaseSymbol, 100, Resolution.Daily);

// Slice objects
var history = History(new[]{_estimizeConsensusSymbol,
                            _estimizeEstimateSymbol,
                            _estimizeReleaseSymbol}, 10, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.estimize_consensus_symbol)
self.remove_security(self.estimize_estimate_symbol)
self.remove_security(self.estimize_release_symbol)
RemoveSecurity(_estimizeConsensusSymbol);
RemoveSecurity(_estimizeEstimateSymbol);
RemoveSecurity(_estimizeReleaseSymbol);

If you subscribe to Estimize data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Estimize dataset enables you to estimate the financial data of a company more accurately for alpha. Examples include the following use cases:

For more example algorithms, see Examples .

 

ExtractAlpha

Tactical

Introduction

The Tactical dataset by ExtractAlpha is a stock scoring algorithm that captures the technical dynamics of individual US Equities over one to ten trading day horizons. It can assist a longer-horizon investor in timing their entry or exit points or be used in combination with existing systematic or qualitative strategies with similar holding periods.

The data covers a dynamic universe of around 4,700 US Equities per day on average, starts in January 2000, and is delivered on a daily frequency. The Tactical dataset expands upon simple reversal, liquidity, and seasonality factors to identify stocks that are likely to trend or reverse.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Tactical dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

ExtractAlpha was founded by Vinesh Jha in 2013 with the goal of providing alternative data for investors. ExtractAlpha's rigorously researched data sets and quantitative stock selection models leverage unique sources and analytical techniques, allowing users to gain an investment edge.

Getting Started

The following snippet demonstrates how to request data from the Tactical dataset:

from QuantConnect.DataSource import *

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(ExtractAlphaTacticalModel, self.aapl).symbol
using QuantConnect.DataSource;

_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<ExtractAlphaTacticalModel>(_symbol).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2000
Asset Coverage 5,000 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The Tactical dataset enables you to gain insight into short-term stock dynamics for trading. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Tactical dataset provides ExtractAlphaTacticalModel objects, which have the following attributes:

Requesting Data

To add Tactical data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class ExtractAlphaTacticalModelDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(ExtractAlphaTacticalModel, self.aapl).symbol
namespace QuantConnect
{
    public class ExtractAlphaTacticalModelDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);

            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol = AddData<ExtractAlphaTacticalModel>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Tactical data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} score at {slice.time}: {data_point.score}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} score at {slice.Time}: {dataPoint.Score}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(ExtractAlphaTacticalModel).items():
        self.log(f"{dataset_symbol} score at {slice.time}: {data_point.score}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<ExtractAlphaTacticalModel>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} score at {slice.Time}: {dataPoint.Score}");
    }
}

Historical Data

To get historical Tactical data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_df = self.history[ExtractAlphaTacticalModel](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<ExtractAlphaTacticalModel>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to Tactical data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Tactical dataset enables you to gain insight into short-term stock dynamics for trading. Examples include the following strategies:

For more example algorithms, see Examples .

 

ExtractAlpha

True Beats

Introduction

The True Beats dataset by ExtractAlpha provides quantitative predictions of EPS and Revenues for US Equities. The data covers a dynamic universe of around 4,000-5,000 US-listed Equities on a daily average. The data starts in January 2000 and is delivered on a daily frequency. This dataset is created by incorporating the opinions of expert analysts, historical earnings, revenue trends for the company and its peers, and metrics on company earnings management.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the True Beats dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

ExtractAlpha was founded by Vinesh Jha in 2013 with the goal of providing alternative data for investors. ExtractAlpha's rigorously researched data sets and quantitative stock selection models leverage unique sources and analytical techniques, allowing users to gain an investment edge.

Getting Started

The following snippet demonstrates how to request data from the True Beats dataset:

from QuantConnect.DataSource import *

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(ExtractAlphaTrueBeats, self.aapl).symbol
using QuantConnect.DataSource;

_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<ExtractAlphaTrueBeats>(_symbol).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2000
Asset Coverage Over 5,000 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The True Beats dataset enables you to predict EPS and revenue of US-listed Equities for trading. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The True Beats dataset provides ExtractAlphaTrueBeat objects, which have the following attributes:

The True Beats dataset provides ExtractAlphaTrueBeats and ExtractAlphaTrueBeat objects.

ExtractAlphaTrueBeats

ExtractAlphaTrueBeats objects have the following attributes:

ExtractAlphaTrueBeat

ExtractAlphaTrueBeat objects have the following attributes:

Requesting Data

To add True Beats data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class ExtractAlphaTrueBeatsDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(ExtractAlphaTrueBeats, self.aapl).symbol
namespace QuantConnect
{
    public class ExtractAlphaTrueBeatsDataAlgorithm: QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);

            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol = AddData<ExtractAlphaTrueBeats>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current True Beats data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} True beat at {slice.time}: {data_point.True_beat}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} True beat at {slice.Time}: {dataPoint.TrueBeat}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(ExtractAlphaTrueBeats).items():
        self.log(f"{dataset_symbol} True beat at {slice.time}: {data_point.True_beat}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<ExtractAlphaTrueBeats>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} True beat at {slice.Time}: {dataPoint.TrueBeat}");
    }
}

Historical Data

To get historical True Beats data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[ExtractAlphaTrueBeats](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<ExtractAlphaTrueBeats>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to True Beats data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The True Beats dataset enables you to predict EPS and revenue of US-listed Equities for trading. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

FRED

The Research Division of the Federal Reserve bank of St. Louis, MO expands the frontier of economic knowledge by producing high-quality original research in the areas of macroeconomics, money and banking, and applied microeconomics. They contribute to monetary policy discussions by advising the Bank president on a range of topics, especially in preparation for Federal Open Market Committee (FOMC) meetings. The Research Division is in the top 1% of all economics research departments worldwide.

 

FRED

US Federal Reserve (FRED)

Introduction

The Federal Reserve Economic Data (FRED) by the Research Division of the Federal Reserve bank of St. Louis, MO provides various time series relating to macro-economic data. The data covers 560 datasets, starts in January 1999, and is delivered on a daily frequency. The data is created by aggregating daily updates from more than 85 public and proprietary sources.

For more information about the US Federal Reserve (FRED) dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

The Research Division of the Federal Reserve bank of St. Louis, MO expands the frontier of economic knowledge by producing high-quality original research in the areas of macroeconomics, money and banking, and applied microeconomics. They contribute to monetary policy discussions by advising the Bank president on a range of topics, especially in preparation for Federal Open Market Committee (FOMC) meetings. The Research Division is in the top 1% of all economics research departments worldwide.

Getting Started

The following snippet demonstrates how to request data from the FRED dataset:

from QuantConnect.DataSource import *

self.dataset_symbol = self.add_data(Fred, Fred.oecd_recession_indicators.united_states_from_peak_through_the_trough, Resolution.DAILY).symbol
using QuantConnect.DataSource;

_datasetSymbol = AddData<Fred>(Fred.OECDRecessionIndicators.UnitedStatesFromPeakThroughTheTrough, Resolution.Daily).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 1990
Asset Coverage 560 Datasets
Data Density Sparse
Resolution Daily
Timezone New York

Example Applications

The FRED dataset enables you to accurately design strategies utilizing macroeconomic indicators. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The FRED dataset provides Fred objects, which have the following attributes:

Supported Datasets

The following table shows the accessor code you need to add each FRED dataset to your algorithm:

Symbol Accessor Code Summary
CBOE
VXGOGCLS Fred.CBOE.VIXOnGoogle CBOE Equity VIX on Google (in Index)
VXDCLS Fred.CBOE.VXD CBOE DJIA Volatility Index (in Index)
VXGSCLS Fred.CBOE.VIXOnGoldmanSachs CBOE Equity VIX on Goldman Sachs (in Index)
VXIBMCLS Fred.CBOE.VIXOnIBM CBOE Equity VIX on IBM (in Index)
VXAZNCLS Fred.CBOE.VIXOnAmazon CBOE Equity VIX on Amazon (in Index)
VXOCLS Fred.CBOE.VXO CBOE S&P 100 Volatility Index: VXO (in Index)
VXNCLS Fred.CBOE.VXN CBOE NASDAQ 100 Volatility Index (in Index)
VXTYN Fred.CBOE.TenYearTreasuryNoteVolatilityFutures CBOE 10-Year Treasury Note Volatility Futures (in Index)
RVXCLS Fred.CBOE.RVX CBOE Russell 2000 Volatility Index (in Index)
VXVCLS Fred.CBOE.SP500ThreeMonthVolatilityIndex CBOE S&P 500 3-Month Volatility Index (in Index)
VXAPLCLS Fred.CBOE.VIXOnApple CBOE Equity VIX on Apple (in Index)
VXGDXCLS Fred.CBOE.GoldMinersETFVolatilityIndex CBOE Gold Miners ETF Volatility Index (in Index)
VXFXICLS Fred.CBOE.ChinaETFVolatilityIndex CBOE China ETF Volatility Index (in Index)
VXEWZCLS Fred.CBOE.BrazilETFVolatilityIndex CBOE Brazil ETF Volatility Index (in Index)
VXEEMCLS Fred.CBOE.EmergingMarketsETFVolatilityIndex CBOE Emerging Markets ETF Volatility Index (in Index)
EVZCLS Fred.CBOE.EuroCurrencyETFVolatilityIndex CBOE EuroCurrency ETF Volatility Index (in Index)
GVZCLS Fred.CBOE.GoldETFVolatilityIndex CBOE Gold ETF Volatility Index (in Index)
OVXCLS Fred.CBOE.CrudeOilETFVolatilityIndex CBOE Crude Oil ETF Volatility Index (in Index)
VXSLVCLS Fred.CBOE.SilverETFVolatilityIndex CBOE Silver ETF Volatility Index (in Index)
VXXLECLS Fred.CBOE.EnergySectorETFVolatilityIndex CBOE Energy Sector ETF Volatility Index (in Index)
VIXCLS Fred.CBOE.VIX CBOE Volatility Index: VIX (in Index)
CentralBankInterventions
JPINTDDMEJPY Fred.CentralBankInterventions.JapaneseBankPurchasesOfDmEuroAgainstJpy Japan Intervention: Japanese Bank purchases of DM/Euro against JPY (in 100 Million Yen)
JPINTDEXR Fred.CentralBankInterventions.JapaneseBankPurchasesOfUsdAgainstDm Japan Intervention: Japanese Bank purchases of USD against DM (in 100 Million Yen)
JPINTDUSDRP Fred.CentralBankInterventions.JapaneseBankPurchasesOfUsdAgainstRupiah Japan Intervention: Japanese Bank purchases of USD against Rupiah (in 100 Million Yen)
USINTDMRKTJPY Fred.CentralBankInterventions.USInterventionInMarketTransactionsInTheJpyUsd U.S. Intervention: in Market Transactions in the JPY/USD (Millions of USD) (in Millions of USD)
USINTDCSOTH Fred.CentralBankInterventions.USInterventionWithCustomerTransactionsInOtherCurrencies U.S. Intervention: With-Customer Transactions in Other Currencies (Millions of USD) (in Millions of USD)
USINTDCSJPY Fred.CentralBankInterventions.USInterventionWithCustomerTransactionsInTheJpyUsd U.S. Intervention: With-Customer Transactions in the JPY/USD (Millions of USD) (in Millions of USD)
USINTDCSDM Fred.CentralBankInterventions.USInterventionWithCustomerTransactionsInTheDemUsdEuro U.S. Intervention: With-Customer Transactions in the DEM/USD (Euro since 1999) (Millions of USD) (in Millions of USD)
USINTDMRKTOTH Fred.CentralBankInterventions.USInterventionInMarketTransactionsInOtherCurrencies U.S. Intervention: in Market Transactions in Other Currencies (Millions of USD) (in Millions of USD)
TRINTDEXR Fred.CentralBankInterventions.CentralBankOfTurkeyPurchasesOfUsd Turkish Intervention: Central Bank of Turkey Purchases of USD (Millions of USD) (in Millions of USD)
JPINTDUSDJPY Fred.CentralBankInterventions.JapaneseBankPurchasesOfUsdAgainstJpy Japan Intervention: Japanese Bank purchases of USD against JPY (in 100 Million Yen)
USINTDMRKTDM Fred.CentralBankInterventions.USInterventionInMarketTransactionsInTheDemUsdEuro U.S. Intervention: in Market Transactions in the DEM/USD (Euro since 1999) (Millions of USD) (in Millions of USD)
CHINTDCHFDM Fred.CentralBankInterventions.SwissNationalBankPurchasesOfDemAgainstChfMillionsOfDem Swiss Intervention: Swiss National Bank Purchases of DEM against CHF (Millions of DEM) (in Millions of DEM)
CHINTDUSDDM Fred.CentralBankInterventions.SwissNationalBankPurchasesOfUsdAgainstDem Swiss Intervention: Swiss National Bank Purchases of USD against DEM (Millions of USD) (in Millions of USD)
CHINTDUSDJPY Fred.CentralBankInterventions.SwissNationalBankPurchasesOfUsdAgainstJpy Swiss Intervention: Swiss National Bank Purchases of USD against JPY (Millions of USD) (in Millions of USD)
CHINTDCHFUSD Fred.CentralBankInterventions.SwissNationalBankPurchasesOfUsdAgainstChf Swiss Intervention: Swiss National Bank Purchases of USD against CHF (Millions of USD) (in Millions of USD)
MEXINTDUSD Fred.CentralBankInterventions.BancoDeMexicoPurchaseOnTheUsd Mexican Intervention: Banco de Mexico Purchase on the USD (in Millions of USD)
CommercialPaper
DCPN3M Fred.CommercialPaper.ThreeMonthAANonfinancialCommercialPaperRate 3-Month AA Nonfinancial Commercial Paper Rate (in Percent)
DCPN30 Fred.CommercialPaper.OneMonthAANonfinancialCommercialPaperRate 1-Month AA Nonfinancial Commercial Paper Rate (in Percent)
DCPN2M Fred.CommercialPaper.TwoMonthAANonfinancialCommercialPaperRate 2-Month AA Nonfinancial Commercial Paper Rate (in Percent)
DCPF3M Fred.CommercialPaper.ThreeMonthAAFinancialCommercialPaperRate 3-Month AA Financial Commercial Paper Rate (in Percent)
DCPF2M Fred.CommercialPaper.TwoMonthAAFinancialCommercialPaperRate 2-Month AA Financial Commercial Paper Rate (in Percent)
DCPF1M Fred.CommercialPaper.OneMonthAAFinancialCommercialPaperRate 1-Month AA Financial Commercial Paper Rate (in Percent)
NONFIN14A2P2VOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween1and4DaysUsedForA2P2Nonfinancial Number of Issues, with a Maturity Between 1 and 4 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Number)
NONFIN59A2P2VOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween5and9DaysUsedForA2P2Nonfinancial Number of Issues, with a Maturity Between 5 and 9 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Number)
NONFIN59A2P2AMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween5and9DaysUsedForA2P2Nonfinancial Total Value of Issues, with a Maturity Between 5 and 9 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Millions of Dollars)
NONFIN4180AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween41and80DaysUsedForAANonfinancial Number of Issues, with a Maturity Between 41 and 80 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Number)
ABGT80AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityGreaterThan80DaysUsedForAAAssetBacked Total Value of Issues, with a Maturity Greater Than 80 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Millions of Dollars)
NONFIN4180AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween41and80DaysUsedForAANonfinancial Total Value of Issues, with a Maturity Between 41 and 80 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Millions of Dollars)
NONFIN4180A2P2VOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween41and80DaysUsedForA2P2Nonfinancial Number of Issues, with a Maturity Between 41 and 80 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Number)
NONFIN4180A2P2AMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween41and80DaysUsedForA2P2Nonfinancial Total Value of Issues, with a Maturity Between 41 and 80 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Millions of Dollars)
NONFIN2140AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween21and40DaysUsedForAANonfinancial Number of Issues, with a Maturity Between 21 and 40 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Number)
NONFIN2140AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween21and40DaysUsedForAANonfinancial Total Value of Issues, with a Maturity Between 21 and 40 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Millions of Dollars)
NONFIN2140A2P2VOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween21and40DaysUsedForA2P2Nonfinancial Number of Issues, with a Maturity Between 21 and 40 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Number)
NONFIN2140A2P2AMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween21and40DaysUsedForA2P2Nonfinancial Total Value of Issues, with a Maturity Between 21 and 40 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Millions of Dollars)
NONFIN14AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween1and4DaysUsedForAANonfinancial Number of Issues, with a Maturity Between 1 and 4 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Number)
NONFIN1020A2P2VOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween10And20DaysUsedForA2P2Nonfinancial Number of Issues, with a Maturity Between 10 and 20 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Number)
NONFIN1020AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween10And20DaysUsedForAANonfinancial Total Value of Issues, with a Maturity Between 10 and 20 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Millions of Dollars)
AB2140AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween21and40DaysUsedForAAAssetBacked Total Value of Issues, with a Maturity Between 21 and 40 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Millions of Dollars)
NONFIN1020AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween10And20DaysUsedForAANonfinancial Number of Issues, with a Maturity Between 10 and 20 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Number)
NONFIN14A2P2AMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween1and4DaysUsedForA2P2Nonfinancial Total Value of Issues, with a Maturity Between 1 and 4 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Millions of Dollars)
NONFIN14AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween1and4DaysUsedForAANonfinancial Total Value of Issues, with a Maturity Between 1 and 4 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Millions of Dollars)
MKT14MKTAMT Fred.CommercialPaper.TotalValueofCommercialPaperIssueswithaMaturityBetween1and4Days Total Value of Commercial Paper Issues with a Maturity Between 1 and 4 Days (in Millions of Dollars)
NONFIN1020A2P2AMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween10And20DaysUsedForA2P2Nonfinancial Total Value of Issues, with a Maturity Between 10 and 20 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Millions of Dollars)
FINGT80AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityGreaterThan80DaysUsedForAAFinancial Number of Issues, with a Maturity Greater Than 80 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Number)
FIN1020AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween10And20DaysUsedForAAFinancial Number of Issues, with a Maturity Between 10 and 20 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Number)
FIN14AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween1and4DaysUsedForAAFinancial Total Value of Issues, with a Maturity Between 1 and 4 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Millions of Dollars)
FIN14AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween1and4DaysUsedForAAFinancial Number of Issues, with a Maturity Between 1 and 4 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Number)
MKT1020MKTAMT Fred.CommercialPaper.TotalValueofCommercialPaperIssueswithaMaturityBetween10And20Days Total Value of Commercial Paper Issues with a Maturity Between 10 and 20 Days (in Millions of Dollars)
MKT1020MKTVOL Fred.CommercialPaper.NumberofCommercialPaperIssueswithaMaturityBetween10And20Days Number of Commercial Paper Issues with a Maturity Between 10 and 20 Days (in Number)
FIN2140AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween21and40DaysUsedForAAFinancial Total Value of Issues, with a Maturity Between 21 and 40 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Millions of Dollars)
MKT14MKTVOL Fred.CommercialPaper.NumberofCommercialPaperIssueswithaMaturityBetween1and4Days Number of Commercial Paper Issues with a Maturity Between 1 and 4 Days (in Number)
MKT2140MKTAMT Fred.CommercialPaper.TotalValueofIssuersofCommercialPaperwithaMaturityBetween21and40Days Total Value of Issuers of Commercial Paper with a Maturity Between 21 and 40 Days (in Millions of Dollars)
MKT2140MKTVOL Fred.CommercialPaper.NumberofCommercialPaperIssueswithaMaturityBetween21and40Days Number of Commercial Paper Issues with a Maturity Between 21 and 40 Days (in Number)
FIN2140AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween21and40DaysUsedForAAFinancial Number of Issues, with a Maturity Between 21 and 40 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Number)
MKT4180MKTAMT Fred.CommercialPaper.TotalValueofIssuersofCommercialPaperwithaMaturityBetween41and80Days Total Value of Issuers of Commercial Paper with a Maturity Between 41 and 80 Days (in Millions of Dollars)
NONFIN59AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween5and9DaysUsedForAANonfinancial Total Value of Issues, with a Maturity Between 5 and 9 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Millions of Dollars)
MKT4180MKTVOL Fred.CommercialPaper.NumberofCommercialPaperIssueswithaMaturityBetween41and80Days Number of Commercial Paper Issues with a Maturity Between 41 and 80 Days (in Number)
MKT59MKTVOL Fred.CommercialPaper.NumberofCommercialPaperIssueswithaMaturityBetween5and9Days Number of Commercial Paper Issues with a Maturity Between 5 and 9 Days (in Number)
MKTGT80MKTAMT Fred.CommercialPaper.TotalValueofIssuersofCommercialPaperwithaMaturityGreaterThan80Days Total Value of Issuers of Commercial Paper with a Maturity Greater Than 80 Days (in Millions of Dollars)
MKTGT80MKTVOL Fred.CommercialPaper.NumberofCommercialPaperIssueswithaMaturityGreaterThan80Days Number of Commercial Paper Issues with a Maturity Greater Than 80 Days (in Number)
FIN4180AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween41and80DaysUsedForAAFinancial Total Value of Issues, with a Maturity Between 41 and 80 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Millions of Dollars)
FIN4180AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween41and80DaysUsedForAAFinancial Number of Issues, with a Maturity Between 41 and 80 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Number)
AB4180AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween41and80DaysUsedForAAAssetBacked Total Value of Issues, with a Maturity Between 41 and 80 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Millions of Dollars)
FIN59AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween5and9DaysUsedForAAFinancial Total Value of Issues, with a Maturity Between 5 and 9 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Millions of Dollars)
FIN59AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween5and9DaysUsedForAAFinancial Number of Issues, with a Maturity Between 5 and 9 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Number)
FINGT80AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityGreaterThan80DaysUsedForAAFinancial Total Value of Issues, with a Maturity Greater Than 80 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Millions of Dollars)
FIN1020AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween10And20DaysUsedForAAFinancial Total Value of Issues, with a Maturity Between 10 and 20 Days, Used in Calculating the AA Financial Commercial Paper Rates (in Millions of Dollars)
AB2140AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween21and40DaysUsedForAAAssetBacked Number of Issues, with a Maturity Between 21 and 40 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Number)
MKT59MKTAMT Fred.CommercialPaper.TotalValueofIssuersofCommercialPaperwithaMaturityBetween5and9Days Total Value of Issuers of Commercial Paper with a Maturity Between 5 and 9 Days (in Millions of Dollars)
ABGT80AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityGreaterThan80DaysUsedForAAAssetBacked Number of Issues, with a Maturity Greater Than 80 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Number)
NONFIN59AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween5and9DaysUsedForAANonfinancial Number of Issues, with a Maturity Between 5 and 9 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Number)
RIFSPPAAAD15NB Fred.CommercialPaper.FifteenDayAAAssetbackedCommercialPaperInterestRate 15-Day AA Asset-backed Commercial Paper Interest Rate (in Percent)
AB59AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween5and9DaysUsedForAAAssetBacked Total Value of Issues, with a Maturity Between 5 and 9 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Millions of Dollars)
AB4180AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween41and80DaysUsedForAAAssetBacked Number of Issues, with a Maturity Between 41 and 80 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Number)
RIFSPPNA2P2D15NB Fred.CommercialPaper.FifteenDayA2P2NonfinancialCommercialPaperInterestRate 15-Day A2/P2 Nonfinancial Commercial Paper Interest Rate (in Percent)
RIFSPPNA2P2D07NB Fred.CommercialPaper.SevenDayA2P2NonfinancialCommercialPaperInterestRate 7-Day A2/P2 Nonfinancial Commercial Paper Interest Rate (in Percent)
RIFSPPNA2P2D01NB Fred.CommercialPaper.OvernightA2P2NonfinancialCommercialPaperInterestRate Overnight A2/P2 Nonfinancial Commercial Paper Interest Rate (in Percent)
RIFSPPFAAD90NB Fred.CommercialPaper.NinetyDayAAFinancialCommercialPaperInterestRate 90-Day AA Financial Commercial Paper Interest Rate (in Percent)
RIFSPPAAAD01NB Fred.CommercialPaper.OvernightAAAssetbackedCommercialPaperInterestRate Overnight AA Asset-backed Commercial Paper Interest Rate (in Percent)
RIFSPPNA2P2D30NB Fred.CommercialPaper.Three0DayA2P2NonfinancialCommercialPaperInterestRate 30-Day A2/P2 Nonfinancial Commercial Paper Interest Rate (in Percent)
RIFSPPFAAD60NB Fred.CommercialPaper.SixtyDayAAFinancialCommercialPaperInterestRate 60-Day AA Financial Commercial Paper Interest Rate (in Percent)
RIFSPPFAAD30NB Fred.CommercialPaper.Three0DayAAFinancialCommercialPaperInterestRate 30-Day AA Financial Commercial Paper Interest Rate (in Percent)
NONFINGT80A2P2AMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityGreaterThan80DaysUsedForA2P2Nonfinancial Total Value of Issues, with a Maturity Greater Than 80 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Millions of Dollars)
RIFSPPAAAD30NB Fred.CommercialPaper.Three0DayAAAssetbackedCommercialPaperInterestRate 30-Day AA Asset-backed Commercial Paper Interest Rate (in Percent)
RIFSPPAAAD60NB Fred.CommercialPaper.SixtyDayAAAssetbackedCommercialPaperInterestRate 60-Day AA Asset-backed Commercial Paper Interest Rate (in Percent)
RIFSPPAAAD90NB Fred.CommercialPaper.NinetyDayAAAssetbackedCommercialPaperInterestRate 90-Day AA Asset-backed Commercial Paper Interest Rate (in Percent)
RIFSPPFAAD15NB Fred.CommercialPaper.FifteenDayAAFinancialCommercialPaperInterestRate 15-Day AA Financial Commercial Paper Interest Rate (in Percent)
RIFSPPFAAD07NB Fred.CommercialPaper.SevenDayAAFinancialCommercialPaperInterestRate 7-Day AA Financial Commercial Paper Interest Rate (in Percent)
RIFSPPAAAD07NB Fred.CommercialPaper.SevenDayAAAssetbackedCommercialPaperInterestRate 7-Day AA Asset-backed Commercial Paper Interest Rate (in Percent)
RIFSPPFAAD01NB Fred.CommercialPaper.OvernightAAFinancialCommercialPaperInterestRate Overnight AA Financial Commercial Paper Interest Rate (in Percent)
RIFSPPNA2P2D60NB Fred.CommercialPaper.SixtyDayA2P2NonfinancialCommercialPaperInterestRate 60-Day A2/P2 Nonfinancial Commercial Paper Interest Rate (in Percent)
AB59AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween5and9DaysUsedForAAAssetBacked Number of Issues, with a Maturity Between 5 and 9 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Number)
AB14AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween1and4DaysUsedForAAAssetBacked Number of Issues, with a Maturity Between 1 and 4 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Number)
NONFINGT80A2P2VOL Fred.CommercialPaper.NumberOfIssuesWithMaturityGreaterThan80DaysUsedForA2P2Nonfinancial Number of Issues, with a Maturity Greater Than 80 Days, Used in Calculating the A2/P2 Nonfinancial Commercial Paper Rates (in Number)
AB14AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween1and4DaysUsedForAAAssetBacked Total Value of Issues, with a Maturity Between 1 and 4 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Millions of Dollars)
RIFSPPNA2P2D90NB Fred.CommercialPaper.NinetyDayA2P2NonfinancialCommercialPaperInterestRate 90-Day A2/P2 Nonfinancial Commercial Paper Interest Rate (in Percent)
AB1020AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityBetween10And20DaysUsedForAAAssetBacked Number of Issues, with a Maturity Between 10 and 20 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Number)
NONFINGT80AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityGreaterThan80DaysUsedForAANonfinancial Total Value of Issues, with a Maturity Greater Than 80 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Millions of Dollars)
RIFSPPNAAD01NB Fred.CommercialPaper.OvernightAANonfinancialCommercialPaperInterestRate Overnight AA Nonfinancial Commercial Paper Interest Rate (in Percent)
AB1020AAAMT Fred.CommercialPaper.TotalValueOfIssuesWithMaturityBetween10And20DaysUsedForAAAssetBacked Total Value of Issues, with a Maturity Between 10 and 20 Days, Used in Calculating the AA Asset-Backed Commercial Paper Rates (in Millions of Dollars)
RIFSPPNAAD07NB Fred.CommercialPaper.SevenDayAANonfinancialCommercialPaperInterestRate 7-Day AA Nonfinancial Commercial Paper Interest Rate (in Percent)
RIFSPPNAAD90NB Fred.CommercialPaper.NinetyDayAANonfinancialCommercialPaperInterestRate 90-Day AA Nonfinancial Commercial Paper Interest Rate (in Percent)
RIFSPPNAAD15NB Fred.CommercialPaper.FifteenDayAANonfinancialCommercialPaperInterestRate 15-Day AA Nonfinancial Commercial Paper Interest Rate (in Percent)
RIFSPPNAAD30NB Fred.CommercialPaper.Three0DayAANonfinancialCommercialPaperInterestRate 30-Day AA Nonfinancial Commercial Paper Interest Rate (in Percent)
RIFSPPNAAD60NB Fred.CommercialPaper.SixtyDayAANonfinancialCommercialPaperInterestRate 60-Day AA Nonfinancial Commercial Paper Interest Rate (in Percent)
NONFINGT80AAVOL Fred.CommercialPaper.NumberOfIssuesWithMaturityGreaterThan80DaysUsedForAANonfinancial Number of Issues, with a Maturity Greater Than 80 Days, Used in Calculating the AA Nonfinancial Commercial Paper Rates (in Number)
CPFF Fred.CommercialPaper.ThreeMonthCommercialPaperMinusFederalFundsRate 3-Month Commercial Paper Minus Federal Funds Rate (in Percent)
ICEBofAML
BAMLEM1BRRAAA2ACRPITRIV Fred.ICEBofAML.AAAAEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML AAA-A Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEM1RAAA2ALCRPIUSTRIV Fred.ICEBofAML.AAAAUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML AAA-A US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMRACRPIASIATRIV Fred.ICEBofAML.AsiaEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Asia Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMALLCRPIASIAUSTRIV Fred.ICEBofAML.AsiaUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Asia US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEM4BRRBLCRPITRIV Fred.ICEBofAML.BandLowerEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML B and Lower Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEM4RBLLCRPIUSTRIV Fred.ICEBofAML.BandLowerUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML B and Lower US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEM3BRRBBCRPITRIV Fred.ICEBofAML.BBEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML BB Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEM3RBBLCRPIUSTRIV Fred.ICEBofAML.BBUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML BB US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEM2BRRBBBCRPITRIV Fred.ICEBofAML.BBBEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML BBB Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEM2RBBBLCRPIUSTRIV Fred.ICEBofAML.BBBUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML BBB US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEM5BCOCRPITRIV Fred.ICEBofAML.CrossoverEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Crossover Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMXOCOLCRPIUSTRIV Fred.ICEBofAML.CrossoverUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Crossover US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMCBPITRIV Fred.ICEBofAML.EmergingMarketsCorporatePlusIndexTotalReturnIndexValue ICE BofAML Emerging Markets Corporate Plus Index Total Return Index Value (in Index)
BAMLEMEBCRPIETRIV Fred.ICEBofAML.EuroEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Euro Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMRECRPIEMEATRIV Fred.ICEBofAML.EMEAEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Europe, the Middle East, and Africa (EMEA) Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMELLCRPIEMEAUSTRIV Fred.ICEBofAML.EMEAUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Europe, the Middle East, and Africa (EMEA) US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMFSFCRPITRIV Fred.ICEBofAML.FinancialEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Financial Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMFLFLCRPIUSTRIV Fred.ICEBofAML.FinancialUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Financial US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMIBHGCRPITRIV Fred.ICEBofAML.HighGradeEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML High Grade Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMHGHGLCRPIUSTRIV Fred.ICEBofAML.HighGradeUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML High Grade US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMHBHYCRPITRIV Fred.ICEBofAML.HighYieldEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML High Yield Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMHYHYLCRPIUSTRIV Fred.ICEBofAML.HighYieldUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML High Yield US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMRLCRPILATRIV Fred.ICEBofAML.LatinAmericaEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Latin America Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMLLLCRPILAUSTRIV Fred.ICEBofAML.LatinAmericaUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Latin America US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMNSNFCRPITRIV Fred.ICEBofAML.NonFinancialEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Non-Financial Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMNFNFLCRPIUSTRIV Fred.ICEBofAML.NonFinancialUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Non-Financial US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLC0A0CM Fred.ICEBofAML.USCorporateMasterOptionAdjustedSpread ICE BofAML US Corporate Master Option-Adjusted Spread (in Percent)
BAMLH0A0HYM2 Fred.ICEBofAML.USHighYieldMasterIIOptionAdjustedSpread ICE BofAML US High Yield Master II Option-Adjusted Spread (in Percent)
BAMLC1A0C13Y Fred.ICEBofAML.USCorporate1To3YearOptionAdjustedSpread ICE BofAML US Corporate 1-3 Year Option-Adjusted Spread (in Percent)
BAMLC7A0C1015Y Fred.ICEBofAML.USCorporate10To15YearOptionAdjustedSpread ICE BofAML US Corporate 10-15 Year Option-Adjusted Spread (in Percent)
BAMLC8A0C15PY Fred.ICEBofAML.USCorporateMoreThan15YearOptionAdjustedSpread ICE BofAML US Corporate 15+ Year Option-Adjusted Spread (in Percent)
BAMLC2A0C35Y Fred.ICEBofAML.USCorporate3To5YearOptionAdjustedSpread ICE BofAML US Corporate 3-5 Year Option-Adjusted Spread (in Percent)
BAMLC3A0C57Y Fred.ICEBofAML.USCorporate5To7YearOptionAdjustedSpread ICE BofAML US Corporate 5-7 Year Option-Adjusted Spread (in Percent)
BAMLC4A0C710Y Fred.ICEBofAML.USCorporate7To10YearOptionAdjustedSpread ICE BofAML US Corporate 7-10 Year Option-Adjusted Spread (in Percent)
BAMLEMPUPUBSLCRPIUSTRIV Fred.ICEBofAML.PublicSectorIssuersUSEmergingMarketsLiquidCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML Public Sector Issuers US Emerging Markets Liquid Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMUBCRPIUSTRIV Fred.ICEBofAML.USEmergingMarketsCorporatePlusSubIndexTotalReturnIndexValue ICE BofAML US Emerging Markets Corporate Plus Sub-Index Total Return Index Value (in Index)
BAMLEMCLLCRPIUSTRIV Fred.ICEBofAML.USEmergingMarketsLiquidCorporatePlusIndexTotalReturnIndexValue ICE BofAML US Emerging Markets Liquid Corporate Plus Index Total Return Index Value (in Index)
BAMLHE00EHYITRIV Fred.ICEBofAML.EuroHighYieldIndexTotalReturnIndexValue ICE BofAML Euro High Yield Index Total Return Index Value (in Index)
BAMLCC1A013YTRIV Fred.ICEBofAML.USCorp1To3YearsTotalReturnIndexValue ICE BofAML US Corp 1-3yr Total Return Index Value (in Index)
BAMLCC7A01015YTRIV Fred.ICEBofAML.USCorp10To15TotalReturnIndexValue ICE BofAML US Corp 10-15yr Total Return Index Value (in Index)
BAMLCC8A015PYTRIV Fred.ICEBofAML.USCorpMoreThan15YearsTotalReturnIndexValue ICE BofAML US Corp 15+yr Total Return Index Value (in Index)
BAMLCC2A035YTRIV Fred.ICEBofAML.USCorpeTo5YearsTotalReturnIndexValue ICE BofAML US Corp 3-5yr Total Return Index Value (in Index)
BAMLCC3A057YTRIV Fred.ICEBofAML.USCorp5To7YearsTotalReturnIndexValue ICE BofAML US Corp 5-7yr Total Return Index Value (in Index)
BAMLCC4A0710YTRIV Fred.ICEBofAML.USCorporate7To10YearsTotalReturnIndexValue ICE BofAML US Corporate 7-10yr Total Return Index Value (in Index)
BAMLCC0A3ATRIV Fred.ICEBofAML.USCorpATotalReturnIndexValue ICE BofAML US Corp A Total Return Index Value (in Index)
BAMLCC0A2AATRIV Fred.ICEBofAML.USCorpAATotalReturnIndexValue ICE BofAML US Corp AA Total Return Index Value (in Index)
BAMLCC0A1AAATRIV Fred.ICEBofAML.USCorpAAATotalReturnIndexValue ICE BofAML US Corp AAA Total Return Index Value (in Index)
BAMLHYH0A2BTRIV Fred.ICEBofAML.USHighYieldBTotalReturnIndexValue ICE BofAML US High Yield B Total Return Index Value (in Index)
BAMLHYH0A1BBTRIV Fred.ICEBofAML.USHighYieldBBTotalReturnIndexValue ICE BofAML US High Yield BB Total Return Index Value (in Index)
BAMLCC0A4BBBTRIV Fred.ICEBofAML.USCorpBBBTotalReturnIndexValue ICE BofAML US Corp BBB Total Return Index Value (in Index)
BAMLHYH0A3CMTRIV Fred.ICEBofAML.USHighYieldCCCorBelowTotalReturnIndexValue ICE BofAML US High Yield CCC or Below Total Return Index Value (in Index)
BAMLCC0A0CMTRIV Fred.ICEBofAML.USCorpMasterTotalReturnIndexValue ICE BofAML US Corp Master Total Return Index Value (in Index)
BAMLHYH0A0HYM2TRIV Fred.ICEBofAML.USHighYieldMasterIITotalReturnIndexValue ICE BofAML US High Yield Master II Total Return Index Value (in Index)
BAMLEM1BRRAAA2ACRPIOAS Fred.ICEBofAML.AAAAEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML AAA-A Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEM1RAAA2ALCRPIUSOAS Fred.ICEBofAML.AAAAUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML AAA-A US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMRACRPIASIAOAS Fred.ICEBofAML.AsiaEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Asia Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMALLCRPIASIAUSOAS Fred.ICEBofAML.AsiaUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Asia US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEM4BRRBLCRPIOAS Fred.ICEBofAML.BandLowerEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML B and Lower Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEM4RBLLCRPIUSOAS Fred.ICEBofAML.BandLowerUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML B and Lower US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEM3BRRBBCRPIOAS Fred.ICEBofAML.BBEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML BB Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEM3RBBLCRPIUSOAS Fred.ICEBofAML.BBUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML BB US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEM2BRRBBBCRPIOAS Fred.ICEBofAML.BBBEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML BBB Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEM2RBBBLCRPIUSOAS Fred.ICEBofAML.BBBUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML BBB US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEM5BCOCRPIOAS Fred.ICEBofAML.CrossoverEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Crossover Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMXOCOLCRPIUSOAS Fred.ICEBofAML.CrossoverUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Crossover US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMCBPIOAS Fred.ICEBofAML.EmergingMarketsCorporatePlusIndexOptionAdjustedSpread ICE BofAML Emerging Markets Corporate Plus Index Option-Adjusted Spread (in Percent)
BAMLEMEBCRPIEOAS Fred.ICEBofAML.EuroEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Euro Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMRECRPIEMEAOAS Fred.ICEBofAML.EMEAEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Europe, the Middle East, and Africa (EMEA) Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMELLCRPIEMEAUSOAS Fred.ICEBofAML.EMEAUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Europe, the Middle East, and Africa (EMEA) US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMFSFCRPIOAS Fred.ICEBofAML.FinancialEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Financial Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMFLFLCRPIUSOAS Fred.ICEBofAML.FinancialUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Financial US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMIBHGCRPIOAS Fred.ICEBofAML.HighGradeEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML High Grade Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMHGHGLCRPIUSOAS Fred.ICEBofAML.HighGradeUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML High Grade US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMHBHYCRPIOAS Fred.ICEBofAML.HighYieldEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML High Yield Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMHYHYLCRPIUSOAS Fred.ICEBofAML.HighYieldUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML High Yield US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMRLCRPILAOAS Fred.ICEBofAML.LatinAmericaEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Latin America Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMLLLCRPILAUSOAS Fred.ICEBofAML.LatinAmericaUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Latin America US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMNSNFCRPIOAS Fred.ICEBofAML.NonFinancialEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Non-Financial Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMNFNFLCRPIUSOAS Fred.ICEBofAML.NonFinancialUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Non-Financial US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMPUPUBSLCRPIUSOAS Fred.ICEBofAML.PublicSectorIssuersUSEmergingMarketsLiquidCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML Public Sector Issuers US Emerging Markets Liquid Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMUBCRPIUSOAS Fred.ICEBofAML.USEmergingMarketsCorporatePlusSubIndexOptionAdjustedSpread ICE BofAML US Emerging Markets Corporate Plus Sub-Index Option-Adjusted Spread (in Percent)
BAMLEMCLLCRPIUSOAS Fred.ICEBofAML.USEmergingMarketsLiquidCorporatePlusIndexOptionAdjustedSpread ICE BofAML US Emerging Markets Liquid Corporate Plus Index Option-Adjusted Spread (in Percent)
BAMLHE00EHYIOAS Fred.ICEBofAML.EuroHighYieldIndexOptionAdjustedSpread ICE BofAML Euro High Yield Index Option-Adjusted Spread (in Percent)
BAMLC0A3CA Fred.ICEBofAML.USCorporateAOptionAdjustedSpread ICE BofAML US Corporate A Option-Adjusted Spread (in Percent)
BAMLC0A2CAA Fred.ICEBofAML.USCorporateAAOptionAdjustedSpread ICE BofAML US Corporate AA Option-Adjusted Spread (in Percent)
BAMLC0A1CAAA Fred.ICEBofAML.USCorporateAAAOptionAdjustedSpread ICE BofAML US Corporate AAA Option-Adjusted Spread (in Percent)
BAMLH0A2HYB Fred.ICEBofAML.USHighYieldBOptionAdjustedSpread ICE BofAML US High Yield B Option-Adjusted Spread (in Percent)
BAMLH0A1HYBB Fred.ICEBofAML.USHighYieldBBOptionAdjustedSpread ICE BofAML US High Yield BB Option-Adjusted Spread (in Percent)
BAMLC0A4CBBB Fred.ICEBofAML.USCorporateBBBOptionAdjustedSpread ICE BofAML US Corporate BBB Option-Adjusted Spread (in Percent)
BAMLH0A3HYC Fred.ICEBofAML.USHighYieldCCCorBelowOptionAdjustedSpread ICE BofAML US High Yield CCC or Below Option-Adjusted Spread (in Percent)
BAMLEM1BRRAAA2ACRPIEY Fred.ICEBofAML.AAAAEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML AAA-A Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEM1RAAA2ALCRPIUSEY Fred.ICEBofAML.AAAAUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML AAA-A US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMRACRPIASIAEY Fred.ICEBofAML.AsiaEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML Asia Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMALLCRPIASIAUSEY Fred.ICEBofAML.AsiaUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML Asia US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEM4BRRBLCRPIEY Fred.ICEBofAML.BandLowerEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML B and Lower Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEM4RBLLCRPIUSEY Fred.ICEBofAML.BandLowerUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML B and Lower US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEM3BRRBBCRPIEY Fred.ICEBofAML.BBEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML BB Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEM3RBBLCRPIUSEY Fred.ICEBofAML.BBUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML BB US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEM2BRRBBBCRPIEY Fred.ICEBofAML.BBBEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML BBB Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEM2RBBBLCRPIUSEY Fred.ICEBofAML.BBBUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML BBB US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEM5BCOCRPIEY Fred.ICEBofAML.CrossoverEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML Crossover Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMXOCOLCRPIUSEY Fred.ICEBofAML.CrossoverUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML Crossover US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMCBPIEY Fred.ICEBofAML.EmergingMarketsCorporatePlusIndexEffectiveYield ICE BofAML Emerging Markets Corporate Plus Index Effective Yield (in Percent)
BAMLEMEBCRPIEEY Fred.ICEBofAML.EuroEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML Euro Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLHE00EHYIEY Fred.ICEBofAML.EuroHighYieldIndexEffectiveYield ICE BofAML Euro High Yield Index Effective Yield (in Percent)
BAMLEMRECRPIEMEAEY Fred.ICEBofAML.EMEAEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML Europe, the Middle East, and Africa (EMEA) Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMELLCRPIEMEAUSEY Fred.ICEBofAML.EMEAUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML Europe, the Middle East, and Africa (EMEA) US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMFSFCRPIEY Fred.ICEBofAML.FinancialEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML Financial Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMFLFLCRPIUSEY Fred.ICEBofAML.FinancialUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML Financial US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMIBHGCRPIEY Fred.ICEBofAML.HighGradeEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML High Grade Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMHGHGLCRPIUSEY Fred.ICEBofAML.HighGradeUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML High Grade US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMHBHYCRPIEY Fred.ICEBofAML.HighYieldEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML High Yield Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMHYHYLCRPIUSEY Fred.ICEBofAML.HighYieldUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML High Yield US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMRLCRPILAEY Fred.ICEBofAML.LatinAmericaEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML Latin America Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMLLLCRPILAUSEY Fred.ICEBofAML.LatinAmericaUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML Latin America US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMNSNFCRPIEY Fred.ICEBofAML.NonFinancialEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML Non-Financial Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMNFNFLCRPIUSEY Fred.ICEBofAML.NonFinancialUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML Non-Financial US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMPUPUBSLCRPIUSEY Fred.ICEBofAML.PublicSectorIssuersUSEmergingMarketsLiquidCorporatePlusSubIndexEffectiveYield ICE BofAML Public Sector Issuers US Emerging Markets Liquid Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLC1A0C13YEY Fred.ICEBofAML.USCorporate1ThreeYearEffectiveYield ICE BofAML US Corporate 1-3 Year Effective Yield (in Percent)
BAMLC7A0C1015YEY Fred.ICEBofAML.USCorporate10To15YearEffectiveYield ICE BofAML US Corporate 10-15 Year Effective Yield (in Percent)
BAMLC8A0C15PYEY Fred.ICEBofAML.USCorporateMoreThan15YearEffectiveYield ICE BofAML US Corporate 15+ Year Effective Yield (in Percent)
BAMLC2A0C35YEY Fred.ICEBofAML.USCorporate3To5YearEffectiveYield ICE BofAML US Corporate 3-5 Year Effective Yield (in Percent)
BAMLC3A0C57YEY Fred.ICEBofAML.USCorporate5To7YearEffectiveYield ICE BofAML US Corporate 5-7 Year Effective Yield (in Percent)
BAMLC4A0C710YEY Fred.ICEBofAML.USCorporate7To10YearEffectiveYield ICE BofAML US Corporate 7-10 Year Effective Yield (in Percent)
BAMLC0A3CAEY Fred.ICEBofAML.USCorporateAEffectiveYield ICE BofAML US Corporate A Effective Yield (in Percent)
BAMLC0A2CAAEY Fred.ICEBofAML.USCorporateAAEffectiveYield ICE BofAML US Corporate AA Effective Yield (in Percent)
BAMLC0A1CAAAEY Fred.ICEBofAML.USCorporateAAAEffectiveYield ICE BofAML US Corporate AAA Effective Yield (in Percent)
BAMLH0A2HYBEY Fred.ICEBofAML.USHighYieldBEffectiveYield ICE BofAML US High Yield B Effective Yield (in Percent)
BAMLH0A1HYBBEY Fred.ICEBofAML.USHighYieldBBEffectiveYield ICE BofAML US High Yield BB Effective Yield (in Percent)
BAMLC0A4CBBBEY Fred.ICEBofAML.USCorporateBBBEffectiveYield ICE BofAML US Corporate BBB Effective Yield (in Percent)
BAMLH0A3HYCEY Fred.ICEBofAML.USHighYieldCCCorBelowEffectiveYield ICE BofAML US High Yield CCC or Below Effective Yield (in Percent)
BAMLC0A0CMEY Fred.ICEBofAML.USCorporateMasterEffectiveYield ICE BofAML US Corporate Master Effective Yield (in Percent)
BAMLEMUBCRPIUSEY Fred.ICEBofAML.USEmergingMarketsCorporatePlusSubIndexEffectiveYield ICE BofAML US Emerging Markets Corporate Plus Sub-Index Effective Yield (in Percent)
BAMLEMCLLCRPIUSEY Fred.ICEBofAML.USEmergingMarketsLiquidCorporatePlusIndexEffectiveYield ICE BofAML US Emerging Markets Liquid Corporate Plus Index Effective Yield (in Percent)
BAMLH0A0HYM2EY Fred.ICEBofAML.USHighYieldMasterIIEffectiveYield ICE BofAML US High Yield Master II Effective Yield (in Percent)
BAMLEM1BRRAAA2ACRPISYTW Fred.ICEBofAML.AAAAEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML AAA-A Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEM1RAAA2ALCRPIUSSYTW Fred.ICEBofAML.AAAAUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML AAA-A US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMRACRPIASIASYTW Fred.ICEBofAML.AsiaEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Asia Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMALLCRPIASIAUSSYTW Fred.ICEBofAML.AsiaUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Asia US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEM4BRRBLCRPISYTW Fred.ICEBofAML.BandLowerEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML B and Lower Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEM4RBLLCRPIUSSYTW Fred.ICEBofAML.BandLowerUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML B and Lower US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEM3BRRBBCRPISYTW Fred.ICEBofAML.BBEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML BB Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEM3RBBLCRPIUSSYTW Fred.ICEBofAML.BBUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML BB US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEM2BRRBBBCRPISYTW Fred.ICEBofAML.BBBEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML BBB Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEM2RBBBLCRPIUSSYTW Fred.ICEBofAML.BBBUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML BBB US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEM5BCOCRPISYTW Fred.ICEBofAML.CrossoverEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Crossover Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMXOCOLCRPIUSSYTW Fred.ICEBofAML.CrossoverUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Crossover US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMCBPISYTW Fred.ICEBofAML.EmergingMarketsCorporatePlusIndexSemiAnnualYieldtoWorst ICE BofAML Emerging Markets Corporate Plus Index Semi-Annual Yield to Worst (in Percent)
BAMLEMEBCRPIESYTW Fred.ICEBofAML.EuroEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Euro Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLHE00EHYISYTW Fred.ICEBofAML.EuroHighYieldIndexSemiAnnualYieldtoWorst ICE BofAML Euro High Yield Index Semi-Annual Yield to Worst (in Percent)
BAMLEMRECRPIEMEASYTW Fred.ICEBofAML.EMEAEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Europe, the Middle East, and Africa (EMEA) Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMELLCRPIEMEAUSSYTW Fred.ICEBofAML.EMEAUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Europe, the Middle East, and Africa (EMEA) US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMFSFCRPISYTW Fred.ICEBofAML.FinancialEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Financial Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMFLFLCRPIUSSYTW Fred.ICEBofAML.FinancialUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Financial US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMIBHGCRPISYTW Fred.ICEBofAML.HighGradeEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML High Grade Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMHGHGLCRPIUSSYTW Fred.ICEBofAML.HighGradeUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML High Grade US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMHBHYCRPISYTW Fred.ICEBofAML.HighYieldEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML High Yield Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMHYHYLCRPIUSSYTW Fred.ICEBofAML.HighYieldUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML High Yield US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMRLCRPILASYTW Fred.ICEBofAML.LatinAmericaEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Latin America Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMLLLCRPILAUSSYTW Fred.ICEBofAML.LatinAmericaUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Latin America US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMNSNFCRPISYTW Fred.ICEBofAML.NonFinancialEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Non-Financial Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMNFNFLCRPIUSSYTW Fred.ICEBofAML.NonFinancialUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Non-Financial US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMPTPRVICRPISYTW Fred.ICEBofAML.PrivateSectorIssuersEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Private Sector Issuers Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMPVPRIVSLCRPIUSSYTW Fred.ICEBofAML.PrivateSectorIssuersUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Private Sector Issuers US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMPBPUBSICRPISYTW Fred.ICEBofAML.PublicSectorIssuersEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Public Sector Issuers Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMPUPUBSLCRPIUSSYTW Fred.ICEBofAML.PublicSectorIssuersUSEmergingMarketsLiquidCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML Public Sector Issuers US Emerging Markets Liquid Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLC1A0C13YSYTW Fred.ICEBofAML.USCorporate1To3YearSemiAnnualYieldtoWorst ICE BofAML US Corporate 1-3 Year Semi-Annual Yield to Worst (in Percent)
BAMLC7A0C1015YSYTW Fred.ICEBofAML.USCorporate10To15YearSemiAnnualYieldtoWorst ICE BofAML US Corporate 10-15 Year Semi-Annual Yield to Worst (in Percent)
BAMLC8A0C15PYSYTW Fred.ICEBofAML.USCorporateMoreThan15YearSemiAnnualYieldtoWorst ICE BofAML US Corporate 15+ Year Semi-Annual Yield to Worst (in Percent)
BAMLC2A0C35YSYTW Fred.ICEBofAML.USCorporate3To5YearSemiAnnualYieldtoWorst ICE BofAML US Corporate 3-5 Year Semi-Annual Yield to Worst (in Percent)
BAMLC3A0C57YSYTW Fred.ICEBofAML.USCorporate5To7YearSemiAnnualYieldtoWorst ICE BofAML US Corporate 5-7 Year Semi-Annual Yield to Worst (in Percent)
BAMLC4A0C710YSYTW Fred.ICEBofAML.USCorporate7To10YearSemiAnnualYieldtoWorst ICE BofAML US Corporate 7-10 Year Semi-Annual Yield to Worst (in Percent)
BAMLC0A3CASYTW Fred.ICEBofAML.USCorporateASemiAnnualYieldtoWorst ICE BofAML US Corporate A Semi-Annual Yield to Worst (in Percent)
BAMLC0A2CAASYTW Fred.ICEBofAML.USCorporateAASemiAnnualYieldtoWorst ICE BofAML US Corporate AA Semi-Annual Yield to Worst (in Percent)
BAMLC0A1CAAASYTW Fred.ICEBofAML.USCorporateAAASemiAnnualYieldtoWorst ICE BofAML US Corporate AAA Semi-Annual Yield to Worst (in Percent)
BAMLH0A2HYBSYTW Fred.ICEBofAML.USHighYieldBSemiAnnualYieldtoWorst ICE BofAML US High Yield B Semi-Annual Yield to Worst (in Percent)
BAMLH0A1HYBBSYTW Fred.ICEBofAML.USHighYieldBBSemiAnnualYieldtoWorst ICE BofAML US High Yield BB Semi-Annual Yield to Worst (in Percent)
BAMLC0A4CBBBSYTW Fred.ICEBofAML.USCorporateBBBSemiAnnualYieldtoWorst ICE BofAML US Corporate BBB Semi-Annual Yield to Worst (in Percent)
BAMLH0A3HYCSYTW Fred.ICEBofAML.USHighYieldCCCorBelowSemiAnnualYieldtoWorst ICE BofAML US High Yield CCC or Below Semi-Annual Yield to Worst (in Percent)
BAMLC0A0CMSYTW Fred.ICEBofAML.USCorporateMasterSemiAnnualYieldtoWorst ICE BofAML US Corporate Master Semi-Annual Yield to Worst (in Percent)
BAMLEMUBCRPIUSSYTW Fred.ICEBofAML.USEmergingMarketsCorporatePlusSubIndexSemiAnnualYieldtoWorst ICE BofAML US Emerging Markets Corporate Plus Sub-Index Semi-Annual Yield to Worst (in Percent)
BAMLEMCLLCRPIUSSYTW Fred.ICEBofAML.USEmergingMarketsLiquidCorporatePlusIndexSemiAnnualYieldtoWorst ICE BofAML US Emerging Markets Liquid Corporate Plus Index Semi-Annual Yield to Worst (in Percent)
BAMLH0A0HYM2SYTW Fred.ICEBofAML.USHighYieldMasterIISemiAnnualYieldtoWorst ICE BofAML US High Yield Master II Semi-Annual Yield to Worst (in Percent)
LIBOR
CHFONTD156N Fred.LIBOR.SpotNextBasedOnSwissFranc Spot Next London Interbank Offered Rate (LIBOR), based on Swiss Franc (in Percent)
JPYONTD156N Fred.LIBOR.SpotNextBasedOnJapaneseYen Spot Next London Interbank Offered Rate (LIBOR), based on Japanese Yen (in Percent)
JPY6MTD156N Fred.LIBOR.SixMonthBasedOnJapaneseYen 6-Month London Interbank Offered Rate (LIBOR), based on Japanese Yen (in Percent)
JPY3MTD156N Fred.LIBOR.ThreeMonthBasedOnJapaneseYen 3-Month London Interbank Offered Rate (LIBOR), based on Japanese Yen (in Percent)
USD6MTD156N Fred.LIBOR.SixMonthBasedOnUSD 6-Month London Interbank Offered Rate (LIBOR), based on U.S. Dollar (in Percent)
JPY1MTD156N Fred.LIBOR.OneMonthBasedOnJapaneseYen 1-Month London Interbank Offered Rate (LIBOR), based on Japanese Yen (in Percent)
JPY12MD156N Fred.LIBOR.TwelveMonthBasedOnJapaneseYen 12-Month London Interbank Offered Rate (LIBOR), based on Japanese Yen (in Percent)
GBP12MD156N Fred.LIBOR.TwelveMonthBasedOnBritishPound 12-Month London Interbank Offered Rate (LIBOR), based on British Pound (in Percent)
GBP1MTD156N Fred.LIBOR.OneMonthBasedOnBritishPound 1-Month London Interbank Offered Rate (LIBOR), based on British Pound (in Percent)
GBP1WKD156N Fred.LIBOR.OneWeekBasedOnBritishPound 1-Week London Interbank Offered Rate (LIBOR), based on British Pound (in Percent)
GBP2MTD156N Fred.LIBOR.TwoMonthBasedOnBritishPound 2-Month London Interbank Offered Rate (LIBOR), based on British Pound (in Percent)
GBP3MTD156N Fred.LIBOR.ThreeMonthBasedOnBritishPound 3-Month London Interbank Offered Rate (LIBOR), based on British Pound (in Percent)
JPY1WKD156N Fred.LIBOR.OneWeekBasedOnJapaneseYen 1-Week London Interbank Offered Rate (LIBOR), based on Japanese Yen (in Percent)
JPY2MTD156N Fred.LIBOR.TwoMonthBasedOnJapaneseYen 2-Month London Interbank Offered Rate (LIBOR), based on Japanese Yen (in Percent)
CHF6MTD156N Fred.LIBOR.SixMonthBasedOnSwissFranc 6-Month London Interbank Offered Rate (LIBOR), based on Swiss Franc (in Percent)
CHF3MTD156N Fred.LIBOR.ThreeMonthBasedOnSwissFranc 3-Month London Interbank Offered Rate (LIBOR), based on Swiss Franc (in Percent)
USD1MTD156N Fred.LIBOR.OneMonthBasedOnUSD 1-Month London Interbank Offered Rate (LIBOR), based on U.S. Dollar (in Percent)
CHF12MD156N Fred.LIBOR.TwelveMonthBasedOnSwissFranc 12-Month London Interbank Offered Rate (LIBOR), based on Swiss Franc (in Percent)
USD12MD156N Fred.LIBOR.TwelveMonthBasedOnUSD 12-Month London Interbank Offered Rate (LIBOR), based on U.S. Dollar (in Percent)
CHF1MTD156N Fred.LIBOR.OneMonthBasedOnSwissFranc 1-Month London Interbank Offered Rate (LIBOR), based on Swiss Franc (in Percent)
CHF1WKD156N Fred.LIBOR.OneWeekBasedOnSwissFranc 1-Week London Interbank Offered Rate (LIBOR), based on Swiss Franc (in Percent)
CHF2MTD156N Fred.LIBOR.TwoMonthBasedOnSwissFranc 2-Month London Interbank Offered Rate (LIBOR), based on Swiss Franc (in Percent)
EUR12MD156N Fred.LIBOR.TwelveMonthBasedOnEuro 12-Month London Interbank Offered Rate (LIBOR), based on Euro (in Percent)
GBP6MTD156N Fred.LIBOR.SixMonthBasedOnBritishPound 6-Month London Interbank Offered Rate (LIBOR), based on British Pound (in Percent)
EUR1MTD156N Fred.LIBOR.OneMonthBasedOnEuro 1-Month London Interbank Offered Rate (LIBOR), based on Euro (in Percent)
EUR2MTD156N Fred.LIBOR.TwoMonthBasedOnEuro 2-Month London Interbank Offered Rate (LIBOR), based on Euro (in Percent)
EUR3MTD156N Fred.LIBOR.ThreeMonthBasedOnEuro 3-Month London Interbank Offered Rate (LIBOR), based on Euro (in Percent)
EUR6MTD156N Fred.LIBOR.SixMonthBasedOnEuro 6-Month London Interbank Offered Rate (LIBOR), based on Euro (in Percent)
EURONTD156N Fred.LIBOR.OvernightBasedOnEuro Overnight London Interbank Offered Rate (LIBOR), based on Euro (in Percent)
USD1WKD156N Fred.LIBOR.OneWeekBasedOnUSD 1-Week London Interbank Offered Rate (LIBOR), based on U.S. Dollar (in Percent)
USD2MTD156N Fred.LIBOR.TwoMonthBasedOnUSD 2-Month London Interbank Offered Rate (LIBOR), based on U.S. Dollar (in Percent)
USD3MTD156N Fred.LIBOR.ThreeMonthBasedOnUSD 3-Month London Interbank Offered Rate (LIBOR), based on U.S. Dollar (in Percent)
USDONTD156N Fred.LIBOR.OvernightBasedOnUSD Overnight London Interbank Offered Rate (LIBOR), based on U.S. Dollar (in Percent)
EUR1WKD156N Fred.LIBOR.OneWeekBasedOnEuro 1-Week London Interbank Offered Rate (LIBOR), based on Euro (in Percent)
GBPONTD156N Fred.LIBOR.OvernightBasedOnBritishPound Overnight London Interbank Offered Rate (LIBOR), based on British Pound (in Percent)
OECDRecessionIndicators
4BIGEURORECDM Fred.OECDRecessionIndicators.FourBigEuropeanCountriesFromPeakThroughTheTrough OECD based Recession Indicators for Four Big European Countries from the Peak through the Trough (in +1 or 0)
AUSRECDM Fred.OECDRecessionIndicators.AustraliaFromPeakThroughTheTrough OECD based Recession Indicators for Australia from the Peak through the Trough (in +1 or 0)
AUTRECDM Fred.OECDRecessionIndicators.AustriaFromPeakThroughTheTrough OECD based Recession Indicators for Austria from the Peak through the Trough (in +1 or 0)
BELRECDM Fred.OECDRecessionIndicators.BelgiumFromPeakThroughTheTrough OECD based Recession Indicators for Belgium from the Peak through the Trough (in +1 or 0)
BRARECDM Fred.OECDRecessionIndicators.BrazilFromPeakThroughTheTrough OECD based Recession Indicators for Brazil from the Peak through the Trough (in +1 or 0)
CANRECDM Fred.OECDRecessionIndicators.CanadaFromPeakThroughTheTrough OECD based Recession Indicators for Canada from the Peak through the Trough (in +1 or 0)
CHERECDM Fred.OECDRecessionIndicators.SwitzerlandFromPeakThroughTheTrough OECD based Recession Indicators for Switzerland from the Peak through the Trough (in +1 or 0)
CHLRECDM Fred.OECDRecessionIndicators.ChileFromPeakThroughTheTrough OECD based Recession Indicators for Chile from the Peak through the Trough (in +1 or 0)
CHNRECDM Fred.OECDRecessionIndicators.ChinaFromPeakThroughTheTrough OECD based Recession Indicators for China from the Peak through the Trough (in +1 or 0)
CZERECDM Fred.OECDRecessionIndicators.CzechRepublicFromPeakThroughTheTrough OECD based Recession Indicators for the Czech Republic from the Peak through the Trough (in +1 or 0)
DEURECDM Fred.OECDRecessionIndicators.GermanyFromPeakThroughTheTrough OECD based Recession Indicators for Germany from the Peak through the Trough (in +1 or 0)
DNKRECDM Fred.OECDRecessionIndicators.DenmarkFromPeakThroughTheTrough OECD based Recession Indicators for Denmark from the Peak through the Trough (in +1 or 0)
ESPRECDM Fred.OECDRecessionIndicators.SpainFromPeakThroughTheTrough OECD based Recession Indicators for Spain from the Peak through the Trough (in +1 or 0)
ESTRECDM Fred.OECDRecessionIndicators.EstoniaFromPeakThroughTheTrough OECD based Recession Indicators for Estonia from the Peak through the Trough (in +1 or 0)
EURORECDM Fred.OECDRecessionIndicators.EuroAreaFromPeakThroughTheTrough OECD based Recession Indicators for Euro Area from the Peak through the Trough (in +1 or 0)
FINRECDM Fred.OECDRecessionIndicators.FinlandFromPeakThroughTheTrough OECD based Recession Indicators for Finland from the Peak through the Trough (in +1 or 0)
FRARECDM Fred.OECDRecessionIndicators.FranceFromPeakThroughTheTrough OECD based Recession Indicators for France from the Peak through the Trough (in +1 or 0)
GBRRECDM Fred.OECDRecessionIndicators.UnitedKingdomFromPeakThroughTheTrough OECD based Recession Indicators for the United Kingdom from the Peak through the Trough (in +1 or 0)
GRCRECDM Fred.OECDRecessionIndicators.GreeceFromPeakThroughTheTrough OECD based Recession Indicators for Greece from the Peak through the Trough (in +1 or 0)
HUNRECDM Fred.OECDRecessionIndicators.HungaryFromPeakThroughTheTrough OECD based Recession Indicators for Hungary from the Peak through the Trough (in +1 or 0)
IDNRECDM Fred.OECDRecessionIndicators.IndonesiaFromPeakThroughTheTrough OECD based Recession Indicators for Indonesia from the Peak through the Trough (in +1 or 0)
INDRECDM Fred.OECDRecessionIndicators.IndiaFromPeakThroughTheTrough OECD based Recession Indicators for India from the Peak through the Trough (in +1 or 0)
IRLRECDM Fred.OECDRecessionIndicators.IrelandFromPeakThroughTheTrough OECD based Recession Indicators for Ireland from the Peak through the Trough (in +1 or 0)
ISRRECDM Fred.OECDRecessionIndicators.IsraelFromPeakThroughTheTrough OECD based Recession Indicators for Israel from the Peak through the Trough (in +1 or 0)
ITARECDM Fred.OECDRecessionIndicators.ItalyFromPeakThroughTheTrough OECD based Recession Indicators for Italy from the Peak through the Trough (in +1 or 0)
JPNRECDM Fred.OECDRecessionIndicators.JapanFromPeakThroughTheTrough OECD based Recession Indicators for Japan from the Peak through the Trough (in +1 or 0)
KORRECDM Fred.OECDRecessionIndicators.KoreaFromPeakThroughTheTrough OECD based Recession Indicators for Korea from the Peak through the Trough (in +1 or 0)
LUXRECDM Fred.OECDRecessionIndicators.LuxembourgFromPeakThroughTheTrough OECD based Recession Indicators for Luxembourg from the Peak through the Trough (in +1 or 0)
MAJOR5ASIARECDM Fred.OECDRecessionIndicators.MajorFiveAsiaFromPeakThroughTheTrough OECD based Recession Indicators for Major 5 Asia from the Peak through the Trough (in +1 or 0)
MEXRECDM Fred.OECDRecessionIndicators.MexicoFromPeakThroughTheTrough OECD based Recession Indicators for Mexico from the Peak through the Trough (in +1 or 0)
MSCRECDM Fred.OECDRecessionIndicators.MajorSevenCountriesFromPeakThroughTheTrough OECD based Recession Indicators for Major Seven Countries from the Peak through the Trough (in +1 or 0)
NAFTARECDM Fred.OECDRecessionIndicators.NAFTAAreaFromPeakThroughTheTrough OECD based Recession Indicators for NAFTA Area from the Peak through the Trough (in +1 or 0)
NDLRECDM Fred.OECDRecessionIndicators.NetherlandsFromPeakThroughTheTrough OECD based Recession Indicators for Netherlands from the Peak through the Trough (in +1 or 0)
NORRECDM Fred.OECDRecessionIndicators.NorwayFromPeakThroughTheTrough OECD based Recession Indicators for Norway from the Peak through the Trough (in +1 or 0)
NZLRECDM Fred.OECDRecessionIndicators.NewZealandFromPeakThroughTheTrough OECD based Recession Indicators for New Zealand from the Peak through the Trough (in +1 or 0)
OECDEUROPERECDM Fred.OECDRecessionIndicators.OECDEuropeFromPeakThroughTheTrough OECD based Recession Indicators for OECD Europe from the Peak through the Trough (in +1 or 0)
OECDNMERECDM Fred.OECDRecessionIndicators.OECDAndNonmemberEconomiesFromPeakThroughTheTrough OECD based Recession Indicators for OECD and Non-member Economies from the Peak through the Trough (in +1 or 0)
OECDRECDM Fred.OECDRecessionIndicators.OECDTotalAreaFromPeakThroughTheTrough OECD based Recession Indicators for the OECD Total Area from the Peak through the Trough (in +1 or 0)
POLRECDM Fred.OECDRecessionIndicators.PolandFromPeakThroughTheTrough OECD based Recession Indicators for Poland from the Peak through the Trough (in +1 or 0)
PRTRECDM Fred.OECDRecessionIndicators.PortugalFromPeakThroughTheTrough OECD based Recession Indicators for Portugal from the Peak through the Trough (in +1 or 0)
RUSRECDM Fred.OECDRecessionIndicators.RussianFederationFromPeakThroughTheTrough OECD based Recession Indicators for Russian Federation from the Peak through the Trough (in +1 or 0)
SVKRECDM Fred.OECDRecessionIndicators.SlovakRepublicFromPeakThroughTheTrough OECD based Recession Indicators for the Slovak Republic from the Peak through the Trough (in +1 or 0)
SVNRECDM Fred.OECDRecessionIndicators.SloveniaFromPeakThroughTheTrough OECD based Recession Indicators for Slovenia from the Peak through the Trough (in +1 or 0)
SWERECDM Fred.OECDRecessionIndicators.SwedenFromPeakThroughTheTrough OECD based Recession Indicators for Sweden from the Peak through the Trough (in +1 or 0)
TURRECDM Fred.OECDRecessionIndicators.TurkeyFromPeakThroughTheTrough OECD based Recession Indicators for Turkey from the Peak through the Trough (in +1 or 0)
USARECDM Fred.OECDRecessionIndicators.UnitedStatesFromPeakThroughTheTrough OECD based Recession Indicators for the United States from the Peak through the Trough (in +1 or 0)
ZAFRECDM Fred.OECDRecessionIndicators.SouthAfricaFromPeakThroughTheTrough OECD based Recession Indicators for South Africa from the Peak through the Trough (in +1 or 0)
4BIGEURORECD Fred.OECDRecessionIndicators.FourBigEuropeanCountriesFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Four Big European Countries from the Period following the Peak through the Trough (in +1 or 0)
AUSRECD Fred.OECDRecessionIndicators.AustraliaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Australia from the Period following the Peak through the Trough (in +1 or 0)
AUTRECD Fred.OECDRecessionIndicators.AustriaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Austria from the Period following the Peak through the Trough (in +1 or 0)
BELRECD Fred.OECDRecessionIndicators.BelgiumFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Belgium from the Period following the Peak through the Trough (in +1 or 0)
BRARECD Fred.OECDRecessionIndicators.BrazilFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Brazil from the Period following the Peak through the Trough (in +1 or 0)
CANRECD Fred.OECDRecessionIndicators.CanadaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Canada from the Period following the Peak through the Trough (in +1 or 0)
CHERECD Fred.OECDRecessionIndicators.SwitzerlandFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Switzerland from the Period following the Peak through the Trough (in +1 or 0)
CHLRECD Fred.OECDRecessionIndicators.ChileFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Chile from the Period following the Peak through the Trough (in +1 or 0)
CHNRECD Fred.OECDRecessionIndicators.ChinaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for China from the Period following the Peak through the Trough (in +1 or 0)
CZERECD Fred.OECDRecessionIndicators.CzechRepublicFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for the Czech Republic from the Period following the Peak through the Trough (in +1 or 0)
DEURECD Fred.OECDRecessionIndicators.GermanyFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Germany from the Period following the Peak through the Trough (in +1 or 0)
DNKRECD Fred.OECDRecessionIndicators.DenmarkFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Denmark from the Period following the Peak through the Trough (in +1 or 0)
ESPRECD Fred.OECDRecessionIndicators.SpainFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Spain from the Period following the Peak through the Trough (in +1 or 0)
ESTRECD Fred.OECDRecessionIndicators.EstoniaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Estonia from the Period following the Peak through the Trough (in +1 or 0)
EURORECD Fred.OECDRecessionIndicators.EuroAreaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Euro Area from the Period following the Peak through the Trough (in +1 or 0)
FINRECD Fred.OECDRecessionIndicators.FinlandFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Finland from the Period following the Peak through the Trough (in +1 or 0)
FRARECD Fred.OECDRecessionIndicators.FranceFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for France from the Period following the Peak through the Trough (in +1 or 0)
GBRRECD Fred.OECDRecessionIndicators.UnitedKingdomFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for the United Kingdom from the Period following the Peak through the Trough (in +1 or 0)
GRCRECD Fred.OECDRecessionIndicators.GreeceFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Greece from the Period following the Peak through the Trough (in +1 or 0)
HUNRECD Fred.OECDRecessionIndicators.HungaryFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Hungary from the Period following the Peak through the Trough (in +1 or 0)
IDNRECD Fred.OECDRecessionIndicators.IndonesiaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Indonesia from the Period following the Peak through the Trough (in +1 or 0)
INDRECD Fred.OECDRecessionIndicators.IndiaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for India from the Period following the Peak through the Trough (in +1 or 0)
IRLRECD Fred.OECDRecessionIndicators.IrelandFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Ireland from the Period following the Peak through the Trough (in +1 or 0)
ISRRECD Fred.OECDRecessionIndicators.IsraelFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Israel from the Period following the Peak through the Trough (in +1 or 0)
ITARECD Fred.OECDRecessionIndicators.ItalyFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Italy from the Period following the Peak through the Trough (in +1 or 0)
JPNRECD Fred.OECDRecessionIndicators.JapanFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Japan from the Period following the Peak through the Trough (in +1 or 0)
KORRECD Fred.OECDRecessionIndicators.KoreaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Korea from the Period following the Peak through the Trough (in +1 or 0)
LUXRECD Fred.OECDRecessionIndicators.LuxembourgFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Luxembourg from the Period following the Peak through the Trough (in +1 or 0)
MAJOR5ASIARECD Fred.OECDRecessionIndicators.MajorFiveAsiaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Major 5 Asia from the Period following the Peak through the Trough (in +1 or 0)
MEXRECD Fred.OECDRecessionIndicators.MexicoFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Mexico from the Period following the Peak through the Trough (in +1 or 0)
MSCRECD Fred.OECDRecessionIndicators.MajorSevenCountriesFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Major Seven Countries from the Period following the Peak through the Trough (in +1 or 0)
NAFTARECD Fred.OECDRecessionIndicators.NAFTAAreaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for NAFTA Area from the Period following the Peak through the Trough (in +1 or 0)
NDLRECD Fred.OECDRecessionIndicators.NetherlandsFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Netherlands from the Period following the Peak through the Trough (in +1 or 0)
NORRECD Fred.OECDRecessionIndicators.NorwayFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Norway from the Period following the Peak through the Trough (in +1 or 0)
NZLRECD Fred.OECDRecessionIndicators.NewZealandFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for New Zealand from the Period following the Peak through the Trough (in +1 or 0)
OECDEUROPERECD Fred.OECDRecessionIndicators.OECDEuropeFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for OECD Europe from the Period following the Peak through the Trough (in +1 or 0)
OECDNMERECD Fred.OECDRecessionIndicators.OECDandNonmemberEconomiesFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for OECD and Non-member Economies from the Period following the Peak through the Trough (in +1 or 0)
OECDRECD Fred.OECDRecessionIndicators.OECDTotalAreaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for the OECD Total Area from the Period following the Peak through the Trough (in +1 or 0)
POLRECD Fred.OECDRecessionIndicators.PolandFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Poland from the Period following the Peak through the Trough (in +1 or 0)
PRTRECD Fred.OECDRecessionIndicators.PortugalFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Portugal from the Period following the Peak through the Trough (in +1 or 0)
RUSRECD Fred.OECDRecessionIndicators.RussianFederationFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Russian Federation from the Period following the Peak through the Trough (in +1 or 0)
SVKRECD Fred.OECDRecessionIndicators.SlovakRepublicFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for the Slovak Republic from the Period following the Peak through the Trough (in +1 or 0)
SVNRECD Fred.OECDRecessionIndicators.SloveniaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Slovenia from the Period following the Peak through the Trough (in +1 or 0)
SWERECD Fred.OECDRecessionIndicators.SwedenFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Sweden from the Period following the Peak through the Trough (in +1 or 0)
TURRECD Fred.OECDRecessionIndicators.TurkeyFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for Turkey from the Period following the Peak through the Trough (in +1 or 0)
USARECD Fred.OECDRecessionIndicators.UnitedStatesFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for the United States from the Period following the Peak through the Trough (in +1 or 0)
ZAFRECD Fred.OECDRecessionIndicators.SouthAfricaFromPeriodFollowingPeakThroughTheTrough OECD based Recession Indicators for South Africa from the Period following the Peak through the Trough (in +1 or 0)
4BIGEURORECDP Fred.OECDRecessionIndicators.FourBigEuropeanCountriesFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Four Big European Countries from the Peak through the Period preceding the Trough (in +1 or 0)
AUSRECDP Fred.OECDRecessionIndicators.AustraliaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Australia from the Peak through the Period preceding the Trough (in +1 or 0)
AUTRECDP Fred.OECDRecessionIndicators.AustriaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Austria from the Peak through the Period preceding the Trough (in +1 or 0)
BELRECDP Fred.OECDRecessionIndicators.BelgiumFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Belgium from the Peak through the Period preceding the Trough (in +1 or 0)
BRARECDP Fred.OECDRecessionIndicators.BrazilFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Brazil from the Peak through the Period preceding the Trough (in +1 or 0)
CANRECDP Fred.OECDRecessionIndicators.CanadaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Canada from the Peak through the Period preceding the Trough (in +1 or 0)
CHERECDP Fred.OECDRecessionIndicators.SwitzerlandFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Switzerland from the Peak through the Period preceding the Trough (in +1 or 0)
CHLRECDP Fred.OECDRecessionIndicators.ChileFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Chile from the Peak through the Period preceding the Trough (in +1 or 0)
CHNRECDP Fred.OECDRecessionIndicators.ChinaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for China from the Peak through the Period preceding the Trough (in +1 or 0)
CZERECDP Fred.OECDRecessionIndicators.CzechRepublicFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for the Czech Republic from the Peak through the Period preceding the Trough (in +1 or 0)
DEURECDP Fred.OECDRecessionIndicators.GermanyFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Germany from the Peak through the Period preceding the Trough (in +1 or 0)
DNKRECDP Fred.OECDRecessionIndicators.DenmarkFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Denmark from the Peak through the Period preceding the Trough (in +1 or 0)
ESPRECDP Fred.OECDRecessionIndicators.SpainFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Spain from the Peak through the Period preceding the Trough (in +1 or 0)
ESTRECDP Fred.OECDRecessionIndicators.EstoniaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Estonia from the Peak through the Period preceding the Trough (in +1 or 0)
EURORECDP Fred.OECDRecessionIndicators.EuroAreaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Euro Area from the Peak through the Period preceding the Trough (in +1 or 0)
FINRECDP Fred.OECDRecessionIndicators.FinlandFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Finland from the Peak through the Period preceding the Trough (in +1 or 0)
FRARECDP Fred.OECDRecessionIndicators.FranceFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for France from the Peak through the Period preceding the Trough (in +1 or 0)
GBRRECDP Fred.OECDRecessionIndicators.UnitedKingdomFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for the United Kingdom from the Peak through the Period preceding the Trough (in +1 or 0)
GRCRECDP Fred.OECDRecessionIndicators.GreeceFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Greece from the Peak through the Period preceding the Trough (in +1 or 0)
HUNRECDP Fred.OECDRecessionIndicators.HungaryFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Hungary from the Peak through the Period preceding the Trough (in +1 or 0)
IDNRECDP Fred.OECDRecessionIndicators.IndonesiaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Indonesia from the Peak through the Period preceding the Trough (in +1 or 0)
INDRECDP Fred.OECDRecessionIndicators.IndiaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for India from the Peak through the Period preceding the Trough (in +1 or 0)
IRLRECDP Fred.OECDRecessionIndicators.IrelandFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Ireland from the Peak through the Period preceding the Trough (in +1 or 0)
ISRRECDP Fred.OECDRecessionIndicators.IsraelFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Israel from the Peak through the Period preceding the Trough (in +1 or 0)
ITARECDP Fred.OECDRecessionIndicators.ItalyFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Italy from the Peak through the Period preceding the Trough (in +1 or 0)
JPNRECDP Fred.OECDRecessionIndicators.JapanFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Japan from the Peak through the Period preceding the Trough (in +1 or 0)
KORRECDP Fred.OECDRecessionIndicators.KoreaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Korea from the Peak through the Period preceding the Trough (in +1 or 0)
LUXRECDP Fred.OECDRecessionIndicators.LuxembourgFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Luxembourg from the Peak through the Period preceding the Trough (in +1 or 0)
MAJOR5ASIARECDP Fred.OECDRecessionIndicators.MajorFiveAsiaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Major 5 Asia from the Peak through the Period preceding the Trough (in +1 or 0)
MEXRECDP Fred.OECDRecessionIndicators.MexicoFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Mexico from the Peak through the Period preceding the Trough (in +1 or 0)
MSCRECDP Fred.OECDRecessionIndicators.MajorSevenCountriesFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Major Seven Countries from the Peak through the Period preceding the Trough (in +1 or 0)
NAFTARECDP Fred.OECDRecessionIndicators.NAFTAAreaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for NAFTA Area from the Peak through the Period preceding the Trough (in +1 or 0)
NDLRECDP Fred.OECDRecessionIndicators.NetherlandsFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Netherlands from the Peak through the Period preceding the Trough (in +1 or 0)
NORRECDP Fred.OECDRecessionIndicators.NorwayFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Norway from the Peak through the Period preceding the Trough (in +1 or 0)
NZLRECDP Fred.OECDRecessionIndicators.NewZealandFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for New Zealand from the Peak through the Period preceding the Trough (in +1 or 0)
OECDEUROPERECDP Fred.OECDRecessionIndicators.OECDEuropeFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for OECD Europe from the Peak through the Period preceding the Trough (in +1 or 0)
OECDNMERECDP Fred.OECDRecessionIndicators.OECDandNonmemberEconomiesFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for OECD and Non-member Economies from the Peak through the Period preceding the Trough (in +1 or 0)
OECDRECDP Fred.OECDRecessionIndicators.OECDTotalAreaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for the OECD Total Area from the Peak through the Period preceding the Trough (in +1 or 0)
POLRECDP Fred.OECDRecessionIndicators.PolandFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Poland from the Peak through the Period preceding the Trough (in +1 or 0)
PRTRECDP Fred.OECDRecessionIndicators.PortugalFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Portugal from the Peak through the Period preceding the Trough (in +1 or 0)
RUSRECDP Fred.OECDRecessionIndicators.RussianFederationFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Russian Federation from the Peak through the Period preceding the Trough (in +1 or 0)
SVKRECDP Fred.OECDRecessionIndicators.SlovakRepublicFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for the Slovak Republic from the Peak through the Period preceding the Trough (in +1 or 0)
SVNRECDP Fred.OECDRecessionIndicators.SloveniaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Slovenia from the Peak through the Period preceding the Trough (in +1 or 0)
SWERECDP Fred.OECDRecessionIndicators.SwedenFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Sweden from the Peak through the Period preceding the Trough (in +1 or 0)
TURRECDP Fred.OECDRecessionIndicators.TurkeyFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for Turkey from the Peak through the Period preceding the Trough (in +1 or 0)
USARECDP Fred.OECDRecessionIndicators.UnitedStatesFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for the United States from the Peak through the Period preceding the Trough (in +1 or 0)
ZAFRECDP Fred.OECDRecessionIndicators.SouthAfricaFromPeakThroughThePeriodPrecedingtheTrough OECD based Recession Indicators for South Africa from the Peak through the Period preceding the Trough (in +1 or 0)
TradeWeightedIndexes
DTWEXM Fred.TradeWeightedIndexes.MajorCurrenciesGoods Trade Weighted U.S. Dollar Index: Major Currencies, Goods (in Index Mar 1973=100)
DTWEXO Fred.TradeWeightedIndexes.OtherImportantTradingPartnersGoods Trade Weighted U.S. Dollar Index: Other Important Trading Partners, Goods (in Index Jan 1997=100)
DTWEXB Fred.TradeWeightedIndexes.BroadGoods Trade Weighted U.S. Dollar Index: Broad, Goods (in Index Jan 1997=100)
DTWEXAFEGS Fred.TradeWeightedIndexes.AdvancedForeignEconomiesGoodsAndServices Trade Weighted U.S. Dollar Index: Advanced Foreign Economies, Goods and Services (in Index Jan 2006=100)
DTWEXBGS Fred.TradeWeightedIndexes.BroadGoodsAndServices Trade Weighted U.S. Dollar Index: Broad, Goods and Services (in Index Jan 2006=100)
DTWEXEMEGS Fred.TradeWeightedIndexes.EmergingMarketsEconomiesGoodsAndServices Trade Weighted U.S. Dollar Index: Emerging Markets Economies, Goods and Services (in Index Jan 2006=100)
Wilshire
WILLSMLCAPVALPR Fred.Wilshire.USSmallCapValuePrice Wilshire US Small-Cap Value Price Index (in Index)
WILL2500PR Fred.Wilshire.Price2500 Wilshire 2500 Price Index (in Index)
WILL4500PR Fred.Wilshire.Price4500 Wilshire 4500 Price Index (in Index)
WILL2500PRVAL Fred.Wilshire.ValuePrice2500 Wilshire 2500 Value Price Index (in Index)
WILL2500PRGR Fred.Wilshire.GrowthPrice2500 Wilshire 2500 Growth Price Index (in Index)
WILLSMLCAPPR Fred.Wilshire.USSmallCapPrice Wilshire US Small-Cap Price Index (in Index)
WILL5000PR Fred.Wilshire.Price5000 Wilshire 5000 Price Index (in Index)
WILLSMLCAPGRPR Fred.Wilshire.USSmallCapGrowthPrice Wilshire US Small-Cap Growth Price Index (in Index)
WILLMIDCAPVALPR Fred.Wilshire.USMidCapValuePrice Wilshire US Mid-Cap Value Price Index (in Index)
WILLRESIPR Fred.Wilshire.USRealEstateSecuritiesPrice Wilshire US Real Estate Securities Price Index (Wilshire US RESI) (in Index)
WILLLRGCAPPR Fred.Wilshire.USLargeCapPrice Wilshire US Large-Cap Price Index (in Index)
WILLMIDCAPPR Fred.Wilshire.USMidCapPrice Wilshire US Mid-Cap Price Index (in Index)
WILLMIDCAPGRPR Fred.Wilshire.USMidCapGrowthPrice Wilshire US Mid-Cap Growth Price Index (in Index)
WILLMICROCAPPR Fred.Wilshire.USMicroCapPrice Wilshire US Micro-Cap Price Index (in Index)
WILLREITPR Fred.Wilshire.USRealEstateInvestmentTrustPrice Wilshire US Real Estate Investment Trust Price Index (Wilshire US REIT) (in Index)
WILLLRGCAPVALPR Fred.Wilshire.USLargeCapValuePrice Wilshire US Large-Cap Value Price Index (in Index)
WILLLRGCAPGRPR Fred.Wilshire.USLargeCapGrowthPrice Wilshire US Large-Cap Growth Price Index (in Index)
WILL5000PRFC Fred.Wilshire.FullCapPrice5000 Wilshire 5000 Full Cap Price Index (in Index)
WILLMIDCAPVAL Fred.Wilshire.USMidCapValue Wilshire US Mid-Cap Value Total Market Index (in Index)
WILLMIDCAPGR Fred.Wilshire.USMidCapGrowth Wilshire US Mid-Cap Growth Total Market Index (in Index)
WILLMIDCAP Fred.Wilshire.USMidCap Wilshire US Mid-Cap Total Market Index (in Index)
WILLRESIND Fred.Wilshire.USRealEstateSecurities Wilshire US Real Estate Securities Total Market Index (Wilshire US RESI) (in Index)
WILL4500IND Fred.Wilshire.Index4500 Wilshire 4500 Total Market Index (in Index)
WILL5000IND Fred.Wilshire.Index5000 Wilshire 5000 Total Market Index (in Index)
WILLLRGCAPGR Fred.Wilshire.USLargeCapGrowth Wilshire US Large-Cap Growth Total Market Index (in Index)
WILLMICROCAP Fred.Wilshire.USMicroCap Wilshire US Micro-Cap Total Market Index (in Index)
WILL2500INDVAL Fred.Wilshire.Value2500 Wilshire 2500 Value Total Market Index (in Index)
WILLSMLCAPGR Fred.Wilshire.USSmallCapGrowth Wilshire US Small-Cap Growth Total Market Index (in Index)
WILLSMLCAPVAL Fred.Wilshire.USSmallCapValue Wilshire US Small-Cap Value Total Market Index (in Index)
WILLLRGCAPVAL Fred.Wilshire.USLargeCapValue Wilshire US Large-Cap Value Total Market Index (in Index)
WILLREITIND Fred.Wilshire.USRealEstateInvestmentTrust Wilshire US Real Estate Investment Trust Total Market Index (Wilshire US REIT) (in Index)
WILL2500IND Fred.Wilshire.Index2500 Wilshire 2500 Total Market Index (in Index)
WILLSMLCAP Fred.Wilshire.USSmallCap Wilshire US Small-Cap Total Market Index (in Index)
WILLLRGCAP Fred.Wilshire.USLargeCap Wilshire US Large-Cap Total Market Index (in Index)
WILL2500INDGR Fred.Wilshire.Growth2500 Wilshire 2500 Growth Total Market Index (in Index)
WILL5000INDFC Fred.Wilshire.TotalMarketFullCap5000 Wilshire 5000 Total Market Full Cap Index (in Index)

Requesting Data

To add FRED data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class FredAlternativeDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2003, 1, 1)
        self.set_end_date(2019, 10, 11)
        self.set_cash(100000)

        self.dataset_symbol = self.add_data(Fred, Fred.oecd_recession_indicators.united_states_from_peak_through_the_trough, Resolution.DAILY).symbol
namespace QuantConnect
{
    public class FredAlternativeDataAlgorithm : QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2003, 1, 1);
            SetEndDate(2019, 10, 11);
            SetCash(100000);
            
            _datasetSymbol = AddData<Fred>(Fred.OECDRecessionIndicators.UnitedStatesFromPeakThroughTheTrough, Resolution.Daily).Symbol;
        }
    }
}

Accessing Data

To get the current FRED data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} value at {slice.time}: {data_point.value}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} value at {slice.Time}: {dataPoint.Value}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(Fred).items():
        self.log(f"{dataset_symbol} value at {slice.time}: {data_point.value}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<Fred>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} value at {slice.Time}: {dataPoint.Value}");
    }
}

Historical Data

To get historical FRED data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[Fred](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<Fred>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove your subscription to FRED data, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The FRED dataset enables you to accurately design strategies utilizing macroeconomic indicators. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Federal Reserve Bank of St Louis

Federal Reserve Bank of St Louis

US Interest Rate

Introduction

The US Interest Rate dataset provides the primary credit rate from the Federal Open Market Committee (FOMC). The data starts in January 2003 and is updated on a daily frequency. This dataset is created using information from the FOMC meetings.

For more information about the US Interest Rate dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

The Federal Reserve Bank of St. Louis, often referred to as the St. Louis Fed, is one of the 12 regional banks that make up the United States Federal Reserve System. It is responsible for the Eighth Federal Reserve District, which includes the states of Arkansas, Illinois, Indiana, Kentucky, Mississippi, Missouri, and Tennessee, as well as portions of eastern Kansas and southern Illinois.

The St. Louis Fed, like other regional banks, participates in the formulation and implementation of monetary policy in the United States. It contributes to the Federal Open Market Committee (FOMC) meetings, where key decisions regarding interest rates and other monetary policy tools are made.

Getting Started

The following snippet demonstrates how to access data from the US Interest Rate dataset:

interest_rate = self.risk_free_interest_rate_model.get_interest_rate(self.time)
var interestRate = RiskFreeInterestRateModel.GetInterestRate(Time);

To find the average interest rate between two dates, call the GetRiskFreeRate method.

avg_risk_free_rate = RiskFreeInterestRateModelExtensions.get_risk_free_rate(
    self.risk_free_interest_rate_model, 
    self.time-timedelta(365), self.time
)
var avgRiskFreeRate = RiskFreeInterestRateModel.GetRiskFreeRate(Time.AddDays(-365), Time);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2003
Data Density Sparse
Resolution Daily
Timezone New York

Example Applications

The US Interest Rate dataset provides an important economic indicator. Examples include the following applications:

For more example algorithms, see Examples .

Requesting Data

You don't need any special code to request US Interest Rate data. QCAlgorithm automatically subscribes to the data by setting its default risk free interest rate model .

Accessing Data

To get the current US Interest Rate data, call the GetInterestRate get_interest_rate method of the RiskFreeInterestRateModel object with the current time.

interest_rate = self.risk_free_interest_rate_model.get_interest_rate(self.time)
var interestRate = RiskFreeInterestRateModel.GetInterestRate(Time);

Historical Data

To get the average risk free interest rate for a window of time, call the GetRiskFreeRate get_risk_free_rate method with the start date and end date.

risk_free_rate = RiskFreeInterestRateModelExtensions.get_risk_free_rate(
    self.risk_free_interest_rate_model, 
    self.time-timedelta(365), self.time
)
var riskFreeRate = RiskFreeInterestRateModel.GetRiskFreeRate(Time.AddDays(-365), Time);

To get the average risk free interest rate for a set of dates, call the GetAverageRiskFreeRate get_average_risk_free_rate method with the list of dates.

risk_free_rate = RiskFreeInterestRateModelExtensions.get_average_risk_free_rate(
    self.risk_free_interest_rate_model, 
    [self.time, self.time-timedelta(180), self.time-timedelta(365)]
)
var riskFreeRate = RiskFreeInterestRateModel.GetAverageRiskFreeRate(
    new [] {Time, Time.AddDays(-180), Time.AddDays(-365)}  
);

Example Applications

The US Interest Rate dataset provides an important economic indicator. Examples include the following applications:

For more example algorithms, see Examples .

 

Datasets

Kavout

Kavout was created by ex-Googlers and the founding team used to work at Google, Microsoft, Baidu, and financial firms with a proven track record of building many mission-critical machine learning systems where billions of data points were processed in real-time to predict the best outcome for core search ranking, ads monetization, recommendations, and trading platforms.

Their mission is to build machine investing solutions to find alpha with adaptive learning algorithms and to create an edge by assimilating vast quantities of complex data through the latest AI and Machine Learning methods to generate signals to uncover hidden, dynamic, and nonlinear patterns in the financial markets.

 

Kavout

Composite Factor Bundle

Introduction

The Composite Factor Bundle dataset by Kavout provides ensemble scores for popular market factors. Kavout signals are machine-learning enhanced scores that capture the returns of systematic factors such as quality, value, momentum, growth, and low volatility. There are many different anomalies discovered by researchers and practitioners across these factor categories and there is no good common definition of each style across the literature. Kavout creates an ensemble score for each style that gauges the different factors considered in the literature and industry practice.

In this data set, you will find Kavout's proprietary signals for quality, value, momentum, growth, and low volatility, which have been adopted by some of the multi-billion dollar quant funds in New York and London. Each signal is generated by an ensemble model consisting of inputs from hundreds of anomalies. The data is generated on a daily basis and covers all the stocks traded in US major markets such as NYSE and Nasdaq since 2003. You could leverage this abundant set of signals to construct and backtest your strategies.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Composite Factor Bundle dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Kavout was created by ex-Googlers and the founding team used to work at Google, Microsoft, Baidu, and financial firms with a proven track record of building many mission-critical machine learning systems where billions of data points were processed in real-time to predict the best outcome for core search ranking, ads monetization, recommendations, and trading platforms.

Their mission is to build machine investing solutions to find alpha with adaptive learning algorithms and to create an edge by assimilating vast quantities of complex data through the latest AI and Machine Learning methods to generate signals to uncover hidden, dynamic, and nonlinear patterns in the financial markets.

Getting Started

The following snippet demonstrates how to request data from the Composite Factor Bundle dataset:

from QuantConnect.DataSource import *

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(KavoutCompositeFactorBundle, self.aapl).symbol
using QuantConnect.DataSource;

_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<KavoutCompositeFactorBundle>(_symbol).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2003
Asset Coverage 8,000 US Equities
Data Density Regular
Resolution Daily
Timezone UTC

Example Applications

The Composite Factor Bundle dataset enables you to access the performance of 5 different factors in order to engineer strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Composite Factor Bundle dataset provides KavoutCompositeFactorBundle objects, which have the following attributes:

Requesting Data

To add Composite Factor Bundle data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class KavoutCompositeFactorBundleAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(KavoutCompositeFactorBundle, self.aapl).symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class KavoutCompositeFactorBundleAlgorithm: QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);

            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol = AddData<KavoutCompositeFactorBundle>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Composite Factor Bundle data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} momentum at {slice.time}: {data_point.momentum}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} momentum at {slice.Time}: {dataPoint.Momentum}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(KavoutCompositeFactorBundle).items():
        self.log(f"{dataset_symbol} momentum at {slice.time}: {data_point.momentum}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<KavoutCompositeFactorBundle>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} momentum at {slice.Time}: {dataPoint.Momentum}");
    }
}

Historical Data

To get historical Composite Factor Bundle data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[KavoutCompositeFactorBundle](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<KavoutCompositeFactorBundle>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to Composite Factor Bundle data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Composite Factor Bundle dataset enables you to access the performance of 5 different factors in order to engineer strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Nasdaq

" Nasdaq " was initially an acronym for the National Association of Securities Dealers Automated Quotations. It was founded in 1971 by the National Association of Securities Dealers (NASD), now known as the Financial Industry Regulatory Authority ( FINRA ), with the goal to provide financial services and operate stock exchanges.

On Dec. 4th, 2018, Nasdaq announced it had acquired Quandl, Inc. , a leading provider of alternative and core financial data. Quandl was founded by Tammer Kamel in 2012, with goal of making it easy for anyone to find and use high-quality data effectively in their professional decision-making. In 2021, Quandl was replaced by Nasdaq Data Link .

 

Nasdaq

Data Link

Introduction

The Data Link dataset by Nasdaq, previously known as Quandl, is a collection of alternative data sets. It has indexed millions of time-series datasets from over 400 sources, which start in different years. This dataset is delivered on several frequencies, but the free data sets have often a daily frequency.

For more information about the Data Link dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

" Nasdaq " was initially an acronym for the National Association of Securities Dealers Automated Quotations. It was founded in 1971 by the National Association of Securities Dealers (NASD), now known as the Financial Industry Regulatory Authority ( FINRA ), with the goal to provide financial services and operate stock exchanges.

On Dec. 4th, 2018, Nasdaq announced it had acquired Quandl, Inc. , a leading provider of alternative and core financial data. Quandl was founded by Tammer Kamel in 2012, with goal of making it easy for anyone to find and use high-quality data effectively in their professional decision-making. In 2021, Quandl was replaced by Nasdaq Data Link .

Getting Started

The following snippet demonstrates how to request data from the Data Link dataset:

from QuantConnect.DataSource import *

# For premium datasets, provide your API Key
# NasdaqDataLink.set_auth_pre(self.get_parameter("nasdaq-data-link-api-key"))

self.pe_ratio_symbol = self.add_data(NasdaqDataLink, "MULTPL/SP500_PE_RATIO_MONTH", Resolution.DAILY).symbol
# This dataset has one data column ("Value")

self.position_change_symbol = self.add_data(NasdaqCustomColumns, "CFTC/066393_FO_L_CHG", Resolution.DAILY).symbol
# This dataset has multiple data columns. Create a subclass to set the default value column.

class NasdaqCustomColumns(NasdaqDataLink):
    def __init__(self) -> None:
        # Select the column "open interest - change".
        self.value_column_name = "open interest - change"
using QuantConnect.DataSource;

// For premium datasets, provide your API Key
// NasdaqDataLink.SetAuthCode(GetParameter("nasdaq-data-link-api-key"));

_peRatioSymbol = AddData<NasdaqDataLink>("MULTPL/SP500_PE_RATIO_MONTH", Resolution.Daily).Symbol;
// This dataset has one data column ("Value")

_positionChangeSymbol = AddData<NasdaqCustomColumns>("CFTC/066393_FO_L_CHG", Resolution.Daily).Symbol;
// This dataset has multiple data columns. Create a subclass to set the default value column.

public class NasdaqCustomColumns : NasdaqDataLink
{
    // Select the column "open interest - change"
    public NasdaqCustomColumns() : base(valueColumnName: "open interest - change") { }
}

Our Nasdaq Data Link integration supports any dataset from Nasdaq that has a URL starting with data.nasdaq.com/data/ . To import a dataset from Data Link, you need to get the dataset code. Follow these steps to get the dataset code:

  1. Open the Data Link catalog .
  2. (Optional) Use the filters on the left side bar to narrow down the catalog results.
  3. Click one of the data products.
  4. On the data product page, click one of the table names.
  5. In the top-right corner of the dataset page, copy the Nasdaq Data Link Code.

Data Summary

The data summary depends on the specific Data Link dataset you use. Follow these steps to view the data summary of a dataset:

  1. Open the Data Link catalog .
  2. Click one of the data products.
  3. On the data product page, click one of the table names.
  4. View the data frequency and description in the left sidebar.
  5. Above the chart, click Table to view the start date, end date, and data point attributes.

Backward Compatibility

QuantConnect/LEAN has supported Quandl since 2015. On January, 12, 2022, we moved the implementation from the LEAN GitHub repository to the Lean.DataSource.NasdaqDataLink GitHub repository . Through this transition, we maintained backward compatibility. All of the preceding code snippets work if you replace NasdaqDataLink with Quandl .

Example Applications

The Nasdaq Data Link sources allow you to explore different kinds of data in their database to develop trading strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Requesting Data

To add Data Link data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm. If there is more than one value column in the Data Link dataset, to set the Value property of the data objects, create a sublcass of the NasdaqDataLink class and set its ValueColumnName value_column_name property to the column name.

class NasdaqDataLinkDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2022, 1, 1)
        self.set_end_date(2022, 7, 1)
        self.set_cash(100000)

        # For premium datasets, provide your API Key
        # NasdaqDataLink.set_auth_pre(self.get_parameter("nasdaq-data-link-api-key"))

        self.pe_ratio_symbol = self.add_data(NasdaqDataLink, "MULTPL/SP500_PE_RATIO_MONTH", Resolution.DAILY).symbol
        # This dataset has one data column ("Value")
        # Source : https://data.nasdaq.com/data/MULTPL/SP500_PE_RATIO_MONTH-sp-500-pe-ratio-by-month

        self.position_change_symbol = self.add_data(NasdaqCustomColumns, "CFTC/066393_FO_L_CHG", Resolution.DAILY).symbol
        # This dataset has multiple data columns
        # Source: https://data.nasdaq.com/data/CFTC/066393_FO_L_CHG-commitment-of-traders-propane-argus-far-east-mini-ifed-futures-and-options-change-in-positions-legacy-format-066393

class NasdaqCustomColumns(NasdaqDataLink):
    def __init__(self) -> None:
        # Select the column "open interest - change".
        self.value_column_name = "open interest - change"
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class NasdaqDataLinkDataAlgorithm : QCAlgorithm
    {
        private Symbol _peRatioSymbol, _positionChangeSymbol;

        public override void Initialize()
        {
            SetStartDate(2022, 1, 1);
            SetEndDate(2022, 7, 1);
            SetCash(100000);

            // For premium datasets, provide your API Key
            // NasdaqDataLink.SetAuthCode(GetParameter("nasdaq-data-link-api-key"));

            _peRatioSymbol = AddData<NasdaqDataLink>("MULTPL/SP500_PE_RATIO_MONTH", Resolution.Daily).Symbol;
            // This dataset has one data column ("Value")
            // Source : https://data.nasdaq.com/data/MULTPL/SP500_PE_RATIO_MONTH-sp-500-pe-ratio-by-month

            _positionChangeSymbol = AddData<NasdaqCustomColumns>("CFTC/066393_FO_L_CHG", Resolution.Daily).Symbol;
            // This dataset has multiple data columns
            // Source: https://data.nasdaq.com/data/CFTC/066393_FO_L_CHG-commitment-of-traders-propane-argus-far-east-mini-ifed-futures-and-options-change-in-positions-legacy-format-066393
        }
    }

    public class NasdaqCustomColumns : NasdaqDataLink
    {
        // Select the column "open interest - change".
        public NasdaqCustomColumns() : base(valueColumnName: "open interest - change") { }
    }
}

Accessing Data

To get the current Data Link data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

To get the default value of the dataset, use the Value value property. To get the value of a specific column in the dataset, call the GetStorageDictionary get_storage_dictionary method and index the result with the column name.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.pe_ratio_symbol):
        value = slice[self.pe_ratio_symbol].value
        self.log(f"{self.pe_ratio_symbol} PE ratio at {slice.time}: {value}")

    if slice.contains_key(self.position_change_symbol):
        data_point = slice[self.position_change_symbol]
        open_interest_change = data_point.value
        storage_dictionary = data_point.get_storage_dictionary()
        longs_change = storage_dictionary["noncommercial longs - change"]        
        self.log(f"{self.position_change_symbol} open interest change at {slice.time}: {open_interest_change}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_peRatioSymbol))
    {
        var value = slice[_peRatioSymbol].Value;
        Log($"{_peRatioSymbol} PE ratio at {slice.Time}: {value}");
    }

    if (slice.ContainsKey(_positionChangeSymbol))
    {
        var dataPoint = slice[_positionChangeSymbol];
        var openInterestChange = dataPoint.Value;
        var storageDictionary = dataPoint.GetStorageDictionary();
        var longsChange = storageDictionary["noncommercial longs - change"];
        Log($"{_positionChangeSymbol} open interest change at {slice.Time}: {openInterestChange}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(NasdaqDataLink).items():
        self.log(f"{dataset_symbol} PE ratio at {slice.time}: {data_point.value}")

    for dataset_symbol, data_point in slice.get(NasdaqCustomColumns).items():
        self.log(f"{dataset_symbol} value at {slice.time}: {data_point.value}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<NasdaqDataLink>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} PE ratio at {slice.Time}: {dataPoint.Value}");
    }

    foreach (var kvp in slice.Get<NasdaqCustomColumns>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} value at {slice.Time}: {dataPoint.Value}");
    }
}

Historical Data

The process to get historical Data Link data depends on your environment.

In Algorithms

To get historical Data Link data in an algorithm, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrames
pe_ratio_history_df = self.history(self.pe_ratio_symbol, 100, Resolution.DAILY)
position_change_history_df = self.history(self.position_change_symbol, 100, Resolution.DAILY)

# Dataset objects
pe_ratio_history_df = self.history[NasdaqDataLink](self.pe_ratio_symbol, 100, Resolution.DAILY)
position_change_history_df = self.history[NasdaqCustomColumns](self.position_change_symbol, 100, Resolution.DAILY)
var peRatioHistory = History<NasdaqDataLink>(_peRatioSymbol, 100, Resolution.Daily);
var positionChangeHistory = History<NasdaqDataLink>(_positionChangeSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

In Research Notebooks

To get historical Data Link data in the Research Environment, call the Download download method with the data URL.

from io import StringIO
data = qb.download("data.nasdaq.com/api/v3/datasets/MULTPL/SP500_PE_RATIO_MONTH.csv?")
df = pd.read_csv(StringIO(data), index_col=0)
var data = qb.Download("data.nasdaq.com/api/v3/datasets/MULTPL/SP500_PE_RATIO_MONTH.csv?");

To receive a notification when you can use the History history method in the Research Environment to get data from Data Link, subscribe to Lean.DataSource.NasdaqDataLink GitHub Issue #10 .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.pe_ratio_symbol)
self.remove_security(self.position_change_symbol)
RemoveSecurity(_peRatioSymbol);
RemoveSecurity(_positionChangeSymbol);

Example Applications

The Nasdaq Data Link sources allow you to explore different kinds of data in their database to develop trading strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Quiver Quantitative

Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.

 

Quiver Quantitative

CNBC Trading

Introduction

The CNBC Trading dataset by Quiver Quantitative tracks the recommendations made by media personalities on CNBC and their historical performance. The data covers over 1,500 US Equities, starts in December 2020, and is delivered on a daily frequency. This dataset covers recommendations made on Mad Money, Halftime Report, and Fast Money.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the CNBC Trading dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.

Getting Started

The following snippet demonstrates how to request data from the CNBC Trading dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(QuiverCNBCs, self.aapl).symbol

self._universe = self.add_universe(QuiverCNBCsUniverse, self.universe_selection)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<QuiverCNBCs>(_symbol).Symbol;

_universe = AddUniverse<QuiverCNBCsUniverse>(UniverseSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date December 25, 2020
Asset Coverage 1,515 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The Quiver Quantitative CNBC Trading dataset enables you to create strategies using the latest recommendations made by media personalities on CNBC. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Quiver Quantitative CNBC Trading dataset provides QuiverCNBCs , QuiverCNBC , and QuiverCNBCsUniverse objects.

QuiverCNBCs

QuiverCNBCs objects have the following attributes:

QuiverCNBC

QuiverCNBC objects have the following attributes:

QuiverCNBCsUniverse

QuiverCNBCsUniverse objects have the following attributes:

Requesting Data

To add CNBC Trading data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class QuiverCNBCDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(QuiverCNBCs, self.aapl).symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class QuiverCNBCDataAlgorithm: QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol= AddData<QuiverCNBCs>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current CNBC Trading data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_points = slice[self.dataset_symbol]
        for data_point in data_points:
            self.log(f"{self.dataset_symbol} direction at {slice.time}: {data_point.direction}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoints = slice[_datasetSymbol];
        foreach (var dataPoint in dataPoints)
        {
            Log($"{_datasetSymbol} direction at {slice.Time}: {dataPoint.Direction}");
        }
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_points in slice.get(QuiverCNBCs).items():
        for data_point in data_points:
            self.log(f"{dataset_symbol} direction at {slice.time}: {data_point.direction}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<QuiverCNBCs>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoints = kvp.Value;
        foreach(var dataPoint in dataPoints)
        {
            Log($"{datasetSymbol} direction at {slice.Time}: {dataPoint.Direction}");
        }
    }
}

Historical Data

To get historical CNBC Trading data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[QuiverCNBCs](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<QuiverCNBCs>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on CNBC Trading data, call the AddUniverse add_universe method with the QuiverCNBCsUniverse class and a selection function.

def initialize(self):
    self._uinverse = self.add_universe(QuiverCNBCsUniverse, self.universe_selection)

def universe_selection(self, alt_coarse: List[QuiverCNBCsUniverse]) -> List[Symbol]:
    cnbc_data_by_symbol = {}

    for datum in alt_coarse:
        symbol = datum.symbol
        
        if symbol not in cnbc_data_by_symbol:
            cnbc_data_by_symbol[symbol] = []
        cnbc_data_by_symbol[symbol].append(datum)
    
    # define our selection criteria
    return [symbol for symbol, d in cnbc_data_by_symbol.items()
            if len([x for x in d if x.direction == OrderDirection.BUY]) >= 3]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<QuiverCNBCsUniverse>(altCoarse =>
    {
        var cnbcDataBySymbol = new Dictionary<Symbol, List<QuiverCNBCsUniverse>>();

        foreach (var datum in altCoarse.OfType<QuiverCNBCsUniverse>())
        {
            var symbol = datum.Symbol;

            if (!cnbcDataBySymbol.ContainsKey(symbol))
            {
                cnbcDataBySymbol.Add(symbol, new List<QuiverCNBCsUniverse>());
            }
            cnbcDataBySymbol[symbol].Add(datum);
        }

        // define our selection criteria
        return from kvp in cnbcDataBySymbol
            where kvp.Value.Where(x => x.Direction == OrderDirection.Buy) >= 3
            select kvp.Key;
    });
}

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(universe, 30, Resolution.Daily);
foreach (var cnbcs in universeHistory)
{
    foreach (QuiverCNBCsUniverse cnbc in cnbcs)
    {
        Log($"{cnbc.Symbol} traders at {cnbc.EndTime}: {cnbc.Traders}");
    }
}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (_, time), cbncs in universe_history.items():
    for cbnc in cbncs:
        self.log(f"{cbnc.symbol} traders at {cbnc.end_time}: {cbnc.traders}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var cnbcs in universeHistory)
{
    foreach (QuiverCNBCsUniverse cnbc in cnbcs)
    {
        Console.WriteLine($"{cnbc.Symbol} traders at {cnbc.EndTime}: {cnbc.Traders}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (_, time), cbncs in universe_history.items():
    for cbnc in cbncs:
        print(f"{cbnc.symbol} traders at {cbnc.end_time}: {cbnc.traders}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to CNBC Trading data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Quiver Quantitative CNBC Trading dataset enables you to create strategies using the latest recommendations made by media personalities on CNBC. Examples include the following strategies:

For more example algorithms, see Examples .

 

Quiver Quantitative

Corporate Lobbying

Introduction

The Corporate Lobbying dataset by Quiver Quantitative tracks the lobbying activity of US Equities. The Lobbying Disclosure Act of 1995 requires lobbyists in the United States to disclose information about their activities, such as their clients, which issues they are lobbying on, and how much they are being paid. Quiver Quantiative scrapes this data and maps it to stock tickers to track which companies are spending money for legislative influence.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Corporate Lobbying dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.

Getting Started

The following snippet demonstrates how to request data from the Corporate Lobbying dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(QuiverLobbyings, self.symbol).symbol

self._universe = self.add_universe(QuiverLobbyingUniverse, self.universe_selection_filter)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<QuiverLobbyings>(_symbol).Symbol;

_universe = AddUniverse<QuiverLobbyingUniverse>(UniverseSelectionFilter);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 4, 1999
Asset Coverage 1,418 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The Corporate Lobbying dataset enables you to create strategies using the latest information on lobbying activity. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Quiver Quantitative Corporate Lobbying dataset provides QuiverLobbyings , QuiverLobbying , and QuiverLobbyingUniverse objects.

QuiverLobbyings

QuiverLobbyings objects have the following attributes:

QuiverLobbying

QuiverLobbying objects have the following attributes:

QuiverLobbyingUniverse

QuiverLobbyingUniverse objects have the following attributes:

Requesting Data

To add Corporate Lobbying data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class QuiverLobbyingDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        symbol = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(QuiverLobbyings, symbol).symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class QuiverLobbyingDataAlgorithm: QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            var symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol= AddData<QuiverLobbyings>(symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Corporate Lobbying data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_points = slice[self.dataset_symbol]
        for data_point in data_points:
            self.log(f"{self.dataset_symbol} amount at {slice.time}: {data_point.amount}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoints = slice[_datasetSymbol];
        foreach (var dataPoint in dataPoints)
        {
            Log($"{_datasetSymbol} amount at {slice.Time}: {dataPoint.Amount}");
        }
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_points in slice.get(QuiverLobbyings).items():
        for data_point in data_points:
            self.log(f"{dataset_symbol} amount at {slice.time}: {data_point.amount}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<QuiverLobbyings>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoints = kvp.Value;
        foreach(var dataPoint in dataPoints)
        {
            Log($"{datasetSymbol} amount at {slice.Time}: {dataPoint.Amount}");
        }
    }
}

Historical Data

To get historical Corporate Lobbying data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[QuiverLobbyings](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<QuiverLobbyings>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on Corporate Lobbying data, call the AddUniverse add_universe method with the QuiverLobbyingUniverse class and a selection function.

def initialize(self):
    self._universe = self.add_universe(QuiverLobbyingUniverse, "QuiverLobbyingUniverse", Resolution.DAILY, self.universe_selection)

def universe_selection(self, alt_coarse: List[QuiverLobbyingUniverse]) -> List[Symbol]:
    lobby_data_by_symbol = {}

    for datum in alt_coarse:
        symbol = datum.symbol
        
        if symbol not in lobby_data_by_symbol:
            lobby_data_by_symbol[symbol] = []
        lobby_data_by_symbol[symbol].append(datum)
    
    return [symbol for symbol, d in lobby_data_by_symbol.items()
            if sum([x.amount for x in d]) >= 100000]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<QuiverLobbyingUniverse>("QuiverLobbyingUniverse", Resolution.Daily, altCoarse =>
    {
        var lobbyDataBySymbol = new Dictionary<Symbol, List<QuiverLobbyingUniverse>>();

        foreach (var datum in altCoarse.OfType<QuiverLobbyingUniverse>())
        {
            var symbol = datum.Symbol;

            if (!lobbyDataBySymbol.ContainsKey(symbol))
            {
                lobbyDataBySymbol.Add(symbol, new List<QuiverLobbyingUniverse>());
            }
            lobbyDataBySymbol[symbol].Add(datum);
        }

        return from kvp in lobbyDataBySymbol
              where kvp.Value.Sum(x => x.Amount) >= 100000
              select kvp.Key;
    })
};

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(universe, 30, Resolution.Daily);
foreach (var lobbyings in universeHistory)
{
    foreach (QuiverLobbyingUniverse lobbying in lobbyings)
    {
        Log($"{lobbying.Symbol} issue at {lobbying.EndTime}: {lobbying.Issue}");
    }
}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (symbol, time), lobbyings in universe_history.items():
    for lobbying in lobbyings:
        print(f"{lobbying.symbol} issue at {lobbying.end_time}: {lobbying.issue}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var lobbyings in universeHistory)
{
    foreach (QuiverLobbyingUniverse lobbying in lobbyings)
    {
        Consolte.WriteLine($"{lobbying.Symbol} issue at {lobbying.EndTime}: {lobbying.Issue}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (symbol, time), lobbyings in universe_history.items():
    for lobbying in lobbyings:
        print(f"{lobbying.symbol} issue at {lobbying.end_time}: {lobbying.issue}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to Corporate Lobbying data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Corporate Lobbying dataset enables you to create strategies using the latest information on lobbying activity. Examples include the following strategies:

For more example algorithms, see Examples .

 

Quiver Quantitative

Insider Trading

Introduction

Corporate insiders are required to disclose purchases or sales of their own stock within two business days of when they occur. Using these disclosures, we collect data on insider trading activity, which can give hints on whether executives are bullish or bearish on their own companies. Here is a blog that we did on this dataset: https://www.quiverquant.com/blog/081121

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Insider Trading dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.

Getting Started

The following snippet demonstrates how to request data from the Insider Trading dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(QuiverInsiderTrading, aapl).symbol
self._universe = self.add_universe(QuiverInsiderTradingUniverse, self.universe_selection)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<QuiverInsiderTrading>(aapl).Symbol;
_universe = AddUniverse<QuiverInsiderTradingUniverse>(UniverseSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date 25 April 2014
Asset Coverage 4994 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The Quiver Quantitative Insider Trading dataset enables researchers to create strategies using the latest information on insider trading activity. Examples include:

For more example algorithms, see Examples .

Data Point Attributes

The Insider Trading dataset provides QuiverInsiderTrading and QuiverInsiderTradingUniverse object.

QuiverInsiderTrading

QuiverInsiderTrading objects have the following attributes:

QuiverInsiderTradingUniverse

QuiverInsiderTradingUniverse objects have the following attributes:

Requesting Data

To add Insider Trading data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class QuiverInsiderTradingDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        symbol = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(QuiverInsiderTrading, symbol).symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class QuiverInsiderTradingDataAlgorithm: QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            var symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol= AddData<QuiverInsiderTrading>(symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Insider Trading data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_points = slice[self.dataset_symbol]
        for data_point in data_points:
            self.log(f"{self.dataset_symbol} shares at {slice.time}: {data_point.shares}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoints = slice[_datasetSymbol];
        foreach (QuiverInsiderTrading dataPoint in dataPoints)
        {
            Log($"{_datasetSymbol} shares at {slice.Time}: {dataPoint.Shares}");
        }
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_points in slice.get(QuiverInsiderTrading).items():
        for data_point in data_points:
            self.log(f"{dataset_symbol} shares at {slice.time}: {data_point.shares}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<QuiverInsiderTrading>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoints = kvp.Value;
        foreach(QuiverInsiderTrading dataPoint in dataPoints)
        {
            Log($"{datasetSymbol} shares at {slice.Time}: {dataPoint.Shares}");
        }
    }
}

Historical Data

To get historical Insider Trading data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
self.history[QuiverInsiderTrading](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<QuiverInsiderTrading>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on Insider Trading data, call the AddUniverse add_universe method with the QuiverInsiderTradingUniverse class and a selection function.

def initialize(self):
    self._universe = self.add_universe(QuiverInsiderTradingUniverse, self.universe_selection)

def universe_selection(self, alt_coarse: List[QuiverInsiderTradingUniverse]) -> List[Symbol]:
    insider_trading_data_by_symbol = {}

    for datum in alt_coarse:
        symbol = datum.symbol
        
        if symbol not in insider_trading_data_by_symbol:
            insider_trading_data_by_symbol[symbol] = []
        insider_trading_data_by_symbol[symbol].append(datum)
    
    return [symbol for symbol, d in insider_trading_data_by_symbol.items()
            if len([x for x in d if x.direction == OrderDirection.BUY]) >= 3]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<QuiverInsiderTradingUniverse>(altCoarse =>
    {
        var insiderTradingDataBySymbol = new Dictionary<Symbol, List<QuiverInsiderTradingUniverse>>();

        foreach (var datum in altCoarse.OfType<QuiverInsiderTradingUniverse>())
        {
            var symbol = datum.Symbol;

            if (!insiderTradingDataBySymbol.ContainsKey(symbol))
            {
                insiderTradingDataBySymbol.Add(symbol, new List<QuiverInsiderTradingUniverse>());
            }
            insiderTradingDataBySymbol[symbol].Add(datum);
        }

        return from kvp in insiderTradingDataBySymbol
            where kvp.Value.Where(x => x.Direction == OrderDirection.Buy) >= 3
            select kvp.Key;
    });
}

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(universe, 30, Resolution.Daily);
foreach (var insiders in universeHistory)
{
    foreach (QuiverInsiderTradingUniverse insider in insiders)
    {
        Log($"{insider.Symbol} volume at {insider.EndTime}: {insider.Shares * insider.PricePerShare}");
    }
}}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (_, time), insiders in universe_history.items():
    for insider in insiders:
        if insider.price_per_share:
            self.log(f"{insider.symbol} volume at {insider.end_time}: {insider.shares * insider.price_per_share}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var insiders in universeHistory)
{
    foreach (QuiverInsiderTradingUniverse insider in insiders)
    {
        Console.WriteLine($"{insider.Symbol} volume at {insider.EndTime}: {insider.Shares * insider.PricePerShare}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (_, time), insiders in universe_history.items():
    for insider in insiders:
        if insider.price_per_share:
            print(f"{insider.symbol} volume at {insider.end_time}: {insider.shares * insider.price_per_share}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to Insider Trading data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Quiver Quantitative Insider Trading dataset enables researchers to create strategies using the latest information on insider trading activity. Examples include:

For more example algorithms, see Examples .

 

Quiver Quantitative

US Congress Trading

Introduction

The US Congress Trading dataset by Quiver Quantitative tracks US Equity trades made by members of Congress in the Senate and the House of Representatives. The data covers 1,800 US Equities, starts in January 2016, and is delivered on a daily frequency. This dataset is created by scraping SEC reports.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the US Congress Trading dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.

Getting Started

The following snippet demonstrates how to request data from the US Congress Trading dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(QuiverCongress, self.aapl).symbol

self._universe = self.add_universe(QuiverQuantCongressUniverse, self.universe_selection)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<QuiverCongress>(_symbol).Symbol;

_universe = AddUniverse<QuiverQuantCongresssUniverse>(UniverseSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2016
Asset Coverage 1,800 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The US Congress Trading dataset enables you to take immediate action on trades made by informed Members of Congress. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Congress Trading dataset provides QuiverCongressDataPoint , QuiverCongress , and QuiverQuantCongressUniverse objects.

QuiverCongressDataPoint Attributes

QuiverCongressDataPoint object has the following attributes:

QuiverCongress Attributes

QuiverCongress object has the following attributes:

QuiverQuantCongressUniverse Attributes

QuiverQuantCongressUniverse object has the following attributes:

Requesting Data

To add US Congress Trading data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class QuiverCongressDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        symbol = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(QuiverCongress, symbol).symbol
namespace QuantConnect
{
    public class QuiverCongressDataAlgorithm : QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol = AddData<QuiverCongress>(symbol).Symbol;
        }
    }
}

Accessing Data

To get the current US Congress Trading data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_points = slice[self.dataset_symbol]
        for data_point in data_points:
            self.log(f"{self.dataset_symbol} transaction amount at {slice.time}: {data_point.amount}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoints = slice[_datasetSymbol];
        foreach (var dataPoint in dataPoints)
        {
            Log($"{_datasetSymbol} transaction amount at {slice.Time}: {dataPoint.Amount}");
        }
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(QuiverCongress).items():
        self.log(f"{dataset_symbol} transaction amount at {slice.time}: {data_point.amount}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<QuiverCongress>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} transaction amount at {slice.Time}: {dataPoint.Amount}");
    }
}

Historical Data

To get historical US Congress Trading data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[QuiverCongress](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<QuiverCongress>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on US Congress Trading data, call the AddUniverse add_universe method with the QuiverQuantCongressUniverse class and a selection function.

def initialize(self) -> None:
    self._universe = self.add_universe(QuiverQuantCongressUniverse, self.universe_selection)

def universe_selection(self, alt_coarse: List[QuiverQuantCongresssUniverse]) -> List[Symbol]:
    return [d.symbol for d in alt_coarse \
        if d.amount > 200000 and d.transaction == OrderDirection.BUY]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<QuiverQuantCongresssUniverse>(altCoarse =>
    {
        return from d in altCoarse.OfType<QuiverCongressDataPoint>()
            where d.Amount > 200000 && d.Transaction == OrderDirection.Buy 
            select d.Symbol;
    })
};

For more information about dynamic universes, see Universes .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(_universe, 30, Resolution.Daily);
foreach (var trade in universeHistory.SelectMany(x => x).OfType<QuiverCongressDataPoint>())
{
    Log($"{trade.Symbol} amount at {trade.EndTime}: {trade.Amount} {trade.Representative}");
}
history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), trades in universe_history.items():
    for trade in trades:
        self.log(f"{trade.symbol} amount at {trade.end_time}: {trade.amount} {trade.representative}") {trade.Representative}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var trade in universeHistory.SelectMany(x => x).OfType<QuiverCongressDataPoint>())
{
    Console.WriteLine($"{trade.Symbol} amount at {trade.EndTime}: {trade.Amount} {trade.Representative}");
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (univere_symbol, time), trades in universe_history.items():
    for trade in trades:
        print(f"{trade.symbol} amount at {trade.end_time}: {trade.amount} {trade.representative}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to US Congress Trading data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The US Congress Trading dataset enables you to take immediate action on trades made by informed Members of Congress. Examples include the following strategies:

For more example algorithms, see Examples .

 

Quiver Quantitative

US Government Contracts

Introduction

The US Government Contracts dataset by Quiver Quantitative tracks the transactions of government contracts with publicly traded companies. The data covers over 700 US Equities, starts in October 2019, and is delivered on a daily frequency. Quiver Quantitative creates this dataset by using the API for USASpending.gov , which has the official open data source of federal spending information. The rows in this dataset only show new contracts, not payments or modifications to existing contracts. The dollar amounts are based on the total dollars obligated from each contract.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the US Government Contracts dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.

Getting Started

The following snippet demonstrates how to request data from the US Government Contracts dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(QuiverGovernmentContract, self.aapl).symbol

self._universe = self.add_universe(QuiverGovernmentContractUniverse, self.universe_selection)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<QuiverGovernmentContract>(_symbol).Symbol;

_universe = AddUniverse<QuiverGovernmentContractUniverse>(UniverseSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date October 15, 2019
Asset Coverage 748 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The Quiver Quantitative US Government Contracts dataset enables you to create strategies using the latest information on government contracts activity. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Government Contracts dataset provides QuiverGovernmentContract and QuiverGovernmentContractUniverse objects.

QuiverGovernmentContract

QuiverGovernmentContract objects have the following attributes:

QuiverGovernmentContractUniverse

QuiverGovernmentContractUniverse objects have the following attributes:

Requesting Data

To add US Government Contracts data to your algorithm, call the AddEquity add_equity method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class QuiverGovernmentContractDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        symbol = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(QuiverGovernmentContract, symbol).symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class QuiverGovernmentContractDataAlgorithm : QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            var symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol= AddData<QuiverGovernmentContract>(symbol).Symbol;
        }
    }
}

Accessing Data

To get the current US Government Contract data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_points = slice[self.dataset_symbol]
        for data_point in data_points:
            self.log(f"{self.dataset_symbol} amount at {slice.time}: {data_point.amount}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoints = slice[_datasetSymbol];
        foreach (var dataPoint in dataPoints)
        {
            Log($"{_datasetSymbol} amount at {slice.Time}: {dataPoint.Amount}");
        }
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_points in slice.get(QuiverGovernmentContract).items():
        for data_point in data_points:
            self.log(f"{dataset_symbol} amount at {slice.time}: {data_point.amount}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<QuiverGovernmentContract>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoints = kvp.Value;
        foreach(var dataPoint in dataPoints)
        {
            Log($"{datasetSymbol} amount at {slice.Time}: {dataPoint.Amount}");
        }
    }
}

Historical Data

To get historical US Government Contracts data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[QuiverGovernmentContract](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<QuiverGovernmentContract>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on US Government Contract data, call the AddUniverse add_universe method with the QuiverGovernmentContractUniverse class and a selection function.

def initialize(self):
    self._universe = self.add_universe(QuiverGovernmentContractUniverse, self.universe_selection)

def universe_selection(self, alt_coase: List[QuiverGovernmentContractUniverse]) -> List[Symbol]:
    gov_contract_data_by_symbol = {}

    for datum in alt_coarse:
        symbol = datum.symbol
        
        if symbol not in gov_contract_data_by_symbol:
            gov_contract_data_by_symbol[symbol] = []
        gov_contract_data_by_symbol[symbol].append(datum)
    
    return [symbol for symbol, d in gov_contract_data_by_symbol.items()
            if len(d) >= 3 and sum([x.amount for x in d]) > 50000]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<QuiverGovernmentContractUniverse>(altCoarse =>
    {
        var govContractDataBySymbol = new Dictionary<Symbol, List<QuiverGovernmentContractUniverse>>();

        foreach (var datum in altCoarse.OfType<QuiverGovernmentContractUniverse>())
        {
            var symbol = datum.Symbol;

            if (!govContractDataBySymbol.ContainsKey(symbol))
            {
                govContractDataBySymbol.Add(symbol, new List<QuiverGovernmentContractUniverse>());
            }
            govContractDataBySymbol[symbol].Add(datum);
        }

        return from kvp in govContractDataBySymbol
            where kvp.Value.Count >= 3 && kvp.Value.Sum(x => x.Amount) > 50000m
            select kvp.Key;
    });
}

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(universe, 30, Resolution.Daily);
foreach (var contracts in universeHistory)
{
    foreach (QuiverGovernmentContractUniverse contract in contracts)
    {
        Log($"{contract.Symbol} amount at {contract.EndTime}: {contract.Amount}");
    }
}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (_, time), contracts in universe_history.items():
    for contract in contracts:
        self.log(f"{contract.symbol} amount at {contract.end_time}: {contract.amount}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var contracts in universeHistory)
{
    foreach (QuiverGovernmentContractUniverse contract in contracts)
    {
        Console.WriteLine($"{contract.Symbol} amount at {contract.EndTime}: {contract.Amount}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (_, time), contracts in universe_history.items():
    for contract in contracts:
        print(f"{contract.symbol} amount at {contract.end_time}: {contract.amount}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to US Government Contracts data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Quiver Quantitative US Government Contracts dataset enables you to create strategies using the latest information on government contracts activity. Examples include the following strategies:

For more example algorithms, see Examples .

 

Quiver Quantitative

WallStreetBets

Introduction

The WallStreetBets dataset by Quiver Quantitative tracks daily mentions of different equities on Reddit’s popular WallStreetBets forum. The data covers 6,000 Equities, starts in August 2018, and is delivered on a daily frequency. The dataset is created by scraping the daily discussion threads on r/WallStreetBets and parsing the comments for ticker mentions.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the WallStreetBets dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.

Getting Started

The following snippet demonstrates how to request data from the WallStreetBets dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(QuiverWallStreetBets, self.aapl).symbol

self._universe = self.add_universe(QuiverWallStreetBetsUniverse, self.universe_selection)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<QuiverWallStreetBets>(_symbol).Symbol;

_universe = AddUniverse<QuiverWallStreetBetsUniverse>(UniverseSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date August 2018
Asset Coverage 6,000 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The WallStreetBets dataset enables you to create strategies using the latest activity on the WallStreetBets daily discussion thread. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The WallStreetBets dataset provides QuiverWallStreetBets and QuiverWallStreetBetsUniverse objects.

QuiverWallStreetBets Attributes

QuiverWallStreetBets objects have the following attributes:

QuiverWallStreetBetsUniverse Attributes

QuiverWallStreetBetsUniverse objects have the following attributes:

Requesting Data

To add WallStreetBets data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class QuiverWallStreetBetsDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(QuiverWallStreetBets, self.aapl).symbol
namespace QuantConnect
{
    public class QuiverWallStreetBetsDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol = AddData<QuiverWallStreetBets>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current WallStreetBets data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_points = slice[self.dataset_symbol]
        for data_point in data_points:
            self.log(f"{self.dataset_symbol} mentions at {slice.time}: {data_point.mentions}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoints = slice[_datasetSymbol];
        foreach (var dataPoint in dataPoints)
        {
            Log($"{_datasetSymbol} mentions at {slice.Time}: {dataPoint.Mentions}");
        }
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_points in slice.get(QuiverWallStreetBets).items():
        for data_point in data_points:
            self.log(f"{dataset_symbol} mentions at {slice.time}: {data_point.mentions}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<QuiverWallStreetBets>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoints = kvp.Value;
        foreach (var dataPoint in dataPoints)
        {
            Log($"{datasetSymbol} mentions at {slice.Time}: {dataPoint.Mentions}");
        }
    }
}

Historical Data

To get historical WallStreetBets data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[QuiverWallStreetBets](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<QuiverWallStreetBets>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on WallStreetBets data, call the AddUniverse add_universe method with the QuiverWallStreetBetsUniverse class and a selection function.

def initialize(self) -> None:
    self.universe = self.add_universe(QuiverWallStreetBetsUniverse, self.universe_selection)
        
def universe_selection(self, alt_coarse: List[QuiverWallStreetBetsUniverse]) -> List[Symbol]:
    return [d.symbol for d in alt_coarse if d.mentions > 100  and d.rank < 100]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<QuiverWallStreetBetsUniverse>(altCoarse =>
    {
        return from d in altCoarse.OfType<QuiverWallStreetBetsUniverse>()
            where d.Mentions > 10 && d.Rank > 10 select d.Symbol;
    });
}

For more information about dynamic universes, see Universes .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(_universe, 30, Resolution.Daily);
foreach (var bets in universeHistory)
{
    foreach (QuiverWallStreetBetsUniverse bet in bets)
    {
        Log($"{bet.Symbol} rank at {bet.EndTime}: {bet.Rank}");
    }
}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), pages in universe_history.items():
    for page in pages:
        self.log(f"{page.symbol} week percent change at {page.end_time}: {page.week_percent_change}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
{
    foreach (QuiverWallStreetBetsUniverse bet in bets)
    {
        Log($"{bet.Symbol} rank at {bet.EndTime}: {bet.Rank}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (univere_symbol, time), pages in universe_history.items():
    for page in pages:
        print(f"{page.symbol} week percent change at {page.end_time}: {page.week_percent_change}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to WallStreetBets data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The WallStreetBets dataset enables you to create strategies using the latest activity on the WallStreetBets daily discussion thread. Examples include the following strategies:

For more example algorithms, see Examples .

 

Quiver Quantitative

Wikipedia Page Views

Introduction

The Wikipedia Page Views dataset by Quiver Quantitative tracks Wikipedia page views for US Equities. The data covers 1,300 US Equities, starts in October 2016, and is delivered on a daily frequency. This dataset is created by scraping the Wikipedia pages of companies.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Wikipedia Page Views dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.

Getting Started

The following snippet demonstrates how to request data from the Wikipedia Page Views dataset:

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(QuiverWikipedia, self.aapl).symbol

self._universe = self.add_universe(QuiverWikipediaUniverse, , self.universe_selection)
_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_datasetSymbol = AddData<QuiverWikipedia>(_symbol).Symbol;

_universe = AddUniverse<QuiverWikipediaUniverse>(UniverseSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date October 2016
Asset Coverage 1,300 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The Wikipedia Page Views dataset enables you to observe patterns in the traffic of company Wikipedia pages. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Wikipedia Page Views dataset provides QuiverWikipedia and QuiverWikipediaUniverse objects.

QuiverWikipedia Attributes

QuiverWikipedia objects have the following attributes:

QuiverWikipediaUniverse Attributes

QuiverWikipediaUniverse objects have the following attributes:

Requesting Data

To add Wikipedia Page Views data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class QuiverWikipediaPageViewsDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        symbol = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(QuiverWikipedia, symbol).symbol
namespace QuantConnect
{
    public class QuiverWikipediaPageViewsDataAlgorithm : QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);
            var symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _datasetSymbol = AddData<QuiverWikipedia>(symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Wikipedia Page Views data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_points = slice[self.dataset_symbol]
        for data_point in data_points:
            self.log(f"{self.dataset_symbol} weekly page views percentage change at {slice.time}: {data_point.week_percent_change}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoints = slice[_datasetSymbol];
        foreach (var dataPoint in dataPoints)
        {
            Log($"{_datasetSymbol} weekly page views percentage change at {slice.Time}: {dataPoint.WeekPercentChange}");
        }
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    data_points = slice.get(QuiverWikipedia)
    for data_point in data_points.values:
        self.log(f"{dataset_symbol} weekly page views percentage change at {slice.time}: {data_point.week_percent_change}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<QuiverWikipedia>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoints = kvp.Value;
        foreach (var dataPoint in dataPoints)
        {
            Log($"{datasetSymbol} weekly page views percentage change at {slice.Time}: {dataPoint.WeekPercentChange}");
        }
    }
}

Historical Data

To get historical Wikipedia Page Views data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[QuiverWikipedia](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<QuiverWikipedia>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on Wikipedia Page Views data, call the AddUniverse add_universe method with the QuiverWikipediaUniverse class and a selection function.

def initialize(self) -> None:
    self._universe = self.add_universe(QuiverWikipediaUniverse, self.universe_selection)

def universe_selection(self, alt_coarse: List[QuiverWikipediaUniverse]) -> List[Symbol]:
    return [d.symbol for d in alt_coarse \
                if d.page_views > 100 \
                and d.week_percent_change < 0.2]
private Universe _universe;
public override void Initialize()
{
    _universe = AddUniverse<QuiverWikipediaUniverse>(altCoarse =>
    {
        return from d in altCoarse
                where d.PageViews > 100m && d.MonthPercentChange > 0.2m
                select d.Symbol;
    });
}

For more information about dynamic universes, see Universes .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var universeHistory = History(_universe, 30, Resolution.Daily);
foreach (var bets in universeHistory)
{
    foreach (QuiverWallStreetBetsUniverse bet in bets)
    {
        Log($"{bet.Symbol} rank at {bet.EndTime}: {bet.Rank}");
    }
}
universe_history = self.history(self._universe, 30, Resolution.DAILY)
for (univere_symbol, time), bets in universe_history.items():
    for bet in bets:
        self.log(f"{bet.symbol} rank at {bet.end_time}: {bet.rank}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var universeHistory = qb.UniverseHistory(universe, qb.Time.AddDays(-30), qb.Time);
foreach (var bets in universeHistory)
{
    foreach (QuiverWallStreetBetsUniverse bet in bets)
    {
        Console.WriteLine($"{bet.Symbol} rank at {bet.EndTime}: {bet.Rank}");
    }
}
universe_history = qb.universe_history(universe, qb.time-timedelta(30), qb.time)
for (univere_symbol, time), bets in universe_history.items():
    for bet in bets:
        print(f"{bet.symbol} rank at {bet.end_time}: {bet.rank}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to Wikipedia Page Views data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Wikipedia Page Views dataset enables you to observe patterns in the traffic of company Wikipedia pages. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

RegAlytics

RegAlytics was founded by Mary Kopczynski, Aaron Heisler, Alexander Appugliese, and Werner Pauliks in 2019 with the goal of significantly reducing the time and cost required to mitigate regulatory risk. RegAlytics provides access to accurate and clean regulatory data from all global regulators in all sectors that is enriched by regulatory experts for risk and compliance teams everywhere. Please come to RegAlytics directly if you would like data on other sectors or countries!

 

RegAlytics

US Regulatory Alerts - Financial Sector

Introduction

The US Regulatory Alerts dataset by RegAlytics tracks US regulatory changes within the financial services sector. The data covers 400,000 alerts, starts from January 2020, and is delivered on a daily basis. This dataset is created by sourcing information from over 5,000 regulators and using proprietary technology to gather and structure the regulatory data. Once prepared, the data is thoroughly reviewed by RegAlytics' team of regulatory experts and delivered each morning by 8AM for industry use.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the US Regulatory Alerts - Financial Sector dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

RegAlytics was founded by Mary Kopczynski, Aaron Heisler, Alexander Appugliese, and Werner Pauliks in 2019 with the goal of significantly reducing the time and cost required to mitigate regulatory risk. RegAlytics provides access to accurate and clean regulatory data from all global regulators in all sectors that is enriched by regulatory experts for risk and compliance teams everywhere. Please come to RegAlytics directly if you would like data on other sectors or countries!

Getting Started

The following snippet demonstrates how to request data from the US Regulatory Alerts - Financial Sector dataset:

from QuantConnect.DataSource import *

self.dataset_symbol = self.add_data(RegalyticsRegulatoryArticles, "REG").symbol
using QuantConnect.DataSource;

_datasetSymbol = AddData<RegalyticsRegulatoryArticles>("REG").Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2020
Coverage 400,000 Alerts
Data Density Sparse
Resolution Daily
Timezone New York

Example Applications

The US Regulator Alters dataset enables you to accurately design strategies while mitigating regulatory risk. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Regulatory Alerts dataset provides RegalyticsRegulatoryArticle and RegalyticsRegulatoryArticles objects.

RegalyticsRegulatoryArticle

RegalyticsRegulatoryArticle objects have the following attributes:

RegalyticsRegulatoryArticles

RegalyticsRegulatoryArticles objects have the following attributes:

Requesting Data

To add US Regulatory Alerts data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class RegalyticsDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2021, 1, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)
        
        self.dataset_symbol = self.add_data(RegalyticsRegulatoryArticles, "REG").symbol
namespace QuantConnect
{
    public class RegalyticsDataAlgorithm : QCAlgorithm
    {
        private Symbol _datasetSymbol;
        
        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);
            
            _datasetSymbol = AddData<RegalyticsRegulatoryArticles>("REG").Symbol;
        }
    }
}

Accessing Data

To get the current US Regulatory Alerts data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_points = slice[self.dataset_symbol]
        for data_point in data_points:
            self.log(f"{self.dataset_symbol} title at {slice.time}: {data_point.title}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoints = slice[_datasetSymbol];
        foreach (var dataPoint in dataPoints)
        {
            Log($"{_datasetSymbol} title at {slice.Time}: {dataPoint.Title}");
        }
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    data = slice.get(RegalyticsRegulatoryArticles)
    if data:
        for articles in data.values():
            self.log(f"{self.time} {articles.to_string()}")
            
            for article in articles:
                self.log(f"{self.dataset_symbol} article title at {slice.time}: {article.title}")
public override void OnData(Slice slice)
{
    var data = slice.Get<RegalyticsRegulatoryArticles>();
    if (!data.IsNullOrEmpty())
    {
        foreach (var articles in data.Values)
        {
            Log($"{Time} {articles.ToString()}");
            foreach (RegalyticsRegulatoryArticle article in articles)
            {
                Log($"{_datasetSymbol} article title at {slice.Time}: {article.Title}");
            }
        }
    }
}

Historical Data

To get historical US Regulatory Alerts data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars =  self.history[RegalyticsRegulatoryArticles](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<RegalyticsRegulatoryArticles>(_datasetSymbol, 100, Resolution.Daily);

Remove Subscriptions

To remove your subscription to US Regulatory Alerts data, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The US Regulator Alters dataset enables you to accurately design strategies while mitigating regulatory risk. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Securities and Exchange Commission

The mission of the U.S. Securities and Exchange Commission is to protect investors, maintain fair, orderly, and efficient markets, and facilitate capital formation. The SEC oversees the key participants in the securities world, including securities exchanges, securities brokers and dealers, investment advisors, and mutual funds. The SEC is concerned primarily with promoting the disclosure of important market-related information, maintaining fair dealing, and protecting against fraud.

 

Securities and Exchange Commission

US SEC Filings

Introduction

The US SEC Filings dataset provides the quarterly financial earning reports that the United States Securities and Exchange Commission (SEC) requires from publicly traded companies in the US. The data covers 15,000 US Equities, starts in January 1998, and is delivered on a daily frequency. The data is sourced from the SEC's Electronic Data Gathering, Analysis, and Retrieval (EDGAR) system. QuantConnect downloads and formats the Quarterly Financial Reports (10-Q) and Annual Financial Report (8-K) filings of companies into a format for easy consumption by LEAN.

For more information about the US SEC Filings dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

The mission of the U.S. Securities and Exchange Commission is to protect investors, maintain fair, orderly, and efficient markets, and facilitate capital formation. The SEC oversees the key participants in the securities world, including securities exchanges, securities brokers and dealers, investment advisors, and mutual funds. The SEC is concerned primarily with promoting the disclosure of important market-related information, maintaining fair dealing, and protecting against fraud.

Getting Started

The following snippet demonstrates how to request data from the US SEC Filings dataset:

from QuantConnect.DataSource import *

self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
self.report_8k_symbol = self.add_data(SECReport8K, self.aapl).symbol
self.report_10k_symbol = self.add_data(SECReport10K, self.aapl).symbol
self.report_10q_symbol = self.add_data(SECReport10Q, self.aapl).symbol
using QuantConnect.DataSource;

_symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
_report8KSymbol = AddData<SECReport8K>(_symbol, Resolution.Daily).Symbol;
_report10KSymbol = AddData<SECReport10K>(_symbol, Resolution.Daily).Symbol;
_report10QSymbol = AddData<SECReport10Q>(_symbol, Resolution.Daily).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 1998
Asset Coverage 15,000 US Equities
Data Density Sparse
Resolution Daily
Timezone UTC

Example Applications

The US SEC Filings dataset enables you to create strategies using information from SEC reports. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US SEC Filings dataset provides SECReport8K , SECReport10K , and SECReport10Q objects.

Report 8K Attributes

SECReport8K objects have the following attributes:

Report 10K Attributes

SECReport10K objects have the following attributes:

Report 10Q Attributes

SECReport10Q objects have the following attributes:

Requesting Data

To add US SEC Filings data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class SECReportAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2019, 8, 21)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
        self.report_8k_symbol = self.add_data(SECReport8K, self.aapl).symbol
        self.report_10k_symbol = self.add_data(SECReport10K, self.aapl).symbol
        self.report_10q_symbol = self.add_data(SECReport10Q, self.aapl).symbol
namespace QuantConnect
{
    public class SECReportAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _report8KSymbol, _report10KSymbol, _report10QSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2019, 8, 21);
            SetCash(100000);

            _symbol = AddEquity("AAPL", Resolution.Daily).Symbol;
            _report8KSymbol = AddData<SECReport8K>(_symbol, Resolution.Daily).Symbol;
            _report10KSymbol = AddData<SECReport10K>(_symbol, Resolution.Daily).Symbol;
            _report10QSymbol = AddData<SECReport10Q>(_symbol, Resolution.Daily).Symbol;
        }
    }
}

Accessing Data

To get the current US SEC Filings data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.report_8k_symbol):
        data_point = slice[self.report_8k_symbol]
        self.log(f"{self.report_8k_symbol} report count at {slice.time}: {len(data_point.report.documents)}")

    if slice.contains_key(self.report_10k_symbol):
        data_point = slice[self.report_10k_symbol]
        self.log(f"{self.report_10k_symbol} report count at {slice.time}: {len(data_point.report.documents)}")

    if slice.ContainsKey(self.report_10q_symbol):
        data_point = slice[self.report_10q_symbol]
        self.log(f"{self.report_10q_symbol} report count at {slice.Time}: {len(data_point.report.documents)}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_report8KSymbol))
    {
        var dataPoint = slice[_report8KSymbol];
        Log($"{_report8KSymbol} report count at {slice.Time}: {data_point.Report.Documents.Count}");
    }

    if (slice.ContainsKey(_report10KSymbol))
    {
        var dataPoint = slice[_report10KSymbol];
        Log($"{_report10KSymbol} report count at {slice.Time}: {data_point.Report.Documents.Count}");
    }

    if (slice.ContainsKey(_report10QSymbol))
    {
        var dataPoint = slice[_report10QSymbol];
        Log($"{_report10QSymbol} report count at {slice.Time}: {data_point.Report.Documents.Count}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(SECReport8K).items():
        self.log(f"{dataset_symbol} report count at {slice.time}: {len(data_point.report.documents)}")

    for dataset_symbol, data_point in slice.get(SECReport10K).items():
        self.log(f"{dataset_symbol} report count at {slice.time}: {len(data_point.report.documents)}")

    for dataset_symbol, data_point in slice.get(SECReport10Q).items():
        self.log(f"{dataset_symbol} report count at {slice.time}: {len(data_point.report.documents)}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<SECReport8K>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} report count at {slice.Time}: {dataPoint.Report.Documents.Count}");
    }

    foreach (var kvp in slice.Get<SECReport10K>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} report count at {slice.Time}: {dataPoint.Report.Documents.Count}");
    }

    foreach (var kvp in slice.Get<SECReport10Q>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} report count at {slice.Time}: {dataPoint.Report.Documents.Count}");
    }
}

Historical Data

To get historical US SEC Filings data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrames
report_8k_history_df = self.history(self.report_8k_symbol, 100, Resolution.DAILY)
report_10k_history_df = self.history(self.report_10k_symbol, 100, Resolution.DAILY)
report_10q_history_df = self.history(self.report_10q_symbol, 100, Resolution.DAILY)
history_df = self.history([self.report_8k_symbol, 
                           self.report_10k_symbol,
                           self.report_10q_symbol], 100, Resolution.DAILY)

# Dataset objects
report_8k_history_bars = self.history[SECReport8K](self.report_8k_symbol, 100, Resolution.DAILY)
report_10k_history_bars = self.history[SECReport10K](self.report_10k_symbol, 100, Resolution.DAILY)
report_10q_history_bars = self.history[SECReport10Q](self.report_10q_symbol, 100, Resolution.DAILY)
// Dataset objects
var report8KHistory = History<SECReport8K>(_report8KSymbol, 100, Resolution.Daily);
var report10KHistory = History<SECReport10K>(_report10KSymbol, 100, Resolution.Daily);
var report10QHistory = History<SECReport10Q>(_report10QSymbol, 100, Resolution.Daily);

// Slice objects
var history = History(new[] {_report8KSymbol, _report10KSymbol, _report10QSymbol}, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.report_8k_symbol)
self.remove_security(self.report_10k_symbol)
self.remove_security(self.report_10q_symbol)
RemoveSecurity(_report8KSymbol);
RemoveSecurity(_report10KSymbol);
RemoveSecurity(_report10QSymbol);

If you subscribe to US SEC Filings data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The US SEC Filings dataset enables you to create strategies using information from SEC reports. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Smart Insider

Smart Insider was founded by Michael Tindale in 2016 with the goal of forming the most progressive insider data vendor in the field. Smart Insider provides access to buyback intention and transactions for quantitative researchers. In addition to their Corporate Buybacks dataset, Smart Insider provides data on stock trades made by US politicians and thousands of high net worth individuals around the globe.

 

Smart Insider

Corporate Buybacks

Introduction

The Corporate Buybacks dataset by Smart Insider tracks US Equities share buyback programs. The data covers 3,000 US Equities, starts in May 2015, and is delivered on a second frequency. This dataset is created by analyzing daily buyback announcements and by using secondary data sources to ensure records are accurate and complete.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Corporate Buybacks dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Smart Insider was founded by Michael Tindale in 2016 with the goal of forming the most progressive insider data vendor in the field. Smart Insider provides access to buyback intention and transactions for quantitative researchers. In addition to their Corporate Buybacks dataset, Smart Insider provides data on stock trades made by US politicians and thousands of high net worth individuals around the globe.

Getting Started

The following snippet demonstrates how to request data from the Corporate Buybacks dataset:

self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
self.intention_symbol = self.add_data(SmartInsiderIntention, self.aapl).symbol
self.transaction_symbol = self.add_data(SmartInsiderTransaction, self.aapl).symbol

self.intention_universe = self.add_universe(SmartInsiderIntentionUniverse, self.intention_selection)
self.transaction_universe = self.add_universe(SmartInsiderTransactionUniverse, self.transaction_selection)
_symbol = AddEquity("AAPL", Resolution.Minute).Symbol;
_intentionSymbol = AddData<SmartInsiderIntention>(_symbol).Symbol;
_transactionSymbol = AddData<SmartInsiderTransaction>(_symbol).Symbol;

_intentionUniverse = AddUniverse<SmartInsiderIntentionUniverse>(IntentionSelection);
_transactionUniverse = AddUniverse<SmartInsiderTransactionUniverse>(TransactionSelection);

Data Summary

The following table describes the dataset properties:

Property Value
Start Date May 2015
Asset Coverage 3,000 US Equities
Data Density Sparse
Resolution Second
Timezone New York

Example Applications

The Corporate Buybacks dataset enables you to design strategies using information on company buyback programs. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Corporate Buybacks dataset provides SmartInsiderIntention , SmartInsiderIntentionUniverse , SmartInsiderTransaction , and SmartInsiderTransactionUniverse objects.

SmartInsiderIntention Attributes

SmartInsiderIntention objects have the following attributes:

SmartInsiderIntentionUniverse Attributes

SmartInsiderIntentionUniverse objects have the following attributes:

SmartInsiderTransaction Attributes

SmartInsiderTransaction objects have the following attributes:

SmartInsiderTransactionUniverse Attributes

SmartInsiderTransactionUniverse objects have the following attributes:

Requesting Data

To add Corporate Buybacks data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class CorporateBuybacksDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2016, 1, 1)
        self.set_end_date(2021, 1, 1)
        self.set_cash(100000)
 
        self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
        self.intention_symbol = self.add_data(SmartInsiderIntention, self.aapl).symbol
        self.transaction_symbol = self.add_data(SmartInsiderTransaction, self.aapl).symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class CorporateBuybacksDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _intentionSymbol, _transactionSymbol;
        
        public override void Initialize()
        {
            SetStartDate(2016, 1, 1);
            SetEndDate(2021, 1, 1);
            SetCash(100000);

            _symbol = AddEquity("AAPL", Resolution.Minute).Symbol;
            _intentionSymbol = AddData<SmartInsiderIntention>(_symbol).Symbol;
            _transactionSymbol = AddData<SmartInsiderTransaction>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Corporate Buybacks data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.intention_symbol):
        data_point = slice[self.intention_symbol]
        self.log(f"{self.intention_symbol} intention amount at {slice.time}: {data_point.amount}")

    if slice.contains_key(self.transaction_symbol):
        data_point = slice[self.transaction_symbol]
        self.log(f"{self.transaction_symbol} transaction amount at {slice.time}: {data_point.amount}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_intentionSymbol))
    {
        var dataPoint = slice[_intentionSymbol];
        Log($"{_intentionSymbol} intention amount at {slice.Time}: {dataPoint.Amount}");
    }

    if (slice.ContainsKey(_transactionSymbol))
    {
        var dataPoint = slice[_transactionSymbol];
        Log($"{_transactionSymbol} transaction amount at {slice.Time}: {dataPoint.Amount}");
    }
}

To iterate through all of the dataset objects in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(SmartInsiderIntention).items():
        self.log(f"{dataset_symbol} intention amount at {slice.time}: {data_point.amount}")

    for dataset_symbol, data_point in slice.get(SmartInsiderTransaction).items():
        self.log(f"{dataset_symbol} transaction amount at {slice.time}: {data_point.amount}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<SmartInsiderIntention>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} intention amount at {slice.Time}: {dataPoint.Amount}");
    }

    foreach (var kvp in slice.Get<SmartInsiderTransaction>())
    {
        var datasetSymbol = kvp.Key;
        var dataPoint = kvp.Value;
        Log($"{datasetSymbol} transaction amount at {slice.Time}: {dataPoint.Amount}");
    }
}

Historical Data

To get historical Corporate Buybacks data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrames
intention_history_df = self.history(self.intention_symbol, 100, Resolution.DAILY)
transaction_history_df = self.history(self.transaction_symbol, 100, Resolution.DAILY)
history_df = self.history([self.intention_symbol, self.transaction_symbol], 100, Resolution.DAILY)

# Dataset objects
intention_history_bars = self.history[SmartInsiderIntention](self.intention_symbol, 100, Resolution.DAILY)
transaction_history_bars = self.history[SmartInsiderTransaction](self.transaction_symbol, 100, Resolution.DAILY)
// Dataset objects
var intentionHistory = History<SmartInsiderIntention>(_intentionSymbol, 100, Resolution.Daily);
var transactionHistory = History<SmartInsiderTransaction>(_transactionSymbol, 100, Resolution.Daily);

// Slice objects
var history = History(new[] {_intentionSymbol, _transactionSymbol}, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Universe Selection

To select a dynamic universe of US Equities based on Corporate Buybacks data, call the AddUniverse add_universe method with the SmartInsiderIntentionUniverse class or the SmartInsiderTransactionUniverse and a selection function.

def initialize(self) -> None:
    self.intention_universe = self.add_universe(SmartInsiderIntentionUniverse, self.intention_selection)
    self.transaction_universe = self.add_universe(SmartInsiderTransactionUniverse, self.transaction_selection)

def intention_selection(self, alt_coarse: List[SmartInsiderIntentionUniverse]) -> List[Symbol]:
    return [d.symbol for d in alt_coarse \
                if d.percentage > 0.005 \
                and d.u_s_d_market_cap > 100000000]

def transaction_selection(self, alt_coarse: List[SmartInsiderTransactionUniverse]) -> List[Symbol]:
    return [d.symbol for d in alt_coarse \
                if d.buyback_percentage > 0.005 \
                and d.u_s_d_market_cap > 100000000]
private Universe _intentionUniverse;
private Universe _transactionUniverse;
public override void Initialize()
{
    _intentionUniverse = AddUniverse<SmartInsiderIntentionUniverse>(altCoarse =>
    {
        return from d in altCoarse.OfType<SmartInsiderIntentionUniverse>() 
            where d.Percentage > 0.005m && d.USDMarketCap > 100000000m
            select d.Symbol;
    });
    _transactionUniverse = AddUniverse<SmartInsiderTransactionUniverse>(altCoarse =>
    {
        return from d in altCoarse.OfType<SmartInsiderTransactionUniverse>() 
            where d.BuybackPercentage > 0.005m && d.USDMarketCap > 100000000m
            select d.Symbol;
    });
}

For more information about dynamic universes, see Universes .

Universe History

You can get historical universe data in an algorithm and in the Research Environment.

Historical Universe Data in Algorithms

To get historical universe data in an algorithm, call the History history method with the Universe object and the lookback period. If there is no data in the period you request, the history result is empty.

var intentionUniverseHistory = History(_intentionUniverse, 30, Resolution.Daily);
foreach (var intentions in intentionUniverseHistory)
{
    foreach (SmartInsiderIntentionUniverse intention in intentions)
    {
        Log($"{intention.Symbol.Value} amount at {intention.EndTime}: {intention.AmountValue}");
    }
}

var transactionUniverseHistory = History(_transactionUniverse, 30, Resolution.Daily);
foreach (var transactions in transactionHistory)
{
    foreach (SmartInsiderTransactionUniverse transaction in transactions)
    {
        Log($"{transaction.Symbol.Value} amount at {transaction.EndTime}: {transaction.Amount}");
    }
}
intention_universe_history = self.history(self.intention_universe, 30, Resolution.DAILY)
for (_, time), intentions in intention_universe_history.items():
    for intention in intentions:
        self.log(f"{intention.symbol.value} amount value at {intention.end_time}: {intention.amount_value}")

transaction_universe_history = self.history(self.transaction_universe, 30, Resolution.DAILY)
for (_, time), transactions in transaction_universe_history.items():
    for transaction in transactions:
        self.log(f"{transaction.symbol.value} amount at {intention.end_time}: {intention.amount}")

Historical Universe Data in Research

To get historical universe data in research, call the UniverseHistory universe_history method with the Universe object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.

var intentionUniverseHistory = qb.UniverseHistory(intentionUniverse, qb.Time.AddDays(-30), qb.Time);
foreach (var intentions in intentionUniverseHistory)
{
    foreach (SmartInsiderIntentionUniverse intention in intentions)
    {
        Console.WriteLine($"{intention.Symbol.Value} amount at {intention.EndTime}: {intention.AmountValue}");
    }
}

var transactionUniverseHistory = qb.UniverseHistory(transactionUniverse, qb.Time.AddDays(-30), qb.Time);
foreach (var transactions in transactionHistory)
{
    foreach (SmartInsiderTransactionUniverse transaction in transactions)
    {
        Console.WriteLine($"{transaction.Symbol.Value} amount at {transaction.EndTime}: {transaction.Amount}");
    }
}
intention_universe_history = qb.universe_history(intention_universe, qb.time-timedelta(30), qb.time)
for (_, time), intentions in intention_universe_history.items():
    for intention in intentions:
        print(f"{intention.symbol.value} amount value at {intention.end_time}: {intention.amount_value}")

transaction_universe_history = qb.universe_history(transaction_universe, qb.time-timedelta(30), qb.time)
for (_, time), transactions in transaction_universe_history.items():
    for transaction in transactions:
        print(f"{transaction.symbol.value} amount at {transaction.end_time}: {transaction.amount}")

You can call the History history method in Research.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.intention_symbol)
self.remove_security(self.transaction_symbol)
RemoveSecurity(_intentionSymbol);
RemoveSecurity(_transactionSymbol);

If you subscribe to Corporate Buybacks data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Corporate Buybacks dataset enables you to design strategies using information on company buyback programs. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Tiingo

Tiingo was founded by Rishi Singh in 2014. Tiingo goes beyond traditional news sources and focuses on finding rich, quality content written by knowledgeable writers. Their proprietary algorithms scan unstructured, non-traditional news and other information sources while tagging companies, topics, and assets. This refined system is backed by over ten years of research and development, and is written by former institutional quant traders. Because of this dedicated approach, Tiingo"s News API is a trusted tool used by quant funds, hedge funds, pension funds, social media companies, and tech companies around the world.

 

Tiingo

Tiingo News Feed

Introduction

The Tiingo News Feed dataset by Tiingo tracks US Equity news releases. The data covers 10,000 US Equities, starts in January 2014, and is delivered on a second frequency. This dataset is creating by Tiingo integrating over 120 different news providers into their platform.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.

For more information about the Tiingo News Feed dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

Tiingo was founded by Rishi Singh in 2014. Tiingo goes beyond traditional news sources and focuses on finding rich, quality content written by knowledgeable writers. Their proprietary algorithms scan unstructured, non-traditional news and other information sources while tagging companies, topics, and assets. This refined system is backed by over ten years of research and development, and is written by former institutional quant traders. Because of this dedicated approach, Tiingo's News API is a trusted tool used by quant funds, hedge funds, pension funds, social media companies, and tech companies around the world.

Getting Started

The following snippet demonstrates how to request data from the Tiingo News Feed dataset:

from QuantConnect.DataSource import *

self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
self.dataset_symbol = self.add_data(TiingoNews, self.symbol).symbol
using QuantConnect.DataSource;

_symbol = AddEquity("AAPL", Resolution.Minute).Symbol;
_datasetSymbol = AddData<TiingoNews>(_symbol).Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 2014
Asset Coverage 10,000 US Equities
Data Density Sparse
Resolution Second
Timezone UTC

Example Applications

The Tiingo News Feed enables you to accurately design strategies harnessing news articles on the companies you're trading. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The Tiingo News Feed dataset provides TiingoNews objects, which have the following attributes:

Requesting Data

To add Tiingo News Feed data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class TiingoNewsDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2021, 1, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
        self.dataset_symbol = self.add_data(TiingoNews, self.symbol).symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class TiingoNewsDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);

            _symbol = AddEquity("AAPL", Resolution.Minute).Symbol;
            _datasetSymbol = AddData<TiingoNews>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Tiingo News Feed data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        article = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} article description at {slice.time}: {article.description}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var article = slice[_datasetSymbol];
        Log($"{_datasetSymbol} article description at {slice.Time}: {article.Description}");
    }
}

To iterate through all of the articles in the current Slice , call the Get get method.

def on_data(self, slice: Slice) -> None:
    for dataset_symbol, article in slice.get(TiingoNews).items():
        self.log(f"{dataset_symbol} article description at {slice.time}: {article.description}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<TiingoNews>())
    {
        var datasetSymbol = kvp.Key;
        var article = kvp.Value;
        Log($"{datasetSymbol} article description at {slice.Time}: {article.Description}");
    }
}

Historical Data

To get historical Tiingo News Feed data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
self.history[TiingoNews](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<TiingoNews>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove a subscription, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to Tiingo News Feed data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes .

Example Applications

The Tiingo News Feed enables you to accurately design strategies harnessing news articles on the companies you're trading. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

Treasury Department

The Treasury Department is the executive agency responsible for promoting economic prosperity and ensuring the financial security of the United States. The Department is responsible for a wide range of activities such as advising the President on economic and financial issues, encouraging sustainable economic growth, and fostering improved governance in financial institutions. The Department of the Treasury operates and maintains systems that are critical to the nation"s financial infrastructure, such as the production of coin and currency, the disbursement of payments to the American public, revenue collection, and the borrowing of funds necessary to run the federal government.

 

Treasury Department

US Treasury Yield Curve

Introduction

The US Treasury Yield Curve datasets tracks the yield curve rate from the US Department of the Treasury. The data starts in January 1990 and is delivered on a daily frequency. This dataset is calculated from composites of indicative, bid-side market quotations (not actual transactions) obtained by the Federal Reserve Bank of New York at or near 3:30 PM Eastern Time (ET) each trading day.

For more information about the US Treasury Yield Curve dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

The Treasury Department is the executive agency responsible for promoting economic prosperity and ensuring the financial security of the United States. The Department is responsible for a wide range of activities such as advising the President on economic and financial issues, encouraging sustainable economic growth, and fostering improved governance in financial institutions. The Department of the Treasury operates and maintains systems that are critical to the nation's financial infrastructure, such as the production of coin and currency, the disbursement of payments to the American public, revenue collection, and the borrowing of funds necessary to run the federal government.

Getting Started

The following snippet demonstrates how to request data from the US Treasury Yield Curve dataset:

self.dataset_symbol = self.add_data(USTreasuryYieldCurveRate, "USTYCR").symbol
_datasetSymbol = AddData<USTreasuryYieldCurveRate>("USTYCR").Symbol;

Data Summary

The following table describes the dataset properties:

Property Value
Start Date January 1990
Coverage 1 Dataset
Data Density Sparse
Resolution Daily
Timezone New York

Example Applications

The US Treasury Yield Curve dataset enables you to monitor the yields of bonds with numerous maturities in your strategies. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The US Treasury Yield Curve dataset provides USTreasuryYieldCurveRate objects, which have the following attributes:

Requesting Data

To add US Treasury Yield Curve data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class QuiverCongressDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.dataset_symbol = self.add_data(USTreasuryYieldCurveRate, "USTYCR").symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class USTreasuryYieldCurveDataAlgorithm : QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2019, 1, 1);
            SetEndDate(2020, 6, 1);
            SetCash(100000);

            _datasetSymbol = AddData<USTreasuryYieldCurveRate>("USTYCR").Symbol;
        }
    }
}

Accessing Data

To get the current US Treasury Yield Curve data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} one month value at {slice.time}: {data_point.one_month}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} one month value at {slice.Time}: {dataPoint.OneMonth}");
    }
}

Historical Data

To get historical US Treasury Yield Curve data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[USTreasuryYieldCurveRate](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<USTreasuryYieldCurveRate>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove your subscription to US Treasury Yield Curve data, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The US Treasury Yield Curve dataset enables you to monitor the yields of bonds with numerous maturities in your strategies. Examples include the following strategies:

For more example algorithms, see Examples .

 

Datasets

VIX Central

VIX Central was founded by Eli Mintz in 2012 with goal of displaying historical VIX term structures in a simple and intuitive interface. VIX Central provides access to real-time and historical VIX data for individual investors.

 

VIX Central

VIX Central Contango

Introduction

The VIX Central Contango dataset by VIX Central tracks VIX Futures (VX) contango data. The data covers 12 Futures contracts closest to expiry/maturity, starts in June 2010, and is delivered on a daily frequency. The dataset is created by QuantConnect downloading data from VIX Central website, which collects and analyses VIX and VX (VIX Futures) data.

Contango and Backwardation are terms used to describe if participants in the Futures market are overpaying or underpaying relative to the "spot" price of the underlying commodity when trading a Futures contract ("spot" price is the price of the actual commodity/asset at a given moment in time). Contango and backwardation can be used to determine forward-looking expectations of the commodity's spot price by the time the Future has expired/matured and is set to be delivered by participants of the Futures market. As Futures near their expiration/maturity date, contango and backwardation curves tend to converge on the spot price of the commodity at the time of expiration.

For more information about the VIX Central Contango dataset, including CLI commands and pricing, see the dataset listing .

About the Provider

VIX Central was founded by Eli Mintz in 2012 with goal of displaying historical VIX term structures in a simple and intuitive interface. VIX Central provides access to real-time and historical VIX data for individual investors.

Getting Started

The following snippet demonstrates how to request data from the VIX Central Contango dataset:

using QuantConnect.DataSource;

_datasetSymbol = AddData<VIXCentralContango>("VIX", Resolution.Daily).Symbol;
from QuantConnect.DataSource import *

self.dataset_symbol = self.add_data(VIXCentralContango, "VIX", Resolution.DAILY).symbol

Data Summary

The following table describes the dataset properties:

Property Value
Start Date June 2010
Asset Coverage 1 Futures Chain with 12 contracts
Data Density Regular
Resolution Daily
Timezone New York

Example Applications

The VIX Central Contango dataset enable you to explore VIX Future contracts pricing data. Examples include the following strategies:

For more example algorithms, see Examples .

Data Point Attributes

The VIX Central Contango dataset provides VIXCentralContango objects, which have the following attributes:

Requesting Data

To add VIX Central Contango data to your algorithm, call the AddData add_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class VixCentralContangoAlgorithm(QCAlgorithm):
 
    def initialize(self) -> None:
        self.set_start_date(2014, 1, 1)
        self.set_end_date(2018, 1, 1)
        self.set_cash(25000)
 
        self.dataset_symbol = self.add_data(VIXCentralContango, "VX", Resolution.DAILY).symbol
namespace QuantConnect
{
    public class VixCentralContangoAlgorithm : QCAlgorithm
    {
        private Symbol _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2014, 1, 1);
            SetEndDate(2018, 1, 1);
            SetCash(25000);

            _datasetSymbol = AddData<VIXCentralContango>("VX", Resolution.Daily).Symbol;
        }
    }
}

Accessing Data

To get the current VIX Central Contango data, index the current Slice with the dataset Symbol . Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} front month at {slice.time}: {data_point.front_month}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var dataPoint = slice[_datasetSymbol];
        Log($"{_datasetSymbol} front month at {slice.Time}: {dataPoint.FrontMonth}");
    }
}

Historical Data

To get historical VIX Central Contango data, call the History history method with the dataset Symbol . If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[VIXCentralContango](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<VIXCentralContango>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests .

Remove Subscriptions

To remove your subscription to VIX Central Contango data, call the RemoveSecurity remove_security method.

self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

Example Applications

The VIX Central Contango dataset enable you to explore VIX Future contracts pricing data. Examples include the following strategies:

For more example algorithms, see Examples .

 

Importing Data

Importing Data

Key Concepts

Introduction

Custom data is your own external data that's not from the Dataset Market. You can use custom data to inform trading decisions and to simulate trades on unsupported securities. To get custom data into your algorithms, you download the entire file at once or read it line-by-line with a custom data reader. If you use a custom data reader, LEAN sends the data to the OnData on_data method in your algorithm.

File Providers

The most common file providers to use are the Object Store , Dropbox, GitHub, and Google Sheets.

Object Store

The Object Store is the fastest file provider. If you import files from remote providers, you will be restricted by their rate limits and your download speed.

Dropbox

If you store your custom data in Dropbox, you need to create a link to the file and add ?dl=1 to the end of the file URL. To create file links, see How to share files or folders in the Dropbox documentation. The ?dl=1 parameter lets you download the direct file link, not the HTML page of the file.

GitHub

If you store your custom data in GitHub, you can use public or private repositories. When you download the data, use the raw file (for example, https://raw.githubusercontent.com/<organization>/<repo>/<path> ). For instructions on accessing the raw file, see Viewing or copying the raw file content in the GitHub documentation.

Google Sheets

If you store your custom data in Google Sheets, you need to create a link to the file. To create file links, see Make Google Docs, Sheets, Slides & Forms public in the Google Docs documentation. Choose the CSV format to find /pub?gid={SHEET_ID}&single=true&output=csv parameter on the end of the link. Google Sheets don't support exporting data in JSON format.

Stream Custom Data

To receive your custom data in the OnData on_data method, create a custom type and then create a data subscription. The custom data type tells LEAN where to get your data and how to read it.

All custom data types must extend the BaseData PythonData class and override the GetSource get_source and Reader reader methods

public class MyCustomDataType : BaseData
{
    public override DateTime EndTime { get; set; }
    public decimal Property1 { get; set; } = 0;

    public override SubscriptionDataSource GetSource(
        SubscriptionDataConfig config,
        DateTime date,
        bool isLive)
    {
        return new SubscriptionDataSource("<sourceURL>", SubscriptionTransportMedium.RemoteFile);
    }

    public override BaseData Reader(
        SubscriptionDataConfig config,
        string line,
        DateTime date,
        bool isLive)
    {
        if (string.IsNullOrWhiteSpace(line.Trim()) || char.IsDigit(line[0]))
        {
            return null;
        }

        var data = line.Split(',');
        return new MyCustomDataType()
        {
            Time = DateTime.ParseExact(data[0], "yyyyMMdd", CultureInfo.InvariantCulture),
            EndTime = Time.AddDays(1),
            Symbol = config.Symbol,
            Value = data[1].IfNotNullOrEmpty(
                s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture)),
            Property1 = data[2].IfNotNullOrEmpty(
                s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture))
        };
    }
}
class MyCustomDataType(PythonData):
    def get_source(self,
         config: SubscriptionDataConfig,
         date: datetime,
         is_live: bool) -> SubscriptionDataSource:
        return SubscriptionDataSource("<sourceURL>", SubscriptionTransportMedium.REMOTE_FILE)

    def reader(self,
         config: SubscriptionDataConfig,
         line: str,
         date: datetime,
         is_live: bool) -> BaseData:

         if not (line.strip() and line[0].isdigit()):
            return None

         data = line.split(',')

        custom = MyCustomDataType()
        custom.time = datetime.strptime(data[0], '%Y%m%d')
        custom.end_time = custom.time + timedelta(1)
        custom.value = float(data[1])
        custom["Property1"] = float(data[2])
        return custom

For more information about custom data types, see Streaming Data .

Download Bulk Data

The Download download method downloads the content served from a local file or URL and then returns it as a string.

var content = Download("<filePathOrURL>");
content = self.download("<filePathOrURL>")

For more information about bulk downloads, see Bulk Downloads .

File Quotas

There are no limits to the number of files you can load from the Object Store during a single backtest or Research Environment session in QuantConnect Cloud.

The following table shows the number of remote files you can download during a single backtest or Research Environment session in QuantConnect Cloud:

Organization Tier File Quota
Free 25
Quant Researcher 100
Team 250
Trading Firm 1,000
Free Unlimited

Remote files can be up to 200 MB in size and can have names up to 200 characters long.

Rate Limits

We do not impose a rate limit on file downloads but often external providers do. Dropbox caps download speeds to 10 kb/s after 3-4 download requests. To ensure your algorithms run fast, only use a small number of small custom data files or use the Object Store.

Timeouts

In cloud algorithms, the download methods have a 10-second timeout period. If the methods don't download the data within 10 seconds, LEAN throws an error.

 

Importing Data

Streaming Data

Streaming Data

Key Concepts

Introduction

There are two techniques to import data into your algorithm. You can either manually import the entire file or stream the file line-by-line into your algorithm's OnData on_data event. This page explores streaming a file's contents into your algorithm line-by-line. The data you import can be from a remote server or the Object Store .

Data Formats

Common data formats are CSV , JSON , XML , and ZIP but you can use any file type that can be read over the internet. For Excel files, double check the raw data format for parsing in the data reader, since data will be formatted for convenient visualization in Excel application view. To avoid confusion of data format, save the spreadsheet as a CSV file and open it in a text editor to confirm the raw data format.

The data in the file must be in chronological order. If you import from a remote file provider , each request has a one-second overhead, so package your custom data to minimize requests. Bundle dates together where possible to speed up execution. The Object Store file provider gives you the fastest execution because you don't need to download the files on every execution.

Set Data Sources

The GetSource get_source method in your custom data class instructs LEAN where to find the data.

public class MyCustomDataType : BaseData
{
    public override SubscriptionDataSource GetSource(
        SubscriptionDataConfig config,
        DateTime date,
        bool isLiveMode)
    {
        if (isLiveMode)
        {
            return new SubscriptionDataSource("https://www.bitstamp.net/api/ticker/", SubscriptionTransportMedium.Rest);
        }

        var source = $"http://my-ftp-server.com/{config.Symbol.Value}/{date:yyyyMMdd}.csv";
        return new SubscriptionDataSource(source, SubscriptionTransportMedium.RemoteFile);

        /*
        // Example of loading from the Object Store:
        return new SubscriptionDataSource(Bitstamp.KEY, 
            SubscriptionTransportMedium.ObjectStore);

        // Example of loading a remote zip file:
        return new SubscriptionDataSource(
            "https://cdn.quantconnect.com/uploads/multi_csv_zipped_file.zip",
            SubscriptionTransportMedium.RemoteFile,
            FileFormat.ZipEntryName);

        // Example of loading a remote zip file and accessing a CSV file inside it:
        return new SubscriptionDataSource(
            "https://cdn.quantconnect.com/uploads/multi_csv_zipped_file.zip#csv_file_10.csv",
            SubscriptionTransportMedium.RemoteFile,
            FileFormat.ZipEntryName);
        */
    }
}
class MyCustomDataType(PythonData):
    def get_source(self,
         config: SubscriptionDataConfig,
         date: datetime,
         is_live_mode: bool) -> SubscriptionDataSource:
        
         if is_live_mode:
            return SubscriptionDataSource("https://www.bitstamp.net/api/ticker/", SubscriptionTransportMedium.REST)

        source = f"http://my-ftp-server.com/{config.symbol.value}/{date:%Y%M%d}.csv"
        return SubscriptionDataSource(source, SubscriptionTransportMedium.REMOTE_FILE)

        # Example of loading from the Object Store:
        # return SubscriptionDataSource(Bitstamp.KEY, SubscriptionTransportMedium.OBJECT_STORE)

        # Example of loading a remote zip file:
        # return SubscriptionDataSource(
        #     "https://cdn.quantconnect.com/uploads/multi_csv_zipped_file.zip",
        #     SubscriptionTransportMedium.REMOTE_FILE,
        #     FileFormat.ZIP_ENTRY_NAME
        # )

        # Example of loading a remote zip file and accessing a CSV file inside it:
        # return SubscriptionDataSource(
        #     "https://cdn.quantconnect.com/uploads/multi_csv_zipped_file.zip#csv_file_10.csv",
        #     SubscriptionTransportMedium.REMOTE_FILE,
        #     FileFormat.ZIP_ENTRY_NAME
        # )

The following table describes the arguments the GetSource get_source method accepts:

Argument Data Type Description
config SubscriptionDataConfig The subscription configuration
date DateTime datetime Date of this source file
isLiveMode is_live_mode bool true True if algorithm is running in live mode

You can use these arguments to create SubscriptionDataSource objects representing different locations and formats. The following table describes the arguments the SubscriptionDataSource accepts:

Argument Data Type Description Default Value
source string str Data source location
transportMedium transport_medium SubscriptionTransportMedium The transport medium to be used to retrieve data from the source
format FileFormat The format of the data within the source FileFormat.Csv
headers IEnumerable<KeyValuePair<string, string>> The headers to be used for this source. In cloud algorithms, each of the key-value pairs can consist of up to 1,000 characters. null None

The FileFormat enumeration has the following members:

The SubscriptionTransportMedium enumeration has the following members:

Member Description Example
LocalFile LOCAL_FILE The data comes from disk Lean.DataSource.CBOE
RemoteFile REMOTE_FILE The data is downloaded from a remote source Custom Securities Examples
Rest REST The data comes from a rest call that is polled and returns a single line/data point of information LiveMode live_mode case of Demonstration Algorithm
ObjectStore OBJECT_STORE The data comes from the object store Example of Custom Data

Parse Custom Data

The Reader reader method of your custom data class takes one line of data from the source location and parses it into one of your custom objects. You can add as many properties to your custom data objects as you need, but the following table describes the properties you must set. When there is no useable data in a line, the method should return null None . LEAN repeatedly calls the Reader reader method until the date/time advances or it reaches the end of the file.

Property Description
Symbol symbol You can set this property to config. Symbol symbol .
Time time The time when the data sample starts.
EndTime end_time The time when the data sample ends and when LEAN should add the sample to a Slice .
Value value The default data point value ( decimal float ).

The following table describes the arguments the Reader reader method accepts:

Argument Data Type Description
config SubscriptionDataConfig The subscription configuration
line string str Content from the requested data source
date DateTime datetime Date of this source file
isLiveMode is_live_mode bool true True if algorithm is running in live mode

You can use these arguments to create BaseData objects from different sources.

public class MyCustomDataType : BaseData
{
    public override BaseData Reader(
        SubscriptionDataConfig config,
        string line,
        DateTime date,
        bool isLiveMode)
    {
        if (string.IsNullOrWhiteSpace(line.Trim()))
        {
            return null;
        }

        if (isLiveMode)
        {
            var custom = JsonConvert.DeserializeObject<MyCustomDataType>(line);
            custom.EndTime = DateTime.UtcNow.ConvertFromUtc(config.ExchangeTimeZone);
            return custom;
        }

        if (!char.IsDigit(line[0]))
        {
            return null;
        }

        var data = line.Split(',');
        return new MyCustomDataType()
        {
            Time = DateTime.ParseExact(data[0], "yyyyMMdd", CultureInfo.InvariantCulture),
            EndTime = Time.AddDays(1),
            Symbol = config.Symbol,
            Value = data[1].IfNotNullOrEmpty(
                s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture)),
        };
    }
}
class MyCustomDataType(PythonData):
    def reader(self,
         config: SubscriptionDataConfig,
         line: str,
         date: datetime,
         is_live_mode: bool) -> BaseData:

        if not line.strip():
            return None

        custom = MyCustomDataType()
        custom.symbol = config.symbol

        if is_live_mode:
            data = json.loads(line)
            custom.end_time =  Extensions.convert_from_utc(datetime.utcnow(), config.exchange_time_zone)
            custom.value = data["value"]
            return custom

        if not line[0].isdigit():
            return None

        data = line.split(',')
        custom.end_time = datetime.strptime(data[0], '%Y%m%d') + timedelta(1)
        custom.value = float(data[1])
        return custom

Object Store

The Object Store file provider gives you the fastest execution because you don't need to download the files on every execution. To upload the data files into the Object Store, use the Algorithm Lab , CLI , or Research Environment . To then pull the data from the Object Store into an algorithm, set the custom data source to read from the file in Object Store and parse the data in the reader Reader method.

public class MyCustomDataType : BaseData
{
    public override SubscriptionDataSource GetSource(
        SubscriptionDataConfig config,
        DateTime date,
        bool isLiveMode)
    {
        return new SubscriptionDataSource("<YourCSVKey>", SubscriptionTransportMedium.ObjectStore, FileFormat.Csv);
        // return new SubscriptionDataSource("<YourJSONKey>", SubscriptionTransportMedium.ObjectStore, FileFormat.UnfoldingCollection);
    }
}
class MyCustomDataType(PythonData):
    def get_source(self,
            config: SubscriptionDataConfig,
            date: datetime,
            is_live_mode: bool) -> SubscriptionDataSource:
            
        return SubscriptionDataSource("<your_csv_key>", SubscriptionTransportMedium.OBJECT_STORE, FileFormat.CSV)
        # return new SubscriptionDataSource("<your_json_key>", SubscriptionTransportMedium.ObjectStore, FileFormat.UNFOLDING_COLLECTION);

Set Properties

To set the Symbol Properties of the custom data, provide a SymbolProperties object when you subscribe to the dataset. The ticker you pass to the SymbolProperties constructor and the AddData add_data method must be the same.

To set the Exchange Hours of the custom data, provide a SecurityExchangeHours object when you subscribe to the dataset. The default hours are for the market to be open 24/7.

var ticker = "ABC";
var properties = new SymbolProperties("description", "USD", 1, 0.01, 0.01, ticker);
var hours = MarketHoursDatabase.GetEntry(Market.USA, "SPY", SecurityType.Equity).ExchangeHours;
AddData<CustomData>(ticker, properties, hours);
ticker = "ABC"
properties = SymbolProperties("description", "USD", 1, 0.01, 0.01, ticker)
hours = MarketHoursDatabase.get_entry(Market.USA, "SPY", SecurityType.EQUITY).exchange_hours
self.add_data(CustomData, ticker, properties, hours)

Live Trading Considerations

In live trading, we pass custom data to your algorithm as soon as it arrives. The time it arrives may not align with the time of other slices . Design your algorithm to handle unsychronized data so that you don't run into issues.

Demonstration Algorithm

The following example algorithm implements a custom data source for the Bitstamp API.

using Newtonsoft.Json;

namespace QuantConnect.Algorithm.CSharp
{
    public class CustomDataBitstampAlgorithm : QCAlgorithm
    {
        private Symbol _customDataSymbol;

        public override void Initialize()
        {
            SetStartDate(2012, 9, 13);
            SetEndDate(2021, 6, 20);

            _customDataSymbol = AddData<Bitstamp>("BTC", Resolution.Daily).Symbol;

            var history = History<Bitstamp>(_customDataSymbol, 200, Resolution.Daily);
            Debug($"We got {history.Count()} items from historical data request of {_customDataSymbol}.");
        }

        public void OnData(Bitstamp data)
        {
            Log($"{data.EndTime}: Close: {data.Close}");
            Plot(_customDataSymbol, "Price", data.Close);
        }

        public class Bitstamp : BaseData
        {
            [JsonProperty("timestamp")]
            public int Timestamp = 0;
            [JsonProperty("open")]
            public decimal Open = 0;
            [JsonProperty("high")]
            public decimal High = 0;
            [JsonProperty("low")]
            public decimal Low = 0;
            [JsonProperty("last")]
            public decimal Close = 0;
            [JsonProperty("bid")]
            public decimal Bid = 0;
            [JsonProperty("ask")]
            public decimal Ask = 0;
            [JsonProperty("vwap")]
            public decimal WeightedPrice = 0;
            [JsonProperty("volume")]
            public decimal VolumeBTC = 0;
            public decimal VolumeUSD = 0;

            public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
            {
                if (isLiveMode)
                {
                    return new SubscriptionDataSource("https://www.bitstamp.net/api/ticker/", SubscriptionTransportMedium.Rest);
                }

                var source = "https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/bitstampusd.csv";
                return new SubscriptionDataSource(source, SubscriptionTransportMedium.RemoteFile);
            }

            public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
            {
                if (string.IsNullOrWhiteSpace(line.Trim()))
                {
                    return null;
                }

                var coin = new Bitstamp() {Symbol = config.Symbol};

                if (isLiveMode)
                {
                    //Example Line Format:
                    //{"high": "441.00", "last": "421.86", "timestamp": "1411606877", "bid": "421.96", "vwap": "428.58", "volume": "14120.40683975", "low": "418.83", "ask": "421.99"}
                    coin = JsonConvert.DeserializeObject<Bitstamp>(line);
                    coin.EndTime = DateTime.UtcNow.ConvertFromUtc(config.ExchangeTimeZone);
                    coin.Time = coin.EndTime.AddDays(-1);
                    coin.Value = coin.Close;
                    return coin;
                }

                //Example Line Format:
                //Date      Open   High    Low     Close   Volume (BTC)    Volume (Currency)   Weighted Price
                //2011-09-13 5.8    6.0     5.65    5.97    58.37138238,    346.0973893944      5.929230648356
                if (!char.IsDigit(line[0]))
                {
                    return null;
                }

                var data = line.Split(',');
                coin.Value = data[4].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
                if (coin.Value == 0)
                {
                    return null;
                }

                coin.Time = DateTime.Parse(data[0], CultureInfo.InvariantCulture);
                coin.EndTime = coin.Time.AddDays(1);
                coin.Open = data[1].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
                coin.High = data[2].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
                coin.Low = data[3].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
                coin.VolumeBTC = data[5].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
                coin.VolumeUSD = data[6].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
                coin.WeightedPrice = data[7].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
                coin.Close = coin.Value;
                return coin;
            }
        }
    }
}
class CustomDataBitstampAlgorithm(QCAlgorithm):

    def initialize(self):
        self.set_start_date(2012, 9, 13)
        self.set_end_date(2021, 6, 20)
        self.set_cash(100000)

        # Define the symbol and "type" of our generic data:
        self._custom_data_symbol = self.add_data(Bitstamp, "BTC").symbol

        history = self.history(Bitstamp, self._custom_data_symbol, 200, Resolution.DAILY)
        self.debug(f"We got {len(history)} items from historical data request of {self._custom_data_symbol}.")


    def on_data(self, slice):
        if self._custom_data_symbol not in slice:
            return

        data = slice[self._custom_data_symbol]
        self.log(f'{data.end_time}: Close: {data.close}')
        self.plot(self._custom_data_symbol, 'Price', data.close)


class Bitstamp(PythonData):

    def get_source(self, config, date, is_live_mode):
        if is_live_mode:
            return SubscriptionDataSource("https://www.bitstamp.net/api/ticker/", SubscriptionTransportMedium.REST)

        source = "https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/bitstampusd.csv"
        return SubscriptionDataSource(source, SubscriptionTransportMedium.REMOTE_FILE)

    def reader(self, config, line, date, is_live_mode):

        if not line.strip():
            return None

        coin = Bitstamp()
        coin.symbol = config.symbol

        if is_live_mode:
            # Example Line Format:
            # {"high": "441.00", "last": "421.86", "timestamp": "1411606877", "bid": "421.96", "vwap": "428.58", "volume": "14120.40683975", "low": "418.83", "ask": "421.99"}
            live_btc = json.loads(line)

            # If value is zero, return None
            coin.value = float(live_btc["last"])
            if coin.value == 0:
                return None

            coin.end_time =  Extensions.convert_from_utc(datetime.utcnow(), config.exchange_time_zone)
            coin.time = coin.end_time - timedelta(1)
            coin["Open"] = float(live_btc["open"])
            coin["High"] = float(live_btc["high"])
            coin["Low"] = float(live_btc["low"])
            coin["Close"] = coin.value
            coin["Ask"] = float(live_btc["ask"])
            coin["Bid"] = float(live_btc["bid"])
            coin["VolumeBTC"] = float(live_btc["volume"])
            coin["WeightedPrice"] = float(live_btc["vwap"])
            return coin

        # Example Line Format:
        # Date      Open   High    Low     Close   Volume (BTC)    Volume (Currency)   Weighted Price
        # 2011-09-13 5.8    6.0     5.65    5.97    58.37138238,    346.0973893944      5.929230648356
        if not line[0].isdigit():
            return None

        data = line.split(',')

        # If value is zero, return None
        coin.value = float(data[4])
        if coin.value == 0:
            return None

        coin.time = datetime.strptime(data[0], "%Y-%m-%d")
        coin.end_time = coin.time + timedelta(1)
        coin["Open"] = float(data[1])
        coin["High"] = float(data[2])
        coin["Low"] = float(data[3])
        coin["Close"] = coin.value
        coin["VolumeBTC"] = float(data[5])
        coin["VolumeUSD"] = float(data[6])
        coin["WeightedPrice"] = float(data[7])
        return coin

To save this algorithm to your cloud projects, clone it clone it .

 

Streaming Data

Custom Securities

Custom Securities

Key Concepts

Introduction

To receive your custom data in the OnData on_data method instead of in a bulk download, create a custom type and then create a data subscription. The custom data type tells LEAN where to get your data and how to read it. All custom data types must extend from BaseData PythonData and override the Reader reader and GetSource get_source methods.

Unlike custom data, native QC data gets the full benefit of security modeling like splits and dividends. Custom data is ignorant of everything about the actual market. Things like market hours, delistings, and mergers don't work with custom data.

Create Subscriptions

After you define the custom data class, in the Initialize initialize method of your algorithm, call the AddData add_data method. This method gives LEAN the type factory to create the objects, the name of the data, and the resolution at which to poll the data source for updates.

public class MyAlgorithm : QCAlgorithm
{
    private Symbol _symbol;
    public override void Initialize()
    {
        _symbol = AddData<MyCustomDataType>("<name>", Resolution.Daily).Symbol;
    }
}
class MyAlgorithm(QCAlgorithm): 
    def initialize(self) -> None:
        self._symbol = self.add_data(MyCustomDataType, "<name>", Resolution.DAILY).symbol

The resolution argument should match the resolution of your custom dataset. The lowest reasonable resolution is every minute. Anything more frequent than every minute is very slow to execute. The frequency that LEAN checks the data source depends on the resolution argument. The following table shows the polling frequency of each resolution:

Resolution Update Frequency
Daily Every 30 minutes
Hour Every 30 minutes
Minute Every minute
Second Every second
Tick Constantly checks for new data

There are several other signatures for the AddData add_data method.

self.add_data(type, ticker, resolution)
self.add_data(type, ticker, resolution, time_zone, fill_forward, leverage)
self.add_data(type, ticker, properties, exchange_hours, resolution, fill_forward, leverage)
AddData<T>(ticker, resolution);
AddData<T>(ticker, resolution, fillForward, leverage);
AddData<T>(ticker, resolution, timeZone, fillForward, leverage);
AddData<T>(ticker, properties, exchangeHours, resolution, fillForward, leverage);

Receive Custom Data

As your data reader reads your custom data file, LEAN adds the data points in the Slice it passes to your algorithm's OnData on_data method. To collect the custom data, use the Symbol symbol or name of your custom data subscription. You can access the Value value and custom properties of your custom data class from the Slice . To access the custom properties, use the custom attribute pass the property name to the GetProperty get_property method .

public class MyAlgorithm : QCAlgorithm
{
    public override void OnData(Slice slice)
    {
        if (slice.ContainsKey(_symbol))
        {
            var customData = slice[_symbol];
            var value = customData.Value;
            var property1 = customData.Property1;
        }
    }

    // You can also get the data directly with OnData(<dataClass>) method
    public void OnData(MyCustomDataType slice)
    {
        var value = slice.Value;
        var property1 = slice.Property1;
    }
}
class MyAlgorithm(QCAlgorithm):
    def on_data(self, slice: Slice) -> None:
        if slice.contains_key(self._symbol):
            custom_data = slice[self._symbol]
            value = custom_data.value
            property1 = custom_data.property1

Debugging

In backtests, you can use the IDE debugging capabilities to inspect the variables to understand the internal state of the custom data implementation. For more information about backtest debugging, see the Debugging documentation for Cloud Platform , Local Platform , or the CLI .

In live trading, consider adding logging statements to help with debugging since the debugger isn't available. To log information from inside your custom data class, set a class member that references the algorithm.

public class MyCustomDataTypeAlgorithm : QCAlgorithm
{
    public override void Initialize()
    {
        MyCustomDataType.ALGORITHM = this;
        var symbol = AddData<MyCustomDataType>("<name>", Resolution.Daily).Symbol;
    }
}

public class MyCustomDataType : BaseData
{
    public static QCAlgorithm ALGORITHM;

    public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
    {
        if (!char.IsDigit(line.Trim()[0]))
        {
            // Display the line with the header
            ALGORITHM.Debug($"HEADER: {line}");
            return null;
        }
        var data = line.Split(',');
        return new MyCustomDataType()
        {
            Time = DateTime.ParseExact(data[0], "yyyyMMdd", CultureInfo.InvariantCulture),
            EndTime = Time.AddDays(1),
            Symbol = config.Symbol,
            Value = data[1].IfNotNullOrEmpty(
                s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture)),
        };
    }
}
class MyCustomDataTypeAlgorithm(QCAlgorithm):
    def initialize(self):
        MyCustomDataType.ALGORITHM = self
        self._symbol = self.add_data(MyCustomDataType, "<name>", Resolution.DAILY).Symbol

class MyCustomDataType(PythonData):
    def reader(self, config: SubscriptionDataConfig, line: str, date: datetime, is_live_mode: bool) -> BaseData:
        if not line[0].isdigit():
            # Display the line with the header
            MyCustomDataType.ALGORITHM.Debug(f"HEADER: {line}");
            return None
        data = line.split(',')
        custom = MyCustomDataType()
        custom.symbol = config.symbol
        custom.end_time = datetime.strptime(data[0], '%Y%m%d') + timedelta(1)
        custom.value = float(data[1])
        return custom

Set the Benchmark

To set your custom data source as the benchmark, in the Initialize initialize method, call the SetBenchmark set_benchmark method with the Symbol of your custom data subscription.

var symbol = AddData<MyCustomDataType>("<name>", Resolution.Daily).Symbol;
SetBenchmark(symbol);
self._symbol = self.add_data(MyCustomDataType, "<name>", Resolution.DAILY).symbol
self.set_benchmark(self._symbol)

Avoid Look-Ahead Bias

Look-ahead bias occurs when you make decisions with information that wouldn't be available until some time in the future. In backtesting, look-ahead bias occurs when you receive data earlier than it would actually be available in reality. If look-ahead bias seeps into your algorithm, it will perform differently between live trading and backtesting.

To avoid look-ahead bias, set the timestamp of data points to the time when the data would actually be available. A lot of external sources apply timestamps to data differently than we do. For instance, on some platforms, daily bars are displayed with the date that they opened. We display daily bars with the date they closed. If you set the EndTime end_time to the start of the bar, you'll receive the bar earlier in backtests than you would in live trading.

Time Modeling

Data types classes in LEAN inherit from the BaseData class that defines the Time time and EndTime end_time properties. These properties represent the time period of which the data was built. If the data type occurs in a singular point in time, they have no period, so Time time and EndTime end_time are the same. Regardless of the period, LEAN uses the time when the data sample ends, EndTime end_time , to add the sample to a Slice .

 

Custom Securities

CSV Format Example

Introduction

This page explains how to import custom data of a single security sourced in CSV format.

Data Format

The following snippet shows an example CSV file:

Date,Open,High,Low,Close,SharesTraded,Tur11er(Rs.Cr)
1997-01-01,905.2,941.4,905.2,939.55,38948210,978.21
1997-01-02,941.95,944,925.05,927.05,49118380,1150.42
1997-01-03,924.3,932.6,919.55,931.65,35263845,866.74
...
2014-07-24,7796.25,7835.65,7771.65,7830.6,117608370,6271.45
2014-07-25,7828.2,7840.95,7748.6,7790.45,153936037,7827.61
2014-07-28,7792.9,7799.9,7722.65,7748.7,116534670,6107.78

The data in the file must be in chronological order.

Define Custom Types

To define a custom data type, inherit the BaseData PythonData class and override the GetSource and Reader methods.

public class MyCustomDataType : BaseData
{
    public decimal Open;
    public decimal High;
    public decimal Low;
    public decimal Close;

    public override SubscriptionDataSource GetSource(
        SubscriptionDataConfig config,
        DateTime date,
        bool isLiveMode)
    {
        if (!isLiveMode)
        {
            return new SubscriptionDataSource("<CustomDataKey>", SubscriptionTransportMedium.ObjectStore, FileFormat.Csv);
        }
        return new SubscriptionDataSource("https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/csv-data-example.csv", SubscriptionTransportMedium.RemoteFile);
    }

    public override BaseData Reader(
        SubscriptionDataConfig config,
        string line,
        DateTime date,
        bool isLiveMode)
    {
        if (string.IsNullOrWhiteSpace(line.Trim()))
        {
            return null;
        }

        var index = new MyCustomDataType();

        try
        {
            var data = line.Split(',');
            index.Symbol = config.Symbol;
            index.Time = DateTime.Parse(data[0], CultureInfo.InvariantCulture);
            index.EndTime = index.Time.AddDays(1);
            index.Open = Convert.ToDecimal(data[1], CultureInfo.InvariantCulture);
            index.High = Convert.ToDecimal(data[2], CultureInfo.InvariantCulture);
            index.Low = Convert.ToDecimal(data[3], CultureInfo.InvariantCulture);
            index.Close = Convert.ToDecimal(data[4], CultureInfo.InvariantCulture);
            index.Value = index.Close;
        }
        catch
        {
        }
        return index;
    }
}
class MyCustomDataType(PythonData):

    def get_source(self,
         config: SubscriptionDataConfig,
         date: datetime,
         is_live: bool) -> SubscriptionDataSource:

        if not is_live:
            return SubscriptionDataSource("<custom_data_key>", SubscriptionTransportMedium.OBJECT_STORE, FileFormat.CSV)
        return SubscriptionDataSource("https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/csv-data-example.csv", SubscriptionTransportMedium.REMOTE_FILE)

    def reader(self,
         config: SubscriptionDataConfig,
         line: str,
         date: datetime,
         isLive: bool) -> BaseData:

        if not (line.strip()):
            return None

        index = MyCustomDataType()
        index.symbol = config.symbol

        try:
            data = line.split(',')
            index.time = datetime.strptime(data[0], "%Y-%m-%d")
            index.end_time = index.time + timedelta(days=1)
            index.value = data[4]
            index["open"] = float(data[1])
            index["high"] = float(data[2])
            index["low"] = float(data[3])
            index["close"] = float(data[4])

        except ValueError:
            # Do nothing
            return None

        return index

Create Subscriptions

To create a subscription for the custom type, in the Initialize initialize method, call the AddData add_data method. The AddData add_data method returns a Security object, which contains a Symbol . Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

public class MyAlgorithm : QCAlgorithm
{
    private Symbol _symbol;
    public override void Initialize()
    {
        _symbol = AddData<MyCustomDataType>("MyCustomDataType", Resolution.Daily).Symbol;
    }
}
class MyAlgorithm(QCAlgorithm): 
    def initialize(self) -> None:
        self._symbol = self.add_data(MyCustomDataType, "MyCustomDataType", Resolution.DAILY).symbol
    

The AddData add_data method creates a subscription for a single custom data asset and adds it to your user-defined universe.

Receive Custom Data

As your data reader reads your custom data file, LEAN adds the data points in the Slice it passes to your algorithm's OnData on_data method. To collect the custom data, use the Symbol symbol or name of your custom data subscription. You can access the Value value and custom properties of your custom data class from the Slice . To access the custom properties, use the custom attribute pass the property name to the GetProperty get_property method .

public class MyAlgorithm : QCAlgorithm
{
    public override void OnData(Slice slice)
    {
        if (slice.ContainsKey(_symbol))
        {
            var customData = slice[_symbol];
            var close = customData.Close;
        }
    }

    // You can also get the data directly with OnData(<dataClass>) method
    public void OnData(MyCustomDataType customData)
    {
        var close = customData.Close;
    }
}
class MyAlgorithm(QCAlgorithm):
    def on_data(self, slice: Slice) -> None:
        if slice.contains_key(self._symbol):
            custom_data = slice[self._symbol]
            close = custom_data.close

If you add custom properties to your data object in the Reader reader method, LEAN adds them as members to the data object in the Slice . To ensure the property names you add in the Reader reader method follow the convention of member names, LEAN applies the following changes to the property names you provide in the Reader reader method:

  1. - and . characters are replaced with whitespace.
  2. The first letter is capitalized.
  3. Whitespace characters are removed.

For example, if you set a property name in the Reader reader method to ['some-property.name'] , you can access it in the OnData on_data method through the Somepropertyname member of your data object.

Demonstration Algorithms

BubbleAlgorithm.py Python CustomDataNIFTYAlgorithm.py Python BubbleAlgorithm.cs C# CustomDataNIFTYAlgorithm.cs C#

 

Custom Securities

JSON Format Example

Introduction

This page explains how to import custom data of a single security sourced in JSON format.

Data Format

The following code snippet shows an example JSON file

[
    {
      "Date": "1997-01-01",
      "Open": 905.2,
      "High": 941.4,
      "Low": 905.2,
      "Close": 939.55,
      "SharesTraded": 38948210,
      "Tur11er(Rs.Cr)": 978.21
    },
    {
      "Date": "1997-01-02",
      "Open": 941.95,
      "High": 944,
      "Low": 925.05,
      "Close": 927.05,
      "SharesTraded": 49118380,
      "Tur11er(Rs.Cr)": 1150.42
    },
    ...
    {
      "Date": "2014-07-25",
      "Open": 7828.2,
      "High": 7840.95,
      "Low": 7748.6,
      "Close": 7790.45,
      "SharesTraded": 153936037,
      "Tur11er(Rs.Cr)": 7827.61
    },
    {
      "Date": "2014-07-28",
      "Open": 7792.9,
      "High": 7799.9,
      "Low": 7722.65,
      "Close": 7748.7,
      "SharesTraded": 116534670,
      "Tur11er(Rs.Cr)": 6107.78
    }
]

The data in the file must be in chronological order.

Define Custom Types

To define a custom data type, inherit the BaseData PythonData class and override the GetSource and Reader methods.

If you need to create multiple objects in your Reader reader method from a single line , follow these steps:

  1. In the GetSource get_source method, pass FileFormat.UnfoldingCollection FileFormat.UNFOLDING_COLLECTION as the third argument to the SubscriptionDataSource constructor.
  2. In the Reader reader method, order the objects by their timestamp and then return a BaseDataCollection(endTime, config.Symbol, objects) BaseDataCollection(end_time, config.symbol, objects) where objects is a list of your custom data objects.
using Newtonsoft.Json;
        
public class MyCustomDataType : BaseData
{
    [JsonProperty("Date")]
    public string Date;
    [JsonProperty("Open")]
    public decimal Open = 0;
    [JsonProperty("High")]
    public decimal High = 0;
    [JsonProperty("Low")]
    public decimal Low = 0;
    [JsonProperty("Close")]
    public decimal Close = 0;

    public override DateTime EndTime => Time.AddDays(1);

    public override SubscriptionDataSource GetSource(
        SubscriptionDataConfig config,
        DateTime date,
        bool isLiveMode)
    {
        if (!isLive)
        {
            return new SubscriptionDataSource("<customDataKey>", SubscriptionTransportMedium.ObjectStore, FileFormat.UnfoldingCollection);
        }
        return new SubscriptionDataSource("https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/unfolding-collection-example.json", SubscriptionTransportMedium.RemoteFile, FileFormat.UnfoldingCollection);
    }

    public override BaseData Reader(
        SubscriptionDataConfig config,
        string line,
        DateTime date,
        bool isLiveMode)
    {
        if (string.IsNullOrWhiteSpace(line.Trim()))
        {
            return null;
        }

        var objects = JsonConvert.DeserializeObject<List<MyCustomDataType>>(line).Select(index =>
        {
            index.Symbol = config.Symbol;
            index.Time = DateTime.Parse(x.Date, CultureInfo.InvariantCulture);
            index.Value = x.Close;
            return index;
        }).ToList();

        return new BaseDataCollection(objects.Last().EndTime, config.Symbol, objects);
    }
}
class MyCustomDataType(PythonData):
    def get_source(self,
         config: SubscriptionDataConfig,
         date: datetime,
         is_live: bool) -> SubscriptionDataSource:
        if not is_live:
            return SubscriptionDataSource("<custom_data_key>", SubscriptionTransportMedium.OBJECT_STORE, FileFormat.UNFOLDING_COLLECTION)
        return SubscriptionDataSource("https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/unfolding-collection-example.json", SubscriptionTransportMedium.REMOTE_FILE, FileFormat.UNFOLDING_COLLECTION)

    def reader(self,
         config: SubscriptionDataConfig,
         line: str,
         date: datetime,
         is_live: bool) -> BaseData:

        if not (line.strip()):
            return None

        objects = []
        data = json.loads(line)

        for datum in data:
            index = MyCustomDataType()
            index.symbol = config.symbol
            index.time = datetime.strptime(datum["Date"], "%Y-%m-%d")
            index.end_time = index.time + timedelta(1)
            index["Open"] = float(datum["Open"])
            index["High"] = float(datum["High"])
            index["Low"] = float(datum["Low"])
            index["Close"] = float(datum["Close"])
            index.value = index["Close"]
            objects.append(index)

        return BaseDataCollection(objects[-1].end_time, config.symbol, objects)

Create Subscriptions

To create a subscription for the custom type, in the Initialize initialize method, call the AddData add_data method. The AddData add_data method returns a Security object, which contains a Symbol . Save a reference to the Symbol symbol so you can use it in OnData on_data to access the security data in the Slice .

public class MyAlgorithm : QCAlgorithm
{
    private Symbol _symbol;
    public override void Initialize()
    {
        _symbol = AddData<MyCustomDataType>("MyCustomDataType", Resolution.Daily).Symbol;
    }
}
class MyAlgorithm(QCAlgorithm): 
    def initialize(self) -> None:
        self._symbol = self.add_data(MyCustomDataType, "MyCustomDataType", Resolution.DAILY).symbol
    

The AddData add_data method creates a subscription for a single custom data asset and adds it to your user-defined universe.

Receive Custom Data

As your data reader reads your custom data file, LEAN adds the data points in the Slice it passes to your algorithm's OnData on_data method. To collect the custom data, use the Symbol symbol or name of your custom data subscription. You can access the Value value and custom properties of your custom data class from the Slice . To access the custom properties, use the custom attribute pass the property name to the GetProperty get_property method .

public class MyAlgorithm : QCAlgorithm
{
    public override void OnData(Slice slice)
    {
        if (slice.ContainsKey(_symbol))
        {
            var customData = slice[_symbol];
            var close = customData.Close;
        }
    }

    // You can also get the data directly with OnData(<dataClass>) method
    public void OnData(MyCustomDataType customData)
    {
        var close = customData.Close;
    }
}
class MyAlgorithm(QCAlgorithm):
    def on_data(self, slice: Slice) -> None:
        if slice.contains_key(self._symbol):
            custom_data = slice[self._symbol]
            close = custom_data.close

If you add custom properties to your data object in the Reader reader method, LEAN adds them as members to the data object in the Slice . To ensure the property names you add in the Reader reader method follow the convention of member names, LEAN applies the following changes to the property names you provide in the Reader reader method:

  1. - and . characters are replaced with whitespace.
  2. The first letter is capitalized.
  3. Whitespace characters are removed.

For example, if you set a property name in the Reader reader method to ['some-property.name'] , you can access it in the OnData on_data method through the Somepropertyname member of your data object.

Demonstration Algorithms

CustomDataBitcoinAlgorithm.py Python CustomDataBitcoinAlgorithm.cs C#

 

Streaming Data

Custom Universes

Custom Universes

Key Concepts

Introduction

A custom universe lets you select a basket of assets from a custom dataset.

Initialize Universes

To add a custom universe to your algorithm, in the Initialize initialize method, pass your universe type and a selector function to the AddUniverse add_universe method.

AddUniverse<MyCustomUniverseDataClass>("myCustomUniverse", Resolution.Daily, SelectorFunction)
self.add_universe(MyCustomUniverseDataClass, "myCustomUniverse", Resolution.DAILY, self._selector_function)

Receive Custom Data

The universe selector function receives a list of your custom objects and must return a list of Symbol objects. In the selector function definition, you can use any of the properties of your custom data type. The Symbol objects that you return from the selector function set the constituents of the universe.

public class MyCustomUniverseAlgorithm : QCAlgorithm
{
	private IEnumerable<Symbol> SelectorFunction(IEnumerable<MyCustomUniverseDataClass> data)
	{
        return (from singleStockData in data
               where singleStockData.CustomAttribute1 > 0
               orderby singleStockData.CustomAttribute2 descending
               select singleStockData.Symbol).Take(5);
    }
}
class MyCustomUniverseAlgorithm(QCAlgorithm):
	def _selector_function(self, data: List[MyCustomUniverseDataClass]) -> List[Symbol]:
    	sorted_data = sorted([ x for x in data if x["CustomAttribute1"] > 0 ],
                         	key=lambda x: x["CustomAttribute2"],
                         	reverse=True)
    	return [x.symbol for x in sorted_data[:5]]

 

Custom Universes

CSV Format Example

Introduction

This page explains how to import custom data for universe selection sourced in CSV format.

Data Format

You must create a file with data in CSV format. Ensure the data in the file is in chronological order.

20170704,SPY,QQQ,FB,AAPL,IWM
20170706,QQQ,AAPL,IWM,FB,GOOGL
20170707,IWM,AAPL,FB,BAC,GOOGL
...
20170729,SPY,QQQ,FB,AAPL,IWM
20170801,QQQ,FB,AAPL,IWM,GOOGL
20170802,QQQ,IWM,FB,BAC,GOOGL

Define Custom Types

To define a custom data type, inherit the BaseData PythonData class and override the GetSource and Reader methods.

public class StockDataSource : BaseData
{
    public List<string> Symbols { get; set; } = new();
    public override DateTime EndTime => Time.AddDays(1);

    public override SubscriptionDataSource GetSource(
        SubscriptionDataConfig config,
        DateTime date,
        bool isLiveMode)
    {
        if (!isLiveMode)
        {
            return new SubscriptionDataSource("<CustomUniverseKey>", SubscriptionTransportMedium.ObjectStore, FileFormat.Csv);
        }
        return new SubscriptionDataSource("https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/csv-universe-example.csv", SubscriptionTransportMedium.RemoteFile, FileFormat.Csv);
    }

    public override BaseData Reader(
        SubscriptionDataConfig config,
        string line,
        DateTime date,
        bool isLiveMode)
    {
        var stocks = new StockDataSource();

        try
        {
            var csv = line.Split(',');
            stocks.Time = DateTime.ParseExact(csv[0], "yyyyMMdd", null);
            stocks.Symbols.AddRange(csv.Skip(1));
        }
        catch { return null; }

        return stocks;
    }
}
class StockDataSource(PythonData):

    def get_source(self,
         config: SubscriptionDataConfig,
         date: datetime,
         is_live: bool) -> SubscriptionDataSource:
        if not is_live:
            return SubscriptionDataSource("<custom_universe_key>", SubscriptionTransportMedium.OBJECT_STORE, FileFormat.CSV)
        return SubscriptionDataSource("https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/csv-universe-example.csv", SubscriptionTransportMedium.REMOTE_FILE, FileFormat.CSV)

    def reader(self,
         config: SubscriptionDataConfig,
         line: str,
         date: datetime,
         is_live: bool) -> BaseData:

        if not (line.strip() and line[0].isdigit()): return None
        
        stocks = StockDataSource()
        stocks.symbol = config.symbol

        try:
            csv = line.split(',')
            stocks.time = datetime.strptime(csv[0], "%Y%m%d")
            stocks.end_time = stocks.time + timedelta(days=1)
            stocks["Symbols"] = csv[1:]

        except ValueError:
            # Do nothing
            return None

        return stocks

Initialize Universe

To perform a universe selection with custom data, in the Initialize initialize method, call the AddUniverse add_universe method.

public class MyAlgorithm : QCAlgorithm
{
    public override void Initialize()
    {
        AddUniverse<StockDataSource>("myStockDataSource", Resolution.Daily, FilterFunction);
    }
}
class MyAlgorithm(QCAlgorithm): 
    def initialize(self) -> None:
        self.add_universe(StockDataSource, "my-stock-data-source", Resolution.DAILY, self._filter_function)
    

Receive Custom Data

As your data reader reads your custom data file, LEAN adds the data points into a List[StockDataSource]) IEnumerable<StockDataSource> object it passes to your algorithm's filter function. Your filter function needs to return a list of Symbol or str string object. LEAN automatically subscribes to these new assets and adds them to your algorithm.

public class MyAlgorithm : QCAlgorithm
{
    private IEnumerable<string> FilterFunction(IEnumerable<StockDataSource> stockDataSource)
    {
        return stockDataSource.SelectMany(x => x.Symbols);
    }
}
class MyAlgorithm(QCAlgorithm):
    def _filter_function(self, data: List[StockDataSource]) -> List[str]:
        symbols = []
        for item in data:
            for symbol in item["Symbols"]:
                symbols.append(symbol)
        return symbols
    

If you add custom properties to your data object in the Reader reader method, LEAN adds them as members to the data object in your filter method. To ensure the property names you add in the Reader reader method follow the convention of member names, LEAN applies the following changes to the property names you provide in the Reader reader method:

  1. - and . characters are replaced with whitespace.
  2. The first letter is capitalized.
  3. Whitespace characters are removed.

For example, if you set a property name in the Reader reader method to ['some-property.name'] , you can access it in your filter method through the Somepropertyname member of your data object.

Demonstration Algorithms

DropboxBaseDataUniverseSelectionAlgorithm.py Python DropboxBaseDataUniverseSelectionAlgorithm.cs C#

 

Custom Universes

JSON Format Example

Introduction

This page explains how to import custom data for universe selection sourced in JSON format.

Data Format

You must create a file with data in JSON format. Ensure the data in the file is in chronological order.

[
    {
      "Date": "20170704",
      "Symbols": ["SPY", "QQQ", "FB", "AAPL", "IWM"]
    },
    {
      "Date": "20170706",
      "Symbols": ["QQQ", "AAPL", "IWM", "FB", "GOOGL"]
    },
    ...
    {
      "Date": "20170801",
      "Symbols": ["QQQ", "FB", "AAPL", "IWM", "GOOGL"]
    },
    {
      "Date": "20170802",
      "Symbols": ["QQQ", "IWM", "FB", "BAC", "GOOGL"]
    }
]

Define Custom Types

To define a custom data type, inherit the BaseData PythonData class and override the GetSource and Reader methods.

If you need to create multiple objects in your Reader reader method from a single line , follow these steps:

  1. In the GetSource get_source method, pass FileFormat.UnfoldingCollection FileFormat.UNFOLDING_COLLECTION as the third argument to the SubscriptionDataSource constructor.
  2. In the Reader reader method, order the objects by their timestamp and then return a BaseDataCollection(endTime, config.Symbol, objects) BaseDataCollection(end_time, config.symbol, objects) where objects is a list of your custom data objects.
using Newtonsoft.Json;

public class StockDataSource : BaseData
{
    [JsonProperty("Symbols")]
    public List<string> Symbols { get; set; }
    [JsonProperty("Date")]
    public string Date;
    public override DateTime EndTime => Time.AddDays(1);

    public override SubscriptionDataSource GetSource(
        SubscriptionDataConfig config,
        DateTime date,
        bool isLiveMode)
    {
        if (!isLiveMode)
        {
            return new SubscriptionDataSource("<jsonUniverseKey", 
                                          SubscriptionTransportMedium.ObjectStore,
                                          FileFormat.UnfoldingCollection);
        }
        return new SubscriptionDataSource("https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/universe-example.json", 
                                          SubscriptionTransportMedium.RemoteFile,
                                          FileFormat.UnfoldingCollection);
    }

    public override BaseData Reader(
        SubscriptionDataConfig config,
        string line,
        DateTime date,
        bool isLiveMode)
    {
        var objects = JsonConvert.DeserializeObject<List<StockDataSource>>(line).Select(stocks =>
        {
            stocks.Time = DateTime.ParseExact(stocks.Date, "yyyyMMdd", null);
            return stocks;
        }).ToList();

        return new BaseDataCollection(objects.Last().EndTime, config.Symbol, objects);
    }
}
class StockDataSource(PythonData):

    def get_source(self,
         config: SubscriptionDataConfig,
         date: datetime,
         is_live: bool) -> SubscriptionDataSource:
        if not is_live:
            return SubscriptionDataSource("<json_universe_key>", SubscriptionTransportMedium.OBJECT_STORE, FileFormat.UNFOLDING_COLLECTION)
        return SubscriptionDataSource("https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/universe-example.json", 
                                      SubscriptionTransportMedium.REMOTE_FILE,
                                      FileFormat.UNFOLDING_COLLECTION)

    def reader(self,
         config: SubscriptionDataConfig,
         line: str,
         date: datetime,
         is_live: bool) -> BaseData:
        
        objects = []
        data = json.loads(line)

        for datum in data:
            stocks = StockDataSource()
            stocks.symbol = config.symbol

            stocks.time = datetime.strptime(datum["Date"], "%Y%m%d")
            stocks.end_time = stocks.time + timedelta(1)
            stocks["Symbols"] = datum["Symbols"]
            objects.append(stocks)

        return BaseDataCollection(objects[-1].end_time, config.symbol, objects)

Initialize Universe

To perform a universe selection with custom data, in the Initialize initialize method, call the AddUniverse add_universe method.

public class MyAlgorithm : QCAlgorithm
{
    public override void Initialize()
    {
        AddUniverse<StockDataSource>("myStockDataSource", Resolution.Daily, FilterFunction);
    }
}
class MyAlgorithm(QCAlgorithm): 
    def initialize(self) -> None:
        self.add_universe(StockDataSource, "my-stock-data-source", Resolution.DAILY, self._filter_function)
    

Receive Custom Data

As your data reader reads your custom data file, LEAN adds the data points into a List[StockDataSource]) IEnumerable<StockDataSource> object it passes to your algorithm's filter function. Your filter function needs to return a list of Symbol or str string object. LEAN automatically subscribes to these new assets and adds them to your algorithm.

public class MyAlgorithm : QCAlgorithm
{
    private IEnumerable<string> FilterFunction(IEnumerable<StockDataSource> stockDataSource)
    {
        return stockDataSource.SelectMany(x => x.Symbols);
    }
}
class MyAlgorithm(QCAlgorithm):
    def _filter_function(self, data: List[StockDataSource]) -> List[str]:
        symbols = []
        for item in data:
            for symbol in item["Symbols"]:
                symbols.append(symbol)
        return symbols
    

If you add custom properties to your data object in the Reader reader method, LEAN adds them as members to the data object in your filter method. To ensure the property names you add in the Reader reader method follow the convention of member names, LEAN applies the following changes to the property names you provide in the Reader reader method:

  1. - and . characters are replaced with whitespace.
  2. The first letter is capitalized.
  3. Whitespace characters are removed.

For example, if you set a property name in the Reader reader method to ['some-property.name'] , you can access it in your filter method through the Somepropertyname member of your data object.

Demonstration Algorithms

DropboxBaseDataUniverseSelectionAlgorithm.py Python DropboxBaseDataUniverseSelectionAlgorithm.cs C#

 

Importing Data

Bulk Downloads

Introduction

There are two techniques to import data into your algorithm. You can either manually import the entire file or stream the file line-by-line into your algorithm's OnData on_data event. This page explores importing an entire file for manual use.

Instead of downloading the file from a remote file provider, you can upload the file to the Object Store (with the Algorithm Lab or with the CLI ) for faster execution.

Recommended Use Cases

The batch import technique is outside of the LEAN's awareness or control, so it can't enforce good practices. However, the batch import technique is good for the loading the following datasets:

Download Files

The Download download method downloads the content served from a local file or URL and then returns it as a string.

Basic Usage

var file = Download("<filePathOrURL>");
file = self.download("<filePathOrURL>")

# If your file is in CSV format, convert it to a DataFrame with the `read_csv` method.
from io import StringIO
import pandas as pd
df = pd.read_csv(StringIO(file))

# If your file is in JSON format, parse it with the `loads` method.
import json
data = json.loads(file)

# If your file is in XML format, parse it with the `fromstring` method.
import xml.etree.ElementTree as ET
root = ET.fromstring(file)

Download Method Arguments

The Download download method can accept header settings, a username, and a password for authentication.

Argument Data Type Description Default Value
address string str A string containing the URI to download
headers IEnumerable<KeyValuePair<string, string>> Dict[str,str] Defines header values to add to the request Enumerable.Empty<KeyValuePair<string, string>>() dict()
userName user_name string str The user name associated with the credentials null None
password string str The password for the user name associated with the credentials null None

Download Request Headers

var headers = new Dictionary { { "1", "1" } };
Download(address, headers);
Download(address, headers, userName, password);
header = { "1": "1" }
self.download(address, headers)
self.download(address, headers, user_name, password)

Save Files

When you download a remote file, save it into the Object Store so that you don't have to download the file again. If you need to import the file multiple times, it's faster to import it from the Object Store rather than repeatedly downloading the file from the remote file provider.

Transport Binary Data

Follow these steps to transport binary files:

  1. Add the following imports to your local program:
  2. import pickle
    import base64
  3. Serialize your object.
  4. pickle_bytes = pickle.dumps(my_object)
    base64_str = base64.b64encode(pickle_bytes).decode('ascii')
  5. Save the string representation of your object to one of the supported sources .
  6. Download the remote file into your project.
  7. base64_str = self.download("<fileURL>")
  8. Restore the object.
  9. base64_bytes = base64_str.encode('ascii')
    model = base64.b64decode(base64_bytes)
    restored_model = pickle.loads(model)

Examples

Demonstration Algorithms
DropboxUniverseSelectionAlgorithm.cs Python DropboxCoarseFineAlgorithm.py Python NLTKSentimentTradingAlgorithm.py Python

 

Consolidating Data

Consolidating Data

Getting Started

Introduction

Consolidating data allows you to create bars of any length from smaller bars. Consolidation is commonly used to combine one-minute price bars into longer bars such as 10-20 minute bars. Consolidated bars are helpful because price movement over a longer period can sometimes contain less noise and bars of exotic length are less researched than standard bars, so they may present more opportunities to capture alpha.

To consolidate data, create a Consolidator object and register it for data. The built-in consolidators make it easy to create consolidated bars without introducing bugs. In the following sections, we will introduce the different types of consolidators and show you how to shape data into any form.

Basic Usage

The following code snippet demonstrates a simple consolidator that aggregates 1-minute bars into 10-minutes bars:

// Add some class members
private Symbol _symbol;
private TradeBarConsolidator _consolidator;

// In Initialize, subscribe to a security, create the consolidator, and register it for automatic updates
_symbol = AddEquity("SPY", Resolution.Minute).Symbol;
_consolidator = Consolidate(_symbol, TimeSpan.FromMinutes(10), ConsolidationHandler);

// Define the consolidation handler
void ConsolidationHandler(TradeBar consolidatedBar)
{
    
}
# In Initialize, subscribe to a security, create the consolidator, and register it for automatic updates
self._symbol = self.add_equity("SPY", Resolution.MINUTE).symbol
self._consolidator = self.consolidate(self._symbol, timedelta(minutes=10), self._consolidation_handler)

# Define the consolidation handler
def _consolidation_handler(self, consolidated_bar: TradeBar) -> None:
    pass

Data Shapes and Sizes

Consolidators usually produce output data that is the same format as the input data. They aggregate small TradeBar objects into a large TradeBar , small QuoteBar objects into a large QuoteBar , and Tick objects into either a TradeBar or QuoteBar .

Constructing a consolidated bar

Many asset classes in QuantConnect have data for both trades and quotes. By default, consolidators aggregate data into TradeBar objects. Forex data is the only exception, which consolidators aggregate into QuoteBar objects since Forex data doesn't have TradeBar objects.

Consolidator Types

There are many different types of consolidators you can create. The process to create and update the consolidator depends on the input data format, output data format, and the consolidation technique.

Time Period Consolidators

Time period consolidators aggregate data based on a period of time like a number of seconds, minutes, or days. If a time period consolidator aggregates data over multiple days, the multi-day aggregation cycle starts and repeats based on the time stamp of the first data point you use to update the consolidator.

The following table shows which consolidator type to use based on the data format of the input and output:

Input Output Class Type
TradeBar TradeBar TradeBarConsolidator
QuoteBar QuoteBar QuoteBarConsolidator
Tick TradeBar TickConsolidator
Tick QuoteBar TickQuoteBarConsolidator

Calendar Consolidators

Calendar consolidators aggregate data based on specific periods of time like a weekly basis, quarterly basis, or any schedule with specific start and end times. In contrast to time period consolidators, the bars that calendar consolidators produce always end on the same schedule, regardless of the first data point the consolidator receives.

The following table shows which consolidator type to use based on the data format of the input and output:

Input Output Class Type
TradeBar TradeBar TradeBarConsolidator
QuoteBar QuoteBar QuoteBarConsolidator
Tick TradeBar TickConsolidator
Tick QuoteBar TickQuoteBarConsolidator

Count Consolidators

Count consolidators aggregate data based on a number of bars or ticks. This type of consolidator aggregates n samples together, regardless of the time period the samples cover. Managing count consolidators is similiar to managing time period consolidators , except you create count consolidators with an integer argument instead of a time-based argument.

The following table shows which consolidator type to use based on the data format of the input and output:

Input Output Class Type
TradeBar TradeBar TradeBarConsolidator
QuoteBar QuoteBar QuoteBarConsolidator
Tick TradeBar TickConsolidator
Tick QuoteBar TickQuoteBarConsolidator

Mixed-Mode Consolidators

Mixed-mode consolidators are a combination of count consolidators and time period consolidators. This type of consolidator aggregates n samples together or aggregates samples over a specific time period, whichever happens first.

The following table shows which consolidator type to use based on the data format of the input and output:

Input Output Class Type
TradeBar TradeBar TradeBarConsolidator
QuoteBar QuoteBar QuoteBarConsolidator
Tick TradeBar TickConsolidator
Tick QuoteBar TickQuoteBarConsolidator

Renko Consolidators

Most Renko consolidators aggregate bars based on a fixed price movement. The RenkoConsolidator produces Renko bars by their traditional definition. In the case of a $1 bar size, the RenkoConsolidator produces bars that have a body spanning $1. The opening price of the first bar is set to the closest $1 multiple of the first trade. When the price moves by at least $1, the first bar closes. If a bar is a rising bar, the following bar closes when the price moves $1 above the closing price of the previous bar or $1 below the opening price of the previous bar. If a bar is a falling bar, the following bar closes when the price moves $1 below the closing price of the previous bar or $1 above the opening price of the previous bar. If the price jumps multiple dollars in a single tick, the RenkoConsolidator produces multiple $1 bars in a single time step.

The following table shows which consolidator type to use based on the data format of the input and output:

Input Output Class Type
TradeBar TradeBar RenkoConsolidator
QuoteBar QuoteBar RenkoConsolidator
Tick TradeBar RenkoConsolidator
Tick QuoteBar RenkoConsolidator

Classic Renko Consolidators

Most Renko consolidators aggregate bars based on a fixed price movement. The ClassicRenkoConsolidator produces a different type of Renko bars than the RenkoConsolidator . A ClassicRenkoConsolidator with a bar size of $1 produces a new bar that spans $1 every time an asset closes $1 away from the close of the previous bar. If the price jumps multiple dollars in a single tick, the ClassicRenkoConsolidator only produces one bar per time step where the open of each bar matches the close of the previous bar.

The following table shows which consolidator type to use based on the data format of the input and output:

Input Output Class Type
TradeBar TradeBar ClassicRenkoConsolidator
QuoteBar QuoteBar ClassicRenkoConsolidator
Tick TradeBar ClassicRenkoConsolidator
Tick QuoteBar ClassicRenkoConsolidator

Volume Renko Consolidators

Volume Renko consolidators aggregate bars based on a fixed trading volume. These types of bars are commonly known as volume bars. A VolumeRenkoConsolidator with a bar size of 10,000 produces a new bar every time 10,000 units of the security trades in the market. If the trading volume of a single time step exceeds two step sizes (i.e. >20,000), the VolumeRenkoConsolidator produces multiple bars in a single time step.

The following table shows which consolidator type to use based on the data format of the input and output:

Input Output Class Type
TradeBar TradeBar VolumeRenkoConsolidator
Tick TradeBar VolumeRenkoConsolidator

Range Consolidators

Most Range consolidators aggregate bars based on a fixed price movement. It is very much like a Renko Bar, but instead of consolidating a fix movement from the opening price, a Range Bar would fix the range of the whole bar, i.e. High - Low. A new bar is formed when the range of the whole bar reached a preset value, thus it completely neglects the time effect and focuses on the variance/information carried by the price movement.

The following table shows which consolidator type to use based on the data format of the input and output:

Input Output Class Type
TradeBar TradeBar RangeConsolidator
QuoteBar QuoteBar RangeConsolidator
Tick TradeBar RangeConsolidator
Tick QuoteBar RangeConsolidator

Sequential Consolidators

Sequential consolidators wire two internal consolidators together such that the output of the first consolidator is the input to the second consolidator and the output of the second consolidator is the output of the sequential consolidator.

For more information about sequential consolidators, see Combining Consolidators .

Execution Sequence

The algorithm manager calls events in the following order:

  1. Scheduled Events
  2. Consolidation event handlers
  3. OnData on_data event handler

This event flow is important to note. For instance, if your consolidation handlers or OnData on_data event handler appends data to a RollingWindow and you use that RollingWindow in your Scheduled Event, when the Scheduled Event executes, the RollingWindow won't contain the most recent data.

The consolidators are called in the order that they are updated. If you register them for automatic updates, they are updated in the order that you register them.

Plot Consolidated Data

To plot consolidated bars, call the Plot plot method with a TradeBar argument in the consolidation handler.

// In Initialize
var equity = AddEquity("SPY");
Consolidate(equity.Symbol, TimeSpan.FromMinutes(10), ConsolidationHandler);

// Define the consolidation handler
void ConsolidationHandler(TradeBar consolidatedBar)
{
    Plot("<chartName>", "<seriesName>", consolidatedBar)
}
# In Initialize
equity = self.add_equity("SPY")
self.consolidate(equity.symbol, timedelta(minutes=10), self._consolidation_handler)

# Define the consolidation handler
def _consolidation_handler(self, consolidated_bar: TradeBar) -> None:
    self.plot("<chartName>", "<seriesName>", consolidated_bar)

Examples

Demonstration Algorithms
BasicTemplateFuturesConsolidationAlgorithm.py Python BasicTemplateOptionsConsolidationAlgorithm.py Python DataConsolidationAlgorithm.py Python MultipleSymbolConsolidationAlgorithm.py Python BasicTemplateFuturesConsolidationAlgorithm.cs C# BasicTemplateOptionsConsolidationAlgorithm.cs C# DataConsolidationAlgorithm.cs C# MultipleSymbolConsolidationAlgorithm.cs C#
Video Tutorials
Quick Start Lesson 4: How do I use Consolidators? C# Opening Range Breakout - Time Period Consolidation Python

 

Consolidating Data

Consolidator Types

Consolidator Types

Time Period Consolidators

Introduction

Time period consolidators aggregate data based on a period of time like a number of seconds, minutes, or days. If a time period consolidator aggregates data over multiple days, the multi-day aggregation cycle starts and repeats based on the time stamp of the first data point you use to update the consolidator.

Consolidate Trade Bars

TradeBar consolidators aggregate TradeBar objects into TradeBar objects of the same size or larger. Follow these steps to create and manage a TradeBar consolidator based on a period of time:

  1. Create the consolidator.
  2. To set the time period for the consolidator, you can use either a timedelta TimeSpan or Resolution object. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

If the security subscription in your algorithm provides TradeBar and QuoteBar data, ResolveConsolidator resolve_consolidator returns a TradeBarConsolidator .

If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, TradeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: TradeBar) -> None:
        pass

    The consolidation event handler receives bars when the consolidated bar closes based on the data time zone . If you subscribe to minute resolution data for Bitcoin and create an hourly consolidator, you receive consolidated bars at the top of each hour. However, if you subscribe to minute resolution data for the regular trading hours of US Equities and create a daily consolidator, you receive consolidated bars at 9:31 AM Eastern Time (ET). The consolidated bar for US Equities doesn't close at 4:00 PM ET because the day isn't over. The consolidated bar for US Equities also doesn't close at midnight because your algorithm doesn't receive minute resolution data after 4:00 PM ET until 9:31 AM ET.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate helper method to create period consolidators and register them for automatic updates. With just one line of code, you can create data in any time period based on a timedelta TimeSpan or Resolution object:

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(TradeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: TradeBar) -> None:
        pass

    Consolidate Quote Bars

    QuoteBar consolidators aggregate QuoteBar objects into QuoteBar objects of the same size or larger. Follow these steps to create and manage a QuoteBar consolidator based on a period of time:

    1. Create the consolidator.
    2. To set the time period for the consolidator, you can use either a timedelta TimeSpan or Resolution object. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

    If the security subscription in your algorithm provides TradeBar and QuoteBar data, ResolveConsolidator resolve_consolidator returns a TradeBarConsolidator .

    If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, QuoteBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: QuoteBar) -> None:
        pass

    The consolidation event handler receives bars when the consolidated bar closes based on the data time zone . If you subscribe to minute resolution data for Bitcoin and create an hourly consolidator, you receive consolidated bars at the top of each hour. However, if you subscribe to minute resolution data for the regular trading hours of US Equities and create a daily consolidator, you receive consolidated bars at 9:31 AM Eastern Time (ET). The consolidated bar for US Equities doesn't close at 4:00 PM ET because the day isn't over. The consolidated bar for US Equities also doesn't close at midnight because your algorithm doesn't receive minute resolution data after 4:00 PM ET until 9:31 AM ET.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate helper method to create period consolidators and register them for automatic updates. With just one line of code, you can create data in any time period based on a timedelta TimeSpan or Resolution object:

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(QuoteBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: QuoteBar) -> None:
        pass

    Consolidate Trade Ticks

    Tick consolidators aggregate Tick objects into TradeBar objects. Follow these steps to create and manage a Tick consolidator based on a period of time:

    1. Create the consolidator.
    2. To set the time period for the consolidator, you can use either a timedelta TimeSpan or Resolution object. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

    If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, TradeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: TradeBar) -> None:
        pass

    The consolidation event handler receives bars when the consolidated bar closes based on the data time zone . If you subscribe to tick resolution data for Bitcoin and create an hourly consolidator, you receive consolidated bars at the top of each hour. However, if you subscribe to tick resolution data for the regular trading hours of US Equities and create a daily consolidator, you receive consolidated bars milliseconds after 9:30 AM Eastern Time (ET). The consolidated bar for US Equities doesn't close at 4:00 PM ET because the day isn't over. The consolidated bar for US Equities also doesn't close at midnight because your algorithm doesn't receive minute resolution data after 4:00 PM ET until milliseconds after 9:30 AM ET.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate helper method to create period consolidators and register them for automatic updates. With just one line of code, you can create data in any time period based on a timedelta TimeSpan or Resolution object:

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(TradeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: TradeBar) -> None:
        pass

    Consolidate Quote Ticks

    Tick quote bar consolidators aggregate Tick objects that represent quotes into QuoteBar objects. Follow these steps to create and manage a Tick quote bar consolidator based on a period of time:

    1. Create the consolidator.
    2. To set the time period for the consolidator, you can use either a timedelta TimeSpan or Resolution object. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

    If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, QuoteBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: QuoteBar) -> None:
        pass

    The consolidation event handler receives bars when the consolidated bar closes based on the data time zone . If you subscribe to tick resolution data for Bitcoin and create an hourly consolidator, you receive consolidated bars at the top of each hour. However, if you subscribe to tick resolution data for the regular trading hours of US Equities and create a daily consolidator, you receive consolidated bars milliseconds after 9:30 AM Eastern Time (ET). The consolidated bar for US Equities doesn't close at 4:00 PM ET because the day isn't over. The consolidated bar for US Equities also doesn't close at midnight because your algorithm doesn't receive minute resolution data after 4:00 PM ET until milliseconds after 9:30 AM ET.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate helper method to create period consolidators and register them for automatic updates. With just one line of code, you can create data in any time period based on a timedelta TimeSpan or Resolution object:

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(QuoteBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: QuoteBar) -> None:
        pass

    Consolidate Other Data

    <dataType> consolidators aggregate various types of data objects into <dataType> objects of the same size or larger. If you consolidate custom data or alternative datasets, check the definition of the data class to see its data type. Follow these steps to create and manage a <dataType> consolidator based on a period of time:

    1. Create the consolidator.
    2. To set the time period for the consolidator, you can use either a timedelta TimeSpan or Resolution object. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

    If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, <dataType> consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: <dataType>) -> None:
        pass

    The consolidation event handler receives bars when the consolidated bar closes based on the data time zone .

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate helper method to create period consolidators and register them for automatic updates. With just one line of code, you can create data in any time period based on a timedelta TimeSpan or Resolution object:

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(<dataType> consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: <dataType>) -> None:
        pass

    Examples

    Demonstration Algorithms
    BasicTemplateOptionsConsolidationAlgorithm.py Python DataConsolidationAlgorithm.py Python MultipleSymbolConsolidationAlgorithm.py Python BasicTemplateOptionsConsolidationAlgorithm.cs C# BasicTemplateFuturesConsolidationAlgorithm.cs C# DataConsolidationAlgorithm.cs C# MultipleSymbolConsolidationAlgorithm.cs C#

     

    Consolidator Types

    Calendar Consolidators

    Introduction

    Calendar consolidators aggregate data based on specific periods of time like a weekly basis, quarterly basis, or any schedule with specific start and end times. In contrast to time period consolidators, the bars that calendar consolidators produce always end on the same schedule, regardless of the first data point the consolidator receives.

    Consolidate Trade Bars

    TradeBar consolidators aggregate TradeBar objects into TradeBar objects of the same size or larger. Follow these steps to create and manage a TradeBar consolidator based on custom start and end periods:

    1. Create the consolidator.
    2. To set the time period for the consolidator, you can use the built-in CalendarInfo objects or create your own. The following list describes each technique:

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, TradeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: TradeBar) -> None:
        pass

    If you use a custom consolidation period method, LEAN passes the consolidated bar to the consolidation handler when the consolidation period ends. The Time time and EndTime end_time properties of the consolidated bar reflect the data time zone, but the Time time property of the algorithm still reflects the algorithm time zone .

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate consolidate helper method to create calendar consolidators and register them for automatic updates.

    _consolidator = Consolidate(_symbol, Calendar.Weekly, ConsolidationHandler);
    self._consolidator = self.consolidate(self._symbol, Calendar.WEEKLY, self._consolidation_handler)

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(TradeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: TradeBar) -> None:
        pass

    Consolidate Quote Bars

    QuoteBar consolidators aggregate QuoteBar objects into QuoteBar objects of the same size or larger. Follow these steps to create and manage a QuoteBar consolidator based on custom start and end periods:

    1. Create the consolidator.
    2. To set the time period for the consolidator, you can use the built-in CalendarInfo objects or create your own. The following list describes each technique:

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, QuoteBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: QuoteBar) -> None:
        pass

    If you use a custom consolidation period method, LEAN passes the consolidated bar to the consolidation handler when the consolidation period ends. The Time time and EndTime end_time properties of the consolidated bar reflect the data time zone, but the Time time property of the algorithm still reflects the algorithm time zone .

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate consolidate helper method to create calendar consolidators and register them for automatic updates.

    _consolidator = Consolidate<QuoteBar>(_symbol, Calendar.Weekly, TickType.Quote, ConsolidationHandler);
    self._consolidator = self.consolidate(self._symbol, Calendar.WEEKLY, TickType.QUOTE, self._consolidation_handler)

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(QuoteBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: QuoteBar) -> None:
        pass

    Consolidate Trade Ticks

    Tick consolidators aggregate Tick objects into TradeBar objects. Follow these steps to create and manage a Tick consolidator based on custom start and end periods:

    1. Create the consolidator.
    2. To set the time period for the consolidator, you can use the built-in CalendarInfo objects or create your own. The following list describes each technique:

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, TradeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: TradeBar) -> None:
        pass

    If you use a custom consolidation period method, LEAN passes the consolidated bar to the consolidation handler when the consolidation period ends. The Time time and EndTime end_time properties of the consolidated bar reflect the data time zone, but the Time time property of the algorithm still reflects the algorithm time zone .

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate consolidate helper method to create calendar consolidators and register them for automatic updates.

    _consolidator = Consolidate(_symbol, Calendar.Weekly, ConsolidationHandler);
    self._consolidator = self.consolidate(self._symbol, Calendar.WEEKLY, self._consolidation_handler)

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(TradeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: TradeBar) -> None:
        pass

    Consolidate Quote Ticks

    Tick quote bar consolidators aggregate Tick objects that represent quotes into QuoteBar objects. Follow these steps to create and manage a Tick quote bar consolidator based on custom start and end periods:

    1. Create the consolidator.
    2. To set the time period for the consolidator, you can use the built-in CalendarInfo objects or create your own. The following list describes each technique:

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, QuoteBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: QuoteBar) -> None:
        pass

    If you use a custom consolidation period method, LEAN passes the consolidated bar to the consolidation handler when the consolidation period ends. The Time time and EndTime end_time properties of the consolidated bar reflect the data time zone, but the Time time property of the algorithm still reflects the algorithm time zone .

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate consolidate helper method to create calendar consolidators and register them for automatic updates.

    _consolidator = Consolidate<QuoteBar>(_symbol, Calendar.Weekly, TickType.Quote, ConsolidationHandler);
    self._consolidator = self.consolidate(self._symbol, Calendar.WEEKLY, TickType.QUOTE, self._consolidation_handler)

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(QuoteBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: QuoteBar) -> None:
        pass

    Consolidate Other Data

    <dataType> consolidators aggregate various types of data objects into <dataType> objects of the same size or larger. If you consolidate custom data or alternative datasets, check the definition of the data class to see its data type. Follow these steps to create and manage a <dataType> consolidator based on custom start and end periods:

    1. Create the consolidator.
    2. To set the time period for the consolidator, you can use the built-in CalendarInfo objects or create your own. The following list describes each technique:

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, <dataType> consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: <dataType>) -> None:
        pass

    If you use a custom consolidation period method, LEAN passes the consolidated bar to the consolidation handler when the consolidation period ends. The Time time and EndTime end_time properties of the consolidated bar reflect the data time zone, but the Time time property of the algorithm still reflects the algorithm time zone .

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    You can also use the Consolidate consolidate helper method to create calendar consolidators and register them for automatic updates.

    _consolidator = Consolidate(_symbol, Calendar.Weekly, ConsolidationHandler);
    self._consolidator = self.consolidate(self._symbol, Calendar.WEEKLY, self._consolidation_handler)

    If you use the Consolidate consolidate helper method, the consolidation handler doesn't receive an object argument.

    void ConsolidationHandler(<dataType> consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, consolidated_bar: <dataType>) -> None:
        pass

    Examples

    The following examples are typical calendar functions you may want.

    The function should receive a datetime DateTime object that's based in the algorithm time zone and should return a CalendarInfo object, which contains the start time of the bar in the data time zone and the duration of the consolidation period. This function is evaluated when the duration of the consolidation period has passed and at the following time step.

    The preceding sections of this page provide a typical calendar function that consolidates data weekly, starting at 5:00 PM. If you consolidate US Equity and Crypto data, the event handler triggers at different times since the data time zone of US Equity is America/New York and Crypto is UTC.

    Example 1: Consolidate data into 20-minute TradeBar objects that start at 9:30 AM

    This is a typical case for the US markets because they open every business day at 9:30 PM Eastern Time (ET).

    public CalendarInfo EveryTwentyMinuteAfterEquityMarketOpen(DateTime datetime)
    {
        var period = TimeSpan.FromMinutes(20);
        var openTime = datetime.Date + new TimeSpan(9, 30, 0);
        var start = openTime + (int)((datetime - openTime) / period) * period;            
        return new CalendarInfo(start, period);
    }
    def _every_twenty_minute_after_equity_market_open(self, dt: datetime) -> CalendarInfo:
        period = timedelta(minutes=20)
        open_time = dt.replace(hour=9, minute=30, second=0, microsecond=0)
        start = open_time + int((dt - open_time) / period) * period
        return CalendarInfo(start, period)

    To consolidate data into another period, change the period variable. For example, to consolidate into 4-hour bars, replace timedelta(minutes=20) TimeSpan.FromMinutes(20) with timedelta(hours=4) TimeSpan.FromHours(4).

    Example 2: Consolidate data in daily QuoteBar objects that start at 5 PM:

    This is a typical Forex case because the Forex market opens on Sunday at 5 PM ET.

    public CalendarInfo CustomDailyForex(DateTime datetime)
    {
        var start = datetime.Date
            .AddHours(datetime.Hour < 17 ? -7 : 17);
        return new CalendarInfo(start, TimeSpan.FromDays(1));
    }
    def _custom_daily_forex(self, dt: datetime) -> CalendarInfo:
    start = dt.replace(hour=17, minute=0, second=0)
    if dt.hour < 17:
        start -= timedelta(1)
    return CalendarInfo(start, timedelta(1))

    Example 3: Consolidate data into monthly TradeBar objects that start at midnight:

    public CalendarInfo CustomMonthly(DateTime datetime)
    {
        var start = dt.AddDays(1 - dt.Day).Date;
        var end = dt.AddMonths(1);
        end = new DateTime(end.Year, end.Month, 1);
        return new CalendarInfo(start, (end - start));
    }
    def _custom_monthly(self, dt: datetime) -> CalendarInfo:
        start = dt.replace(day=1).date()
        end = dt.replace(day=28) + timedelta(4)
        end = (end - timedelta(end.day - 1)).date()
        return CalendarInfo(start, end - start)
    Demonstration Algorithms
    DataConsolidationAlgorithm.py Python DataConsolidationAlgorithm.cs C#

     

    Consolidator Types

    Count Consolidators

    Introduction

    Count consolidators aggregate data based on a number of bars or ticks. This type of consolidator aggregates n samples together, regardless of the time period the samples cover. Managing count consolidators is similiar to managing time period consolidators , except you create count consolidators with an integer argument instead of a time-based argument.

    Consolidate Trade Bars

    TradeBar consolidators aggregate TradeBar objects into TradeBar objects of the same size or larger. Follow these steps to create and manage a TradeBar consolidator based on a number of samples:

    1. Create the consolidator.
    2. To create a count consolidator, pass the number of samples to the consolidator constructor.

      _consolidator = new TradeBarConsolidator(10);
      self._consolidator = TradeBarConsolidator(10)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, TradeBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: TradeBar) -> None:
          pass

      When the consolidator receives the n -th data point, it passes the consolidated bar to the event handler.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Bars

    QuoteBar consolidators aggregate QuoteBar objects into QuoteBar objects of the same size or larger. Follow these steps to create and manage a QuoteBar consolidator based on a number of samples:

    1. Create the consolidator.
    2. To create a count consolidator, pass the number of samples to the consolidator constructor.

      _consolidator = new QuoteBarConsolidator(10);
      self._consolidator = QuoteBarConsolidator(10)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, QuoteBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: QuoteBar) -> None:
          pass

      When the consolidator receives the n -th data point, it passes the consolidated bar to the event handler.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Trade Ticks

    Tick consolidators aggregate Tick objects into TradeBar objects. Follow these steps to create and manage a Tick consolidator based on a number of samples:

    1. Create the consolidator.
    2. To create a count consolidator, pass the number of samples to the consolidator constructor.

      _consolidator = new TickConsolidator(10);
      self._consolidator = TickConsolidator(10)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, TradeBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: TradeBar) -> None:
          pass

      When the consolidator receives the n -th data point, it passes the consolidated bar to the event handler.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Ticks

    Tick quote bar consolidators aggregate Tick objects that represent quotes into QuoteBar objects. Follow these steps to create and manage a Tick quote bar consolidator based on a number of samples:

    1. Create the consolidator.
    2. To create a count consolidator, pass the number of samples to the consolidator constructor.

      _consolidator = new TickQuoteBarConsolidator(10);
      self._consolidator = TickQuoteBarConsolidator(10)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, QuoteBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: QuoteBar) -> None:
          pass

      When the consolidator receives the n -th data point, it passes the consolidated bar to the event handler.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Other Data

    <dataType> consolidators aggregate various types of data objects into <dataType> objects of the same size or larger. If you consolidate custom data or alternative datasets, check the definition of the data class to see its data type. Follow these steps to create and manage a <dataType> consolidator based on a number of samples:

    1. Create the consolidator.
    2. To create a count consolidator, pass the number of samples to the consolidator constructor.

      _consolidator = new DynamicDataConsolidator(10);
      self._consolidator = DynamicDataConsolidator(10)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, <dataType> consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: <dataType>) -> None:
          pass

      When the consolidator receives the n -th data point, it passes the consolidated bar to the event handler.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Examples

    Demonstration Algorithms
    DataConsolidationAlgorithm.py Python DataConsolidationAlgorithm.cs C#

     

    Consolidator Types

    Mixed-Mode Consolidators

    Introduction

    Mixed-mode consolidators are a combination of count consolidators and time period consolidators. This type of consolidator aggregates n samples together or aggregates samples over a specific time period, whichever happens first.

    Consolidate Trade Bars

    TradeBar consolidators aggregate TradeBar objects into TradeBar objects of the same size or larger. Follow these steps to create and manage a TradeBar consolidator based on a period of time or a number of samples, whichever occurs first:

    1. Create the consolidator.
    2. To create a mixed-mode consolidator, pass a timedelta TimeSpan object and an integer to the consolidator constructor. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

      _consolidator = new TradeBarConsolidator(10, TimeSpan.FromDays(1));
      self._consolidator = TradeBarConsolidator(10, timedelta(days=1))

      The time period is relative to the data time zone , not the algorithm time zone . If you consolidate Crypto data into daily bars, the event handler receives the consolidated bars at midnight 12:00 AM Coordinated Universal Time (UTC), regardless of the algorithm time zone.

      If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, TradeBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: TradeBar) -> None:
          pass

      The consolidation event handler receives bars when the consolidated bar closes based on the data time zone or the number of samples, whichever occurs first. If you subscribe to minute resolution data for Bitcoin and create an hourly consolidator, you receive consolidated bars at the top of each hour. However, if you subscribe to minute resolution data for the regular trading hours of US Equities and create a daily consolidator, you receive consolidated bars at 9:31 AM Eastern Time (ET). The consolidated bar for US Equities doesn't close at 4:00 PM ET because the day isn't over. The consolidated bar for US Equities also doesn't close at midnight because your algorithm doesn't receive minute resolution data after 4:00 PM ET until 9:31 AM ET.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Bars

    QuoteBar consolidators aggregate QuoteBar objects into QuoteBar objects of the same size or larger. Follow these steps to create and manage a QuoteBar consolidator based on a period of time or a number of samples, whichever occurs first:

    1. Create the consolidator.
    2. To create a mixed-mode consolidator, pass a timedelta TimeSpan object and an integer to the consolidator constructor. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

      _consolidator = new QuoteBarConsolidator(10, TimeSpan.FromDays(1));
      self._consolidator = QuoteBarConsolidator(10, timedelta(days=1))

      The time period is relative to the data time zone , not the algorithm time zone . If you consolidate Crypto data into daily bars, the event handler receives the consolidated bars at midnight 12:00 AM Coordinated Universal Time (UTC), regardless of the algorithm time zone.

      If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, QuoteBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: QuoteBar) -> None:
          pass

      The consolidation event handler receives bars when the consolidated bar closes based on the data time zone or the number of samples, whichever occurs first. If you subscribe to minute resolution data for Bitcoin and create an hourly consolidator, you receive consolidated bars at the top of each hour. However, if you subscribe to minute resolution data for the regular trading hours of US Equities and create a daily consolidator, you receive consolidated bars at 9:31 AM Eastern Time (ET). The consolidated bar for US Equities doesn't close at 4:00 PM ET because the day isn't over. The consolidated bar for US Equities also doesn't close at midnight because your algorithm doesn't receive minute resolution data after 4:00 PM ET until 9:31 AM ET.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Trade Ticks

    Tick consolidators aggregate Tick objects into TradeBar objects. Follow these steps to create and manage a Tick consolidator based on a period of time or a number of samples, whichever occurs first:

    1. Create the consolidator.
    2. To create a mixed-mode consolidator, pass a timedelta TimeSpan object and an integer to the consolidator constructor. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

      _consolidator = new TickConsolidator(10, TimeSpan.FromMilliseconds(100));
      self._consolidator = TickConsolidator(10, timedelta(milliseconds=100))

      The time period is relative to the data time zone , not the algorithm time zone . If you consolidate Crypto data into daily bars, the event handler receives the consolidated bars at midnight 12:00 AM Coordinated Universal Time (UTC), regardless of the algorithm time zone.

      If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, TradeBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: TradeBar) -> None:
          pass

      The consolidation event handler receives bars when the consolidated bar closes based on the data time zone or the number of samples, whichever occurs first. If you subscribe to tick resolution data for Bitcoin and create an hourly consolidator, you receive consolidated bars at the top of each hour. However, if you subscribe to tick resolution data for the regular trading hours of US Equities and create a daily consolidator, you receive consolidated bars milliseconds after 9:30 AM Eastern Time (ET). The consolidated bar for US Equities doesn't close at 4:00 PM ET because the day isn't over. The consolidated bar for US Equities also doesn't close at midnight because your algorithm doesn't receive minute resolution data after 4:00 PM ET until milliseconds after 9:30 AM ET.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Ticks

    Tick quote bar consolidators aggregate Tick objects that represent quotes into QuoteBar objects. Follow these steps to create and manage a Tick quote bar consolidator based on a period of time or a number of samples, whichever occurs first:

    1. Create the consolidator.
    2. To create a mixed-mode consolidator, pass a timedelta TimeSpan object and an integer to the consolidator constructor. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

      _consolidator = new TickQuoteBarConsolidator(10, TimeSpan.FromMilliseconds(100));
      self._consolidator = TickQuoteBarConsolidator(10, timedelta(milliseconds=100))

      The time period is relative to the data time zone , not the algorithm time zone . If you consolidate Crypto data into daily bars, the event handler receives the consolidated bars at midnight 12:00 AM Coordinated Universal Time (UTC), regardless of the algorithm time zone.

      If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, QuoteBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: QuoteBar) -> None:
          pass

      The consolidation event handler receives bars when the consolidated bar closes based on the data time zone or the number of samples, whichever occurs first. If you subscribe to tick resolution data for Bitcoin and create an hourly consolidator, you receive consolidated bars at the top of each hour. However, if you subscribe to tick resolution data for the regular trading hours of US Equities and create a daily consolidator, you receive consolidated bars milliseconds after 9:30 AM Eastern Time (ET). The consolidated bar for US Equities doesn't close at 4:00 PM ET because the day isn't over. The consolidated bar for US Equities also doesn't close at midnight because your algorithm doesn't receive minute resolution data after 4:00 PM ET until milliseconds after 9:30 AM ET.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Other Data

    <dataType> consolidators aggregate various types of data objects into <dataType> objects of the same size or larger. If you consolidate custom data or alternative datasets, check the definition of the data class to see its data type. Follow these steps to create and manage a <dataType> consolidator based on a period of time or a number of samples, whichever occurs first:

    1. Create the consolidator.
    2. To create a mixed-mode consolidator, pass a timedelta TimeSpan object and an integer to the consolidator constructor. The consolidator time period must be greater than or equal to the resolution of the security subscription. For instance, you can aggregate minute bars into 10-minute bars, but you can't aggregate hour bars into 10-minute bars.

      _consolidator = new DynamicDataConsolidator(10, TimeSpan.FromDays(1));
      self._consolidator = DynamicDataConsolidator(10, timedelta(days=1))

      The time period is relative to the data time zone , not the algorithm time zone . If you consolidate Crypto data into daily bars, the event handler receives the consolidated bars at midnight 12:00 AM Coordinated Universal Time (UTC), regardless of the algorithm time zone.

      If you consolidate on an hourly basis, the consolidator ends at the top of the hour, not every hour after the market open. For US Equities, that's 10 AM Eastern Time (ET), not 10:30 AM ET.

    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, <dataType> consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: <dataType>) -> None:
          pass

      The consolidation event handler receives bars when the consolidated bar closes based on the data time zone or the number of samples, whichever occurs first.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

     

    Consolidator Types

    Renko Consolidators

    Renko Consolidators

    Renko Consolidators

    Introduction

    Most Renko consolidators aggregate bars based on a fixed price movement. The RenkoConsolidator produces Renko bars by their traditional definition. In the case of a $1 bar size, the RenkoConsolidator produces bars that have a body spanning $1. The opening price of the first bar is set to the closest $1 multiple of the first trade. When the price moves by at least $1, the first bar closes. If a bar is a rising bar, the following bar closes when the price moves $1 above the closing price of the previous bar or $1 below the opening price of the previous bar. If a bar is a falling bar, the following bar closes when the price moves $1 below the closing price of the previous bar or $1 above the opening price of the previous bar. If the price jumps multiple dollars in a single tick, the RenkoConsolidator produces multiple $1 bars in a single time step.

    RenkoBar sample

    Consolidate Trade Bars

    TradeBar consolidators aggregate TradeBar objects into RenkoBar objects. Follow these steps to create and manage a TradeBar consolidator based on the traditional Renko bar rules:

    1. Create the consolidator.
    2. To create a Renko consolidator, pass the bar size to the RenkoConsolidator constructor.

      // Create a Renko consolidator that emits a bar when the price moves $1
      _consolidator = new RenkoConsolidator(1m);
      # Create a Renko consolidator that emits a bar when the price moves $1
      self._consolidator = RenkoConsolidator(1)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, RenkoBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: RenkoBar) -> None:
          pass

      The consolidation event handler receives bars when the price movement forms a new Renko bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Bars

    QuoteBar consolidators aggregate QuoteBar objects into RenkoBar objects. Follow these steps to create and manage a QuoteBar consolidator based on the traditional Renko bar rules:

    1. Create the consolidator.
    2. To create a Renko consolidator, pass the bar size to the RenkoConsolidator constructor.

      // Create a Renko consolidator that emits a bar when the price moves $1
      _consolidator = new RenkoConsolidator(1m);
      # Create a Renko consolidator that emits a bar when the price moves $1
      self._consolidator = RenkoConsolidator(1)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, RenkoBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: RenkoBar) -> None:
          pass

      The consolidation event handler receives bars when the price movement forms a new Renko bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Trade Ticks

    Tick consolidators aggregate Tick objects into RenkoBar objects. Follow these steps to create and manage a Tick consolidator based on the traditional Renko bar rules:

    1. Create the consolidator.
    2. To create a Renko consolidator, pass the bar size to the RenkoConsolidator constructor.

      // Create a Renko consolidator that emits a bar when the price moves $1
      _consolidator = new RenkoConsolidator(1m);
      # Create a Renko consolidator that emits a bar when the price moves $1
      self._consolidator = RenkoConsolidator(1)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, RenkoBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: RenkoBar) -> None:
          pass

      The consolidation event handler receives bars when the price movement forms a new Renko bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Ticks

    Tick quote bar consolidators aggregate Tick objects that represent quotes into RenkoBar objects. Follow these steps to create and manage a Tick quote bar consolidator based on the traditional Renko bar rules:

    1. Create the consolidator.
    2. To create a Renko consolidator, pass the bar size to the RenkoConsolidator constructor.

      // Create a Renko consolidator that emits a bar when the price moves $1
      _consolidator = new RenkoConsolidator(1m);
      # Create a Renko consolidator that emits a bar when the price moves $1
      self._consolidator = RenkoConsolidator(1)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, RenkoBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: RenkoBar) -> None:
          pass

      The consolidation event handler receives bars when the price movement forms a new Renko bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

     

    Renko Consolidators

    Classic Renko Consolidators

    Introduction

    Most Renko consolidators aggregate bars based on a fixed price movement. The ClassicRenkoConsolidator produces a different type of Renko bars than the RenkoConsolidator . A ClassicRenkoConsolidator with a bar size of $1 produces a new bar that spans $1 every time an asset closes $1 away from the close of the previous bar. If the price jumps multiple dollars in a single tick, the ClassicRenkoConsolidator only produces one bar per time step where the open of each bar matches the close of the previous bar.

    Consolidate Trade Bars

    TradeBar consolidators aggregate TradeBar objects into RenkoBar objects. Follow these steps to create and manage a TradeBar consolidator based on the preceding Renko bar rules:

    1. Create the consolidator.
    2. To create a classic Renko consolidator, pass the bar size to the ClassicRenkoConsolidator constructor.

      // Create a Classic Renko consolidator that emits a bar when the price moves $1
      _consolidator = new ClassicRenkoConsolidator(1m);
      # Create a Classic Renko consolidator that emits a bar when the price moves $1
      self._consolidator = ClassicRenkoConsolidator(1)

      The ClassicRenkoConsolidator has the following default behavior:

    To build the Renko bars with a different property than the Value value of the IBaseData object, provide a selector argument. The selector should be a function that receives the IBaseData object and returns a decimal value.

    self._consolidator = ClassicRenkoConsolidator(1, selector = lambda data: data.high)
    _consolidator = new ClassicRenkoConsolidator(1m, data => (data as TradeBar).High);

    To add a non-zero Volume volume property to the Renko bars, provide a volumeSelector volume_selector argument. The volumeSelector volume_selector should be a function that receives the IBaseData object and returns a decimal value.

    self._consolidator = ClassicRenkoConsolidator(1, volume_selector = lambda data: data.volume)
    _consolidator = new ClassicRenkoConsolidator(1m, null, data => (data as TradeBar).Volume);

    To relax the requirement that the open and close of the Renko bars must be a multiple of bar size, disable the evenBars even_bars argument. If you disable evenBars even_bars , the open value of the first Renko bar is set to the first value from the selector . The following opening and closing Renko bar values are all multiples of the first value from the selector

    self._consolidator = ClassicRenkoConsolidator(1, even_bars=False)
    _consolidator = new ClassicRenkoConsolidator(1m, evenBars: false);
  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, RenkoBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: RenkoBar) -> None:
        pass

    The consolidation event handler receives bars when the price movement forms a new classic Renko bar.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Bars

    QuoteBar consolidators aggregate QuoteBar objects into RenkoBar objects. Follow these steps to create and manage a QuoteBar consolidator based on the preceding Renko bar rules:

    1. Create the consolidator.
    2. To create a classic Renko consolidator, pass the bar size to the ClassicRenkoConsolidator constructor.

      // Create a Classic Renko consolidator that emits a bar when the price moves $1
      _consolidator = new ClassicRenkoConsolidator(1m);
      # Create a Classic Renko consolidator that emits a bar when the price moves $1
      self._consolidator = ClassicRenkoConsolidator(1)

      The ClassicRenkoConsolidator has the following default behavior:

    The following arguments enable you to create Renko bars that aggregate the excess liquidity on the bid.

    self._consolidator = ClassicRenkoConsolidator(10, lambda data: data.value, lambda data: data.last_bid_size - data.last_ask_size)
    _consolidator = new ClassicRenkoConsolidator(10, null, 
        data => (data as QuoteBar).LastBidSize - (data as QuoteBar).LastAskSize);

    To relax the requirement that the open and close of the Renko bars must be a multiple of bar size, disable the evenBars even_bars argument. If you disable evenBars even_bars , the open value of the first Renko bar is set to the first value from the selector . The following opening and closing Renko bar values are all multiples of the first value from the selector

    self._consolidator = ClassicRenkoConsolidator(1, even_bars=False)
    _consolidator = new ClassicRenkoConsolidator(1m, evenBars: false);
  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, RenkoBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: RenkoBar) -> None:
        pass

    The consolidation event handler receives bars when the price movement forms a new classic Renko bar.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Trade Ticks

    Tick consolidators aggregate Tick objects into RenkoBar objects. Follow these steps to create and manage a Tick consolidator based on the preceding Renko bar rules:

    1. Create the consolidator.
    2. To create a classic Renko consolidator, pass the bar size to the ClassicRenkoConsolidator constructor.

      // Create a Classic Renko consolidator that emits a bar when the price moves $1
      _consolidator = new ClassicRenkoConsolidator(1m);
      # Create a Classic Renko consolidator that emits a bar when the price moves $1
      self._consolidator = ClassicRenkoConsolidator(1)

      The ClassicRenkoConsolidator has the following default behavior:

    To relax the requirement that the open and close of the Renko bars must be a multiple of bar size, disable the evenBars even_bars argument. If you disable evenBars even_bars , the open value of the first Renko bar is set to the first value from the selector . The following opening and closing Renko bar values are all multiples of the first value from the selector

    self._consolidator = ClassicRenkoConsolidator(1, even_bars=False)
    _consolidator = new ClassicRenkoConsolidator(1m, evenBars: false);
  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, RenkoBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: RenkoBar) -> None:
        pass

    The consolidation event handler receives bars when the price movement forms a new classic Renko bar.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Ticks

    Tick quote bar consolidators aggregate Tick objects that represent quotes into RenkoBar objects. Follow these steps to create and manage a Tick quote bar consolidator based on the preceding Renko bar rules:

    1. Create the consolidator.
    2. To create a classic Renko consolidator, pass the bar size to the ClassicRenkoConsolidator constructor.

      // Create a Classic Renko consolidator that emits a bar when the price moves $1
      _consolidator = new ClassicRenkoConsolidator(1m);
      # Create a Classic Renko consolidator that emits a bar when the price moves $1
      self._consolidator = ClassicRenkoConsolidator(1)

      The ClassicRenkoConsolidator has the following default behavior:

    To relax the requirement that the open and close of the Renko bars must be a multiple of bar size, disable the evenBars even_bars argument. If you disable evenBars even_bars , the open value of the first Renko bar is set to the first value from the selector . The following opening and closing Renko bar values are all multiples of the first value from the selector

    self._consolidator = ClassicRenkoConsolidator(1, even_bars=False)
    _consolidator = new ClassicRenkoConsolidator(1m, evenBars: false);
  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, RenkoBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: RenkoBar) -> None:
        pass

    The consolidation event handler receives bars when the price movement forms a new classic Renko bar.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Examples

    Demonstration Algorithms
    ClassicRenkoConsolidatorAlgorithm.py Python ClassicRenkoConsolidatorAlgorithm.cs C#

     

    Renko Consolidators

    Volume Renko Consolidators

    Introduction

    Volume Renko consolidators aggregate bars based on a fixed trading volume. These types of bars are commonly known as volume bars. A VolumeRenkoConsolidator with a bar size of 10,000 produces a new bar every time 10,000 units of the security trades in the market. If the trading volume of a single time step exceeds two step sizes (i.e. >20,000), the VolumeRenkoConsolidator produces multiple bars in a single time step.

    Consolidate Trade Bars

    TradeBar consolidators aggregate TradeBar objects into VolumeRenkoBar objects. Follow these steps to create and manage a TradeBar consolidator based on custom set volume traded:

    1. Create the consolidator.
    2. To create a Volume Renko consolidator, pass the bar size to the VolumeRenkoConsolidator constructor.

      // Create a Volume Renko consolidator that emits a bar every time 10,000 units trade
      _consolidator = new VolumeRenkoConsolidator(10000m);
      # Create a Volume Renko consolidator that emits a bar every time 10,000 units trade
      self._consolidator = VolumeRenkoConsolidator(10000)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, VolumeRenkoBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: VolumeRenkoBar) -> None:
          pass

      The consolidation event handler receives bars when the trading volume forms a new Volume Renko bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Trade Ticks

    Tick consolidators aggregate Tick objects into VolumeRenkoBar objects. Follow these steps to create and manage a Tick consolidator based on custom set volume traded:

    1. Create the consolidator.
    2. To create a Volume Renko consolidator, pass the bar size to the VolumeRenkoConsolidator constructor.

      // Create a Volume Renko consolidator that emits a bar every time 10,000 units trade
      _consolidator = new VolumeRenkoConsolidator(10000m);
      # Create a Volume Renko consolidator that emits a bar every time 10,000 units trade
      self._consolidator = VolumeRenkoConsolidator(10000)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, VolumeRenkoBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: VolumeRenkoBar) -> None:
          pass

      The consolidation event handler receives bars when the trading volume forms a new Volume Renko bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Examples

    Demonstration Algorithms
    VolumeRenkoConsolidatorAlgorithm.py Python VolumeRenkoConsolidatorAlgorithm.cs C#

     

    Consolidator Types

    Range Consolidators

    Range Consolidators

    Range Consolidators

    Introduction

    Most Range consolidators aggregate bars based on a fixed price movement. It is very much like a Renko Bar, but instead of consolidating a fix movement from the opening price, a Range Bar would fix the range of the whole bar, i.e. High - Low. A new bar is formed when the range of the whole bar reached a preset value, thus it completely neglects the time effect and focuses on the variance/information carried by the price movement.

    RangeBar sample

    Consolidate Trade Bars

    TradeBar consolidators aggregate TradeBar objects into RangeBar objects. Follow these steps to create and manage a TradeBar consolidator based on the preset range of price movement:

    1. Create the consolidator.
    2. To create a Range consolidator, pass the bar size to the RangeConsolidator constructor.

      // Create a Range consolidator that emits a bar when the high and low differs $1
      _consolidator = new RangeConsolidator(1m);
      # Create a Range consolidator that emits a bar when the high and low differs $1
      self._consolidator = RangeConsolidator(1)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, RangeBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: RangeBar) -> None:
          pass

      The consolidation event handler receives bars when the price movement forms a new Range bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Bars

    QuoteBar consolidators aggregate QuoteBar objects into RangeBar objects. Follow these steps to create and manage a QuoteBar consolidator based on the preset range of price movement:

    1. Create the consolidator.
    2. To create a Range consolidator, pass the bar size to the RangeConsolidator constructor.

      // Create a Range consolidator that emits a bar when the high and low differs $1
      _consolidator = new RangeConsolidator(1m);
      # Create a Range consolidator that emits a bar when the high and low differs $1
      self._consolidator = RangeConsolidator(1)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, RangeBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: RangeBar) -> None:
          pass

      The consolidation event handler receives bars when the price movement forms a new Range bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Trade Ticks

    Tick consolidators aggregate Tick objects into RangeBar objects. Follow these steps to create and manage a Tick consolidator based on the preset range of price movement:

    1. Create the consolidator.
    2. To create a Range consolidator, pass the bar size to the RangeConsolidator constructor.

      // Create a Range consolidator that emits a bar when the high and low differs $1
      _consolidator = new RangeConsolidator(1m);
      # Create a Range consolidator that emits a bar when the high and low differs $1
      self._consolidator = RangeConsolidator(1)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, RangeBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: RangeBar) -> None:
          pass

      The consolidation event handler receives bars when the price movement forms a new Range bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Ticks

    Tick quote bar consolidators aggregate Tick objects that represent quotes into RangeBar objects. Follow these steps to create and manage a Tick quote bar consolidator based on the preset range of price movement:

    1. Create the consolidator.
    2. To create a Range consolidator, pass the bar size to the RangeConsolidator constructor.

      // Create a Range consolidator that emits a bar when the high and low differs $1
      _consolidator = new RangeConsolidator(1m);
      # Create a Range consolidator that emits a bar when the high and low differs $1
      self._consolidator = RangeConsolidator(1)
    3. Add an event handler to the consolidator.
    4. _consolidator.DataConsolidated += ConsolidationHandler;
      self._consolidator.data_consolidated += self._consolidation_handler

      LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

    5. Define the consolidation handler.
    6. void ConsolidationHandler(object sender, RangeBar consolidatedBar)
      {
      
      }
      def _consolidation_handler(self, sender: object, consolidated_bar: RangeBar) -> None:
          pass

      The consolidation event handler receives bars when the price movement forms a new Range bar.

    7. Update the consolidator.
    8. You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Examples

    Demonstration Algorithms
    RangeConsolidatorAlgorithm.py Python RangeConsolidatorWithTickAlgorithm.py Python RangeConsolidatorAlgorithm.cs C# RangeConsolidatorWithTickAlgorithm.cs C#

     

    Range Consolidators

    Classic Range Consolidators

    Introduction

    Most Range consolidators aggregate bars based on a fixed price range movement. The ClassicRangeConsolidator produces a different type of Range bars than the RangeConsolidator . A ClassicRangeConsolidator with a bar size of $1 produces a new bar that spans $1 every time an asset's price range moves $1. If the price jumps multiple dollars in a single tick, the ClassicRangeConsolidator only produces one bar per time step where the open of each bar matches the close of the previous bar.

    Consolidate Trade Bars

    TradeBar consolidators aggregate TradeBar objects into RangeBar objects. Follow these steps to create and manage a TradeBar consolidator based on the preceding Range bar rules:

    1. Create the consolidator.
    2. To create a classic Range consolidator, pass the bar size to the ClassicRangeConsolidator constructor.

      // Create a Classic Range consolidator that emits a bar when the price range moves $1
      _consolidator = new ClassicRangeConsolidator(1m);
      # Create a Classic Range consolidator that emits a bar when the price range moves $1
      self._consolidator = ClassicRangeConsolidator(1)

      The ClassicRangeConsolidator has the following default behavior:

    To build the Range bars with a different property than the Value value of the IBaseData object, provide a selector argument. The selector should be a function that receives the IBaseData object and returns a decimal value.

    self._consolidator = ClassicRangeConsolidator(1, selector=lambda data: data.high)
    _consolidator = new ClassicRangeConsolidator(1m, data => (data as TradeBar).High);

    To add a non-zero Volume volume property to the Range bars, provide a volumeSelector volume_selector argument. The volumeSelector volume_selector should be a function that receives the IBaseData object and returns a decimal value.

    self._consolidator = ClassicRangeConsolidator(1, volume_selector=lambda data: data.volume)
    _consolidator = new ClassicRangeConsolidator(1m, null, data => (data as TradeBar).Volume);
  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, RangeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: RangeBar) -> None:
        pass

    The consolidation event handler receives bars when the price movement forms a new classic Range bar.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Bars

    QuoteBar consolidators aggregate QuoteBar objects into RangeBar objects. Follow these steps to create and manage a QuoteBar consolidator based on the preceding Range bar rules:

    1. Create the consolidator.
    2. To create a classic Range consolidator, pass the bar size to the ClassicRangeConsolidator constructor.

      // Create a Classic Range consolidator that emits a bar when the price range moves $1
      _consolidator = new ClassicRangeConsolidator(1m);
      # Create a Classic Range consolidator that emits a bar when the price range moves $1
      self._consolidator = ClassicRangeConsolidator(1)

      The ClassicRangeConsolidator has the following default behavior:

    The following arguments enable you to create Range bars that aggregate the excessive bid-ask spread on the asset. It can help market-making algorithms to track wider spread opportunities.

    self._consolidator = ClassicRangeConsolidator(10, lambda data: data.value, lambda data: data.last_bid_size - data.last_ask_size)
    _consolidator = new ClassicRangeConsolidator(10, null, 
        data => (data as QuoteBar).LastBidSize - (data as QuoteBar).LastAskSize);
  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, RangeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: RangeBar) -> None:
        pass

    The consolidation event handler receives bars when the price movement forms a new classic Range bar.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Trade Ticks

    Tick consolidators aggregate Tick objects into RangeBar objects. Follow these steps to create and manage a Tick consolidator based on the preceding Range bar rules:

    1. Create the consolidator.
    2. To create a classic Range consolidator, pass the bar size to the ClassicRangeConsolidator constructor.

      // Create a Classic Range consolidator that emits a bar when the price range moves $1
      _consolidator = new ClassicRangeConsolidator(1m);
      # Create a Classic Range consolidator that emits a bar when the price range moves $1
      self._consolidator = ClassicRangeConsolidator(1)

      The ClassicRangeConsolidator has the following default behavior:

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, RangeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: RangeBar) -> None:
        pass

    The consolidation event handler receives bars when the price movement forms a new classic Range bar.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Consolidate Quote Ticks

    Tick quote bar consolidators aggregate Tick objects that represent quotes into RangeBar objects. Follow these steps to create and manage a Tick quote bar consolidator based on the preceding Range bar rules:

    1. Create the consolidator.
    2. To create a classic Range consolidator, pass the bar size to the ClassicRangeConsolidator constructor.

      // Create a Classic Range consolidator that emits a bar when the price range moves $1
      _consolidator = new ClassicRangeConsolidator(1m);
      # Create a Classic Range consolidator that emits a bar when the price range moves $1
      self._consolidator = ClassicRangeConsolidator(1)

      The ClassicRangeConsolidator has the following default behavior:

  • Add an event handler to the consolidator.
  • _consolidator.DataConsolidated += ConsolidationHandler;
    self._consolidator.data_consolidated += self._consolidation_handler

    LEAN passes consolidated bars to the consolidator event handler in your algorithm. The most common error when creating consolidators is to put parenthesis () at the end of your method name when setting the event handler of the consolidator. If you use parenthesis, the method executes and the result is passed as the event handler instead of the method itself. Remember to pass the name of your method to the event system. Specifically, it should be ConsolidationHandler self._consolidation_handler , not ConsolidationHandler() self._consolidation_handler() .

  • Define the consolidation handler.
  • void ConsolidationHandler(object sender, RangeBar consolidatedBar)
    {
    
    }
    def _consolidation_handler(self, sender: object, consolidated_bar: RangeBar) -> None:
        pass

    The consolidation event handler receives bars when the price movement forms a new classic Range bar.

  • Update the consolidator.
  • You can automatically or manually update the consolidator.

  • If you create consolidators for securities in a dynamic universe and register them for automatic updates, remove the consolidator when the security leaves the universe.
  • SubscriptionManager.RemoveConsolidator(_symbol, _consolidator);
    self.subscription_manager.remove_consolidator(self._symbol, self._consolidator)

    If you have a dynamic universe and don't remove consolidators, they compound internally, causing your algorithm to slow down and eventually die once it runs out of RAM. For an example of removing consolidators from universe subscriptions, see the GasAndCrudeOilEnergyCorrelationAlpha GasAndCrudeOilEnergyCorrelationAlpha in the LEAN GitHub repository.

    Examples

    Demonstration Algorithms
    ClassicRangeConsolidatorAlgorithm.py Python ClassicRangeConsolidatorAlgorithm.cs C#

     

    Consolidator Types

    Combining Consolidators

    Introduction

    Sequential consolidators wire two internal consolidators together such that the output of the first consolidator is the input to the second consolidator and the output of the second consolidator is the output of the sequential consolidator.

    Create Consolidators

    To create a sequential consolidator, create two consolidators and then pass them to the SequentialConsolidator constructor.

    # This first consolidator produces a consolidated bar after a day passes
    one_day_consolidator = TradeBarConsolidator(timedelta(days=1))
    
    # This second consolidators produces a consolidated bar after it sees 3 samples
    three_count_consolidator = TradeBarConsolidator(3)
    
    # This sequential consolidator aggregates three 1-day bars together
    self.consolidator = SequentialConsolidator(one_day_consolidator, three_count_consolidator)
    // This first consolidator produces a consolidated bar after a day passes
    var oneDayConsolidator = new TradeBarConsolidator(TimeSpan.FromDays(1));
    
    // This second consolidators produces a consolidated bar after it sees 3 samples
    var threeCountConsolidator = new TradeBarConsolidator(3);
    
    // This sequential consolidator aggregates three 1-day bars together
    _consolidator = new SequentialConsolidator(oneDayConsolidator, threeCountConsolidator);

    For more information about each type of consolidator, see Consolidator Types .

    Examples

    Demonstration Algorithms
    DataConsolidationAlgorithm.py Python DataConsolidationAlgorithm.cs C#

     

    Consolidating Data

    Consolidator History

    Introduction

    This page explains how to save and access historical consolidated bars.

    Save Consolidated Bars

    To access historical bars that were passed to your consolidation handler, save the bars as you receive them. You can use a RollingWindow to save the consolidated bars and easily access them later on in your algorithm.

    // Create a class member to store the RollingWindow
    _window = new RollingWindow<TradeBar>(2);
    
    // In the consolidation handler, add consolidated bars to the RollingWindow
    private void ConsolidationHandler(object sender, TradeBar consolidatedBar)
    {
        _window.Add(consolidatedBar);
    }
    # Create a class member to store the RollingWindow
    self._window = RollingWindow[TradeBar](2)
    
    # In the consolidation handler, add consolidated bars to the RollingWindow
    def _consolidation_handler(self, sender: object, consolidated_bar: TradeBar) -> None:
        self._window.add(consolidated_bar)

    Get Historical Bars

    If you save consolidated bars in a RollingWindow , you can access them by indexing the RollingWindow . RollingWindow objects operate on a first-in, first-out process to allow for reverse list access semantics. Index 0 refers to the most recent item in the window and the largest index refers to the last item in the window.

    var mostRecentBar = _window[0];
    var previousBar = _window[1];
    var oldestBar = _window[_window.Count-1];
    most_recent_bar = self._window[0]
    previous_bar = self._window[1]
    oldest_bar = self._window[self._window.count-1]

    To get the consolidated bar that was most recently removed from the RollingWindow , use the MostRecentlyRemoved most_recently_removed property.

    var removedBar = _window.MostRecentlyRemoved;
    removed_bar = self._window.most_recently_removed

     

    Consolidating Data

    Updating Indicators

    Introduction

    You can use consolidators to automatically update indicators in your algorithms. The consolidators can update your indicators at each time step or with aggregated bars. By default, LEAN updates data point indicators with the close price of the consolidated bars, but you can change it to a custom data field.

    Standard Indicator Periods

    If your algorithm has a static universe, you can create automatic indicators in just one line of code. When you create an automatic indicator, LEAN creates a consolidator, hooks it up for automatic updates, and then updates the indicator with the consolidated bars.

    // Consolidate minute SPY data into 14-bar daily indicators
    var ema = EMA("SPY", 14, Resolution.Daily);
    var sma = SMA("SPY", 14, Resolution.Daily);
     # Consolidate minute SPY data into 14-bar daily indicators
    ema = self.ema("SPY", 14, Resolution.DAILY)
    sma = self.sma("SPY", 14, Resolution.DAILY)

    If your algorithm has a dynamic universe, create a manual indicator and then create a time period consolidator that updates the indicator at each time step. Keep a reference to the consolidator so you can remove it when your algorithm removes the security from the universe.

    _ema = new ExponentialMovingAverage(14);
    _consolidator = new TradeBarConsolidator(1);
    _consolidator.DataConsolidated += (_, bar) => ema.Update(bar.EndTime, bar.Close);
    SubscriptionManager.AddConsolidator(_symbol, _consolidator);
    
    self._ema = ExponentialMovingAverage(14)
    self._consolidator = TradeBarConsolidator(1)
    self._consolidator.data_consolidated += lambda _, bar: self._ema.update(bar.end_time, bar.close)
    self.subscription_manager.add_consolidator(self._symbol, self._consolidator)
    

    Custom Indicator Periods

    It's common to update indicators with price data that spans a normal time period like one minute or one day. It's less common to update an indicator with exotic time periods (for example, a 7-minute consolidated bar), so these types of indicators may provide more opportunities for alpha. To update indicators with exotic data, create a manual indicator and then call the RegisterIndicator register_indicator method. The RegisterIndicator register_indicator method wires up the indicator for automatic updates at the time interval you provide.

    // Calculate the SMA with 10 7-minute bars
    var symbol = AddEquity("SPY", Resolution.Minute).Symbol;
    var indicator = new SimpleMovingAverage(10);
    RegisterIndicator(symbol, indicator, TimeSpan.FromMinutes(7));
    
    # Calculate the SMA with 10 7-minute bars
    self._symbol = self.add_equity("SPY", Resolution.MINUTE).symbol
    self._indicator = SimpleMovingAverage(10)
    self.register_indicator(self._symbol, self._indicator, timedelta(minutes=7))
    

    The RegisterIndicator register_indicator method can accept a timedelta TimeSpan , Resolution , or an unregistered consolidator. If you apply the indicator to a security in a dynamic universe, provide a consolidator so that you can remove it when your algorithm removes the security from the universe.

    // TimeSpan
    RegisterIndicator(symbol, indicator, TimeSpan.FromMinutes(7));
    
    // Resolution
    RegisterIndicator(symbol, indicator, Resolution.Hour);
    
    // Consolidator
    _consolidator = new TradeBarConsolidator(35);
    RegisterIndicator(symbol, indicator, _consolidator);
    
    # timedelta
    self.register_indicator(self._symbol, self._indicator, timedelta(minutes=7))
    
    # Resolution
    self.register_indicator(self._symbol, self._indicator, Resolution.HOUR)
    
    # Consolidator
    self._consolidator = TradeBarConsolidator(35)
    self.register_indicator(self._symbol, self._indicator, self._consolidator)
    

    Custom Indicator Values

    Data point indicators use only a single price data in their calculations. By default, those indicators use the closing price. For assets with TradeBar data, that price is the TradeBar close price. For assets with QuoteBar data, that price is the mid-price of the bid closing price and the ask closing price. To create an indicator with the other fields like the Open , High , Low , or Close OPEN , HIGH , LOW , or CLOSE , provide a selector argument to the RegisterIndicator register_indicator method.

    // Define a 10-period RSI with indicator the constructor
    _rsi = new RelativeStrengthIndex(10, MovingAverageType.Simple);
    
    // Register the daily High price data to automatically update the indicator
    RegisterIndicator(symbol, _rsi, Resolution.Daily, Field.High);
    # Define a 10-period RSI with indicator constructor
    self._rsi = RelativeStrengthIndex(10, MovingAverageType.SIMPLE)
    
    # Register the daily High price data to automatically update the indicator
    self.register_indicator(self._symbol, self._rsi, Resolution.DAILY, Field.HIGH)

    The RegisterIndicator register_indicator method can accept a timedelta TimeSpan , Resolution , or an unregistered consolidator. If you apply the indicator to a security in a dynamic universe, provide a consolidator so that you can remove it when your algorithm removes the security from the universe.

    The Field class has the following selector properties:

    To create a custom selector , define a function that calculates the value.

    RegisterIndicator(_symbol, _rsi,  Resolution.Daily, x =>
    {
        var bar = x as IBaseDataBar;
        return (bar.Low + bar.High) / 2;
    });

     

    Historical Data

    Historical Data

    History Requests

    Introduction

    There are two ways to request historical data in your algorithms: direct historical data requests and indirect algorithm warm up . You can use a direct historical data request at any time throughout your algorithm. It returns all of the data you request as a single object.

    Key History Concepts

    The historical data API has many different options to give you the greatest flexibility in how to apply it to your algorithm.

    Time Period Options

    You can request historical data based on a trailing number of bars, a trailing period of time, or a defined period of time. If you request data in a defined period of time, the DateTime datetime objects you provide are based in the algorithm time zone .

    Return Formats

    Each asset class supports slightly different data formats. When you make a history request, consider what data returns. Depending on how you request the data, history requests return a specific data type. For example, if you don't provide Symbol objects, you get Slice objects that contain the entire universe.

    The most popular return type is a DataFrame . If you request a DataFrame , LEAN unpacks the data from Slice objects to populate the DataFrame . If you intend to use the data in the DataFrame to create TradeBar or QuoteBar objects, request that the history request returns the data type you need. Otherwise, LEAN will waste computational resources populating the DataFrame .

    Time Index

    When your history request returns a DataFrame , the timestamps in the DataFrame are based on the data time zone . When your history request returns a TradeBars , QuoteBars , Ticks , or Slice object, the Time time properties of these objects are based on the algorithm time zone, but the EndTime end_time properties of the individual TradeBar , QuoteBar , and Tick objects are based on the data time zone data time zone . The EndTime end_time is the end of the sampling period and when the data is actually available. For daily US Equity data, this results in data points appearing on Saturday and skipping Monday.

    Request Data

    The simplest form of history request is for a known set of Symbol objects. This is common for fixed universes of securities or when you need to prepare new securities added to your algorithm. History requests return slightly different data depending on the overload you call. The data that returns is in ascending order from oldest to newest. This order is necessary to use the data to warm up indicators.

    Single Symbol History Requests

    To request history for a single asset, pass the asset Symbol to the History history method. The return type of the method call depends on the history request [Type] <Type> . The following table describes the return type of each request [Type] <Type> :

    Request Type Return Data Type
    No argument DataFrame List<TradeBar>
    TradeBar List[TradeBars] List<TradeBar>
    QuoteBar List[QuoteBars] List<QuoteBar>
    Tick List[Ticks] List<Tick>
    alternativeDataClass
    (ex: CBOE )
    List[ alternativeDataClass ]
    (ex: List[CBOE] )
    List< alternativeDataClass >
    (ex: List<CBOE> )

    Each row of the DataFrame represents the prices at a point in time. Each column of the DataFrame is a property of that price data (for example, open, high, low, and close (OHLC)). If you request a DataFrame object and pass TradeBar as the first argument, the DataFrame that returns only contains the OHLC and volume columns. If you request a DataFrame object and pass QuoteBar as the first argument, the DataFrame that returns contains the OHLC of the bid and ask and it contains OHLC columns, which are the respective means of the bid and ask OHLC values. If you request a DataFrame and don't pass TradeBar or QuoteBar as the first arugment, the DataFrame that returns contains columns for all of the data that's available for the given resolution.

    # EXAMPLE 1: Requesting By Bar Count: 5 bars at the security resolution:
    vix_symbol = self.add_data(CBOE, "VIX", Resolution.DAILY).symbol
    cboe_data = self.history[CBOE](vix_symbol, 5)
    
    btc_symbol = self.add_crypto("BTCUSD", Resolution.MINUTE).symbol
    trade_bars = self.history[TradeBar](btc_symbol, 5)
    quote_bars = self.history[QuoteBar](btc_symbol, 5)
    trade_bars_df = self.history(TradeBar, btc_symbol, 5)
    quote_bars_df = self.history(QuoteBar, btc_symbol, 5)
    df = self.history(btc_symbol, 5)   # Includes trade and quote data
    Historical minute data dataframe of BTCUSD
    
    // EXAMPLE 1: Requesting By Bar Count: 5 bars at the security resolution:
    var vixSymbol = AddData<CBOE>("VIX", Resolution.Daily).Symbol;
    var cboeData = History<CBOE>(vixSymbol, 5);
    
    var btcSymbol = AddCrypto("BTCUSD", Resolution.Minute).Symbol;
    var tradeBars = History<TradeBar>(btcSymbol, 5);
    var quoteBars = History<QuoteBar>(btcSymbol, 5);
    var tradeBars2 = History(btcSymbol, 5);
    # EXAMPLE 2: Requesting By Bar Count: 5 bars with a specific resolution:
    trade_bars = self.history[TradeBar](btc_symbol, 5, Resolution.DAILY)
    quote_bars = self.history[QuoteBar](btc_symbol, 5, Resolution.MINUTE)
    trade_bars_df = self.history(TradeBar, btc_symbol, 5, Resolution.MINUTE)
    quote_bars_df = self.history(QuoteBar, btc_symbol, 5, Resolution.MINUTE)
    df = self.history(btc_symbol, 5, Resolution.MINUTE)  # Includes trade and quote data
    Historical minute data dataframe of BTCUSD
    
    // EXAMPLE 2: Requesting By Bar Count: 5 bars with a specific resolution:
    var tradeBars = History<TradeBar>(btcSymbol, 5, Resolution.Daily);
    var quoteBars = History<QuoteBar>(btcSymbol, 5, Resolution.Minute);
    var tradeBars2 = History(btcSymbol, 5, Resolution.Minute);
    # EXAMPLE 3: Requesting By a Trailing Period: 3 days of data at the security resolution: 
    eth_symbol = self.add_crypto('ETHUSD', Resolution.TICK).symbol
    ticks = self.history[Tick](eth_symbol, timedelta(days=3))
    ticks_df = self.history(eth_symbol, timedelta(days=3))
    
    vix_data = self.history[CBOE](vix_symbol, timedelta(days=3)) 
    trade_bars = self.history[TradeBar](btc_symbol, timedelta(days=3)) 
    quote_bars = self.history[QuoteBar](btc_symbol, timedelta(days=3))
    trade_bars_df = self.history(TradeBar, btc_symbol, timedelta(days=3))
    quote_bars_df = self.history(QuoteBar, btc_symbol, timedelta(days=3))
    df = self.history(btc_symbol, timedelta(days=3))  # Includes trade and quote data
    Historical minute data dataframe of BTCUSD
    
    // EXAMPLE 3: Requesting By a Trailing Period: 3 days of data at the security resolution:
    var ethSymbol = AddCrypto("ETHUSD", Resolution.Tick).Symbol;
    var ticks = History<Tick>(ethSymbol, TimeSpan.FromDays(3));
    
    var cboeData = History<CBOE>(vixSymbol, TimeSpan.FromDays(3));
    var tradeBars = History<TradeBar>(btcSymbol, TimeSpan.FromDays(3));
    var quoteBars = History<QuoteBar>(btcSymbol, TimeSpan.FromDays(3));
    var tradeBars2 = History(btcSymbol, TimeSpan.FromDays(3));
    # EXAMPLE 4: Requesting By a Trailing Period: 3 days of data with a specific resolution: 
    trade_bars = self.history[TradeBar](btc_symbol, timedelta(days=3), Resolution.DAILY) 
    quote_bars = self.history[QuoteBar](btc_symbol, timedelta(days=3), Resolution.MINUTE)
    ticks = self.history[Tick](eth_symbol, timedelta(days=3), Resolution.TICK)
    
    trade_bars_df = self.history(TradeBar, btc_symbol, timedelta(days=3), Resolution.DAILY)
    quote_bars_df = self.history(QuoteBar, btc_symbol, timedelta(days=3), Resolution.MINUTE)
    ticks_df = self.history(eth_symbol, timedelta(days=3), Resolution.TICK)
    df = self.history(btc_symbol, timedelta(days=3), Resolution.HOUR)  # Includes trade and quote data
    Historical hourly data dataframe of BTCUSD
    # Important Note: Period history requests are relative to "now" algorithm time.
    // EXAMPLE 4: Requesting By a Trailing Period: 3 days of data with a specific resolution:
    var tradeBars = History<TradeBar>(btcSymbol, TimeSpan.FromDays(3), Resolution.Daily);
    var quoteBars = History<QuoteBar>(btcSymbol, TimeSpan.FromDays(3), Resolution.Minute);
    var ticks = History<Tick>(ethSymbol, TimeSpan.FromDays(3), Resolution.Tick);
    var tradeBars2 = History(btcSymbol, TimeSpan.FromDays(3), Resolution.Minute);
    # EXAMPLE 5: Requesting By a Defined Period: 3 days of data at the security resolution: 
    start_time = datetime(2022, 1, 1)
    end_time = datetime(2022, 1, 4)
    
    vix_data = self.history[CBOE](vix_symbol, start_time, end_time) 
    trade_bars = self.history[TradeBar](btc_symbol, start_time, end_time) 
    quote_bars = self.history[QuoteBar](btc_symbol, start_time, end_time)
    ticks = self.history[Tick](eth_symbol, start_time, end_time)
    
    trade_bars_df = self.history(TradeBar, btc_symbol, start_time, end_time)
    quote_bars_df = self.history(QuoteBar, btc_symbol, start_time, end_time)
    ticks_df = self.history(Tick, eth_symbol, start_time, end_time)
    df = self.history(btc_symbol, start_time, end_time)  # Includes trade and quote data
    Historical minute data dataframe of BTCUSD
    
    // EXAMPLE 5: Requesting By a Defined Period: 3 specific days of data at the security resolution:
    var startTime = new DateTime(2022, 1, 1);
    var endTime = new DateTime(2022, 1, 4);
    
    var cboeData = History<CBOE>(vixSymbol, startTime, endTime);
    var tradeBars = History<TradeBar>(btcSymbol, startTime, endTime);
    var quoteBars = History<QuoteBar>(btcSymbol, startTime, endTime);
    var ticks = History<Tick>(ethSymbol, startTime, endTime);
    var tradeBars2 = History(btcSymbol, startTime, endTime);
    # EXAMPLE 6: Requesting By a Defined Period: 3 days of data with a specific resolution: 
    trade_bars = self.history[TradeBar](btc_symbol, start_time, end_time, Resolution.DAILY) 
    quote_bars = self.history[QuoteBar](btc_symbol, start_time, end_time, Resolution.MINUTE)
    ticks = self.history[Tick](eth_symbol, start_time, end_time, Resolution.TICK)
    
    trade_bars_df = self.history(TradeBar, btc_symbol, start_time, end_time, Resolution.DAILY)
    quote_bars_df = self.history(QuoteBar, btc_symbol, start_time, end_time, Resolution.MINUTE)
    ticks_df = self.history(eth_symbol, start_time, end_time, Resolution.TICK)
    df = self.history(btc_symbol, start_time, end_time, Resolution.HOUR)  # Includes trade and quote data
    Historical hourly data dataframe of BTCUSD
    
    // EXAMPLE 6: Requesting By a Defined Period: 3 days of data with a specific resolution:
    var tradeBars = History<TradeBar>(btcSymbol, startTime, endTime, Resolution.Daily);
    var quoteBars = History<QuoteBar>(btcSymbol, startTime, endTime, Resolution.Minute);
    var ticks = History<Tick>(ethSymbol, startTime, endTime, Resolution.Tick);
    var tradeBars2 = History(btcSymbol, startTime, endTime, Resolution.Minute);

    Multiple Symbol History Requests

    To request history for multiple symbols at a time, pass an array of Symbol objects to the same API methods shown in the preceding section. The return type of the method call depends on the history request [Type] <Type> . The following table describes the return type of each request [Type] <Type> :

    Request Type Return Data Type
    No argument DataFrame List<Slice>
    TradeBar List[TradeBars] List<TradeBars>
    QuoteBar List[QuoteBars] List<QuoteBars>
    Tick List[Ticks] List<Ticks>
    alternativeDataClass
    (ex: CBOE )
    List[Dict[Symbol, alternativeDataClass ]]
    (ex: List[Dict[Symbol, CBOE]] )
    List<Dictionary<Symbol, alternativeDataClass >>
    (ex: List<Dictionary<Symbol, CBOE>> )

    The Slice return type provides a container that supports all data types. For example, a history request for Forex QuoteBars and Equity TradeBars has the Forex data under slices.QuoteBars and the Equity data under slices.Bars .

    # EXAMPLE 7: Requesting By Bar Count for Multiple Symbols: 2 bars at the security resolution:
    vix = self.add_data[CBOE]("VIX", Resolution.DAILY).symbol
    v3m = self.add_data[CBOE]("VIX3M", Resolution.DAILY).symbol
    cboe_data = self.history[CBOE]([vix, v3m], 2)
    
    ibm = self.add_equity("IBM", Resolution.MINUTE).symbol
    aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
    trade_bars_list = self.history[TradeBar]([ibm, aapl], 2)
    quote_bars_list = self.history[QuoteBar]([ibm, aapl], 2)
    
    trade_bars_df = self.history(TradeBar, [ibm, aapl], 2)
    quote_bars_df = self.history(QuoteBar, [ibm, aapl], 2)
    df = self.history([ibm, aapl], 2)  # Includes trade and quote data
    Historical minute data dataframe of IBM & AAPL
    
    // EXAMPLE 7: Requesting By Bar Count for Multiple Symbols: 2 bars at the security resolution:
    var vixSymbol = AddData<CBOE>("VIX", Resolution.Daily).Symbol;
    var v3mSymbol = AddData<CBOE>("VIX3m", Resolution.Daily).Symbol;
    var cboeData = History<CBOE>(new[] { vix, v3m }, 2);
    
    var ibm = AddEquity("IBM", Resolution.Minute).Symbol;
    var aapl = AddEquity("AAPL", Resolution.Minute).Symbol;
    var tradeBarsList = History<TradeBar>(new[] { ibm, aapl }, 2);
    var quoteBarsList = History<QuoteBar>(new[] { ibm, aapl }, 2);
    
    # EXAMPLE 8: Requesting By Bar Count for Multiple Symbols: 5 bars with a specific resolution:
    trade_bars_list = self.history[TradeBar]([ibm, aapl], 5, Resolution.DAILY)
    quote_bars_list = self.history[QuoteBar]([ibm, aapl], 5, Resolution.MINUTE)
    
    trade_bars_df = self.history(TradeBar, [ibm, aapl], 5, Resolution.DAILY)
    quote_bars_df = self.history(QuoteBar, [ibm, aapl], 5, Resolution.MINUTE)
    df = self.history([ibm, aapl], 5, Resolution.DAILY)  # Includes trade data only. No quote for daily equity data
    Historical daily data dataframe of IBM & AAPL
    
    // EXAMPLE 8: Requesting By Bar Count for Multiple Symbols: 5 bars with a specific resolution:
    var tradeBarsList = History<TradeBar>(new[] { ibm, aapl }, 5, Resolution.Minute);
    var quoteBarsList = History<QuoteBar>(new[] { ibm, aapl }, 5, Resolution.Minute);
    
    # EXAMPLE 9: Requesting By Trailing Period: 3 days of data at the security resolution: 
    ticks = self.history[Tick]([eth_symbol], timedelta(days=3))
    
    trade_bars = self.history[TradeBar]([btc_symbol], timedelta(days=3)) 
    quote_bars = self.history[QuoteBar]([btc_symbol], timedelta(days=3))
    trade_bars_df = self.history(TradeBar, [btc_symbol], timedelta(days=3))
    quote_bars_df = self.history(QuoteBar, [btc_symbol], timedelta(days=3))
    df = self.history([btc_symbol], timedelta(days=3))  # Includes trade and quote data 
    Historical minute data dataframe of BTCUSD
    
    // EXAMPLE 9: Requesting By Trailing Period: 3 days of data at the security resolution:
    var ticks = History<Tick>(new[] {ethSymbol}, TimeSpan.FromDays(3));
    
    var tradeBars = History<TradeBar>(new[] {btcSymbol}, TimeSpan.FromDays(3));
    var quoteBars = History<QuoteBar>(new[] {btcSymbol}, TimeSpan.FromDays(3));
    var tradeBars2 = History(new[] {btcSymbol}, TimeSpan.FromDays(3));
    # EXAMPLE 10: Requesting By Defined Period: 3 days of data at the security resolution: 
    trade_bars = self.history[TradeBar]([btc_symbol], start_time, end_time) 
    quote_bars = self.history[QuoteBar]([btc_symbol], start_time, end_time)
    ticks = self.history[Tick]([eth_symbol], start_time, end_time)
    trade_bars_df = self.history(TradeBar, btc_symbol, start_time, end_time)
    quote_bars_df = self.history(QuoteBar, btc_symbol, start_time, end_time)
    ticks_df = self.history(Tick, eth_symbol, start_time, end_time)
    df = self.history([btc_symbol], start_time, end_time)  # Includes trade and quote data
    Historical minute data dataframe of BTCUSD
    
    // EXAMPLE 10: Requesting By Defined Period: 3 days of data at the security resolution:
    var tradeBars = History<TradeBar>(new[] {btcSymbol}, startTime, endTime);
    var quoteBars = History<QuoteBar>(new[] {btcSymbol}, startTime, endTime);
    var ticks = History<Tick>(new[] {ethSymbol}, startTime, endTime);
    var tradeBars2 = History(new[] {btcSymbol}, startTime, endTime);

    If you request data for multiple securities and you use the Tick TICK request type, each Ticks object in the list of results only contains the last tick of each security for that particular timeslice .

    All Symbol History Requests

    You can request history for all active securities in your universe. The parameters are very similar to other history method calls, but the return type is an array of Slice objects. The Slice object holds all of the results in a sorted enumerable collection that you can iterate over with a loop.

    # EXAMPLE 11: Requesting 5 bars for all securities at their respective resolution:
    
    # Create subscriptions
    self.add_equity("IBM", Resolution.DAILY)
    self.add_equity("AAPL", Resolution.DAILY)
    
    # Request history data and enumerate results
    slices = self.history(5)
    for s in slices:
        self.Log(str(s.time) + " AAPL:" + str(s.bars["AAPL"].close) + " IBM:" + str(s.bars["IBM"].close))
    Historical daily close price output of IBM & AAPL
    
    // EXAMPLE 11: Requesting 5 bars for all securities at their respective resolution:
    
    // Set up the universe
    AddEquity("IBM", Resolution.Daily);
    AddEquity("AAPL", Resolution.Daily);
    
    // Request history data and enumerate results:
    var slices = History(5);
    foreach (var s in slices) {
        var aaplClose = s.Bars["AAPL"].Close;
        var ibmClose = s.Bars["IBM"].Close;
        Log($"{s.Time} AAPL: {aaplClose} IBM: {ibmClose}");
    }
    Historical daily close price output of IBM & AAPL
    
    # EXAMPLE 12: Requesting 5 minutes for all securities:
    
    slices = self.history(timedelta(minutes=5), Resolution.MINUTE)
    for s in slices:
        self.Log(str(s.time) + " AAPL:" + str(s.bars["AAPL"].close) + " IBM:" + str(s.bars["IBM"].close))
    Historical minute close price output of IBM & AAPL
    # timedelta history requests are relative to "now" in algorithm Time. If you request this data at 16:05, it returns an empty array because the market is closed.
    // EXAMPLE 12: Requesting 24 hours of hourly data for all securities:
    
    var slices = History(TimeSpan.FromHours(24), Resolution.Hour);
    foreach (var s in slices) {
        var aaplClose = s.Bars["AAPL"].Close;
        var ibmClose = s.Bars["IBM"].Close;
        Log($"{s.Time} AAPL: {aaplClose} IBM: {ibmClose}");
    }
    Historical hourly close price output of IBM & AAPL
    // TimeSpan history requests are relative to "now" in algorithm Time.

    Assumed Default Values

    The following table describes the assumptions of the History API:

    Argument Assumption
    Resolution LEAN guesses the resolution you request by looking at the securities you already have in your algorithm. If you have a security subscription in your algorithm with a matching Symbol , the history request uses the same resolution as the subscription. If you don't have a security subscription in your algorithm with a matching Symbol , Resolution.Minute Resolution.MINUTE is the default.
    Bar type If you don't specify a type for the history request, TradeBar is the default. If the asset you request data for doesn't have TradeBar data, specify the QuoteBar type to receive history.

    Additional Options

    The History history method accepts the following additional arguments:

    Argument Data Type Description Default Value
    fillForward fill_forward bool? bool/NoneType True to fill forward missing data. Otherwise, false. If you don't provide a value, it uses the fill forward mode of the security subscription. null None
    extendedMarketHours extended_market_hours bool? bool/NoneType True to include extended market hours data. Otherwise, false. null None
    dataMappingMode data_mapping_mode DataMappingMode? DataMappingMode/NoneType The contract mapping mode to use for the security history request. null None
    dataNormalizationMode data_normalization_mode DataNormalizationMode? DataNormalizationMode/NoneType The price scaling mode to use for US Equities or continuous Futures contracts . If you don't provide a value, it uses the data normalization mode of the security subscription. null None
    contractDepthOffset contract_depth_offset int? int/NoneType The desired offset from the current front month for continuous Futures contracts . null None
    self.future = self.add_future(Futures.Currencies.BTC)
    history = self.history(
        tickers=[self.future.symbol], 
        start=self.time - timedelta(days=15), 
        end=self.time, 
        resolution=Resolution.MINUTE, 
        fill_forward=False, 
        extended_market_hours=False, 
        dataMappingMode=DataMappingMode.OPEN_INTEREST, 
        dataNormalizationMode=DataNormalizationMode.RAW, 
        contractDepthOffset=0)
    var future = AddFuture(Futures.Currencies.BTC);
    var history = History(
        symbols: new[] {future.Symbol}, 
        start: Time - TimeSpan.FromDays(15),
        end: Time,
        resolution: Resolution.Minute,
        fillForward: false,
        extendedMarketHours: false,
        dataMappingMode: DataMappingMode.OpenInterest,
        dataNormalizationMode: DataNormalizationMode.Raw,
        contractDepthOffset: 0);

    Analyze Results

    For most data types, the History history method returns a multi-index DataFrame where the first index is the Symbol . The data is then sorted in rows according to the second index, the EndTime end_time of the data point. By learning a few helpful shortcuts, you can directly access the history values you need for your algorithm.

    # Setup the universe:
    eurusd = self.add_forex("EURUSD", Resolution.DAILY).symbol
    nzdusd = self.add_forex("NZDUSD", Resolution.DAILY).symbol
    
    # STEP 1:  Request a DataFrame:
    df = self.history([eurusd, nzdusd], 3)
    Historical data of EURUSD, & NZDUSD
    
    
    # STEP 2: Check if the DataFrame is empty and lock onto a Symbol index with the `loc[]` method.
    #  You can access a security’s data in a DataFrame by using the Symbol or the string representation of the Symbol
    if not df.empty:
        eurusd_quotebars = df.loc[eurusd] # or just "EURUSD" instead of Symbol
    Historical data of EURUSD
    
    
    # STEP 3: Extract and manipulate a single column with the string column name
    spread = eurusd_quotebars["askclose"] - eurusd_quotebars["bidclose"]
    Historical close price spreads of EURUSD
    # Make sure to use the lowercase string column name.

    To perform analysis between assets, you can unstack the DataFrame . The unstack method transforms each column into the Symbol values for one of the price-columns you select.

    # UNSTACKING: Transform into columns
    
    # Fetch multi-indexed history:
    df = self.history([self.symbol("IBM"), self.symbol("AAPL")], 3)
    Historical data of IBM, & AAPL
    
    # Transform using unstack:
    df["close"].unstack(level=0)
    Historical close price of IBM, & AAPL
    # Make sure to use the lowercase string column name.

    To reorganize the DataFrame so that the first index level is the EndTime and the second index level is the asset's Symbol, swap the index level and then sort the index.

    history = self.history([eurusd, nzdusd], 3)
    history.index = history.index.swaplevel(0, 1)
    history = history.sort_index()
    
    Historical data of EURUSD and NZDUSD in a dataframe

    If you request historical data for derivatives, the DataFrame can have more index levels. For example, history requests for Equity Options return DataFrames with the following index levels:

    1. Contract expiry
    2. Contract strike price
    3. Contract type (call or put)
    4. Encoded contract Symbol
    5. The EndTime end_time of the data sample

    In this case, you can remove the first three index levels to index the DataFrame with just the contract Symbol, similiar to how you would with non-derivative asset classes. To remove the first three index levels, call the droplevel method.

    history.index = history.index.droplevel([0,1,2])

    The History method returns an array of TradeBar , QuoteBar , or Slice objects, depending on how you call the method. To access the members of each of these objects, iterate over the objects in a for loop.

    // Set up the universe
    var spy = AddEquity("SPY").Symbol;
    var aapl = AddEquity("AAPL").Symbol;
    
    // Example 1: Iterate over TradeBar objects
    var tradeBars = History(spy, 10);
    foreach (var tradeBar in tradeBars)
    {
        Debug($"{tradeBar.Time}: {tradeBar.Close}");
    }
    
    // Example 2: Iterate over QuoteBar objects
    var quoteBars = History(aapl, 10);
    foreach (var quoteBar in quoteBars)
    {
         Debug($"{s.Time}: {quoteBar.Bid.Close} / {quoteBar.Ask.Close}");
    }
    
    // Example 3: Iterate over Slice objects
    var slices = History(new[] {spy, aapl}, 10);
    foreach (var slice in slices)
    {
        Debug($"{slice.Time}: AAPL {slice.QuoteBars[aapl].Bid.Close}, SPY {slice[spy].Close}");
    }
    

    Data Formats

    We provide a specific data formats for each asset class. To view the available data formats, see the Resolutions documentation of the following asset classes:

    Common Errors

    Errors can occur when you request historical data.

    Empty Data Errors

    If the history request returns an empty DataFrame and you try to slice it, it throws an exception. To avoid issues, check if the DataFrame contains data before slicing it.

    df = self.history(symbol, 10).close    # raises exception if the request is empty
    
    def get_safe_history_closes(self, symbols):
        if not symbols:
            self.log(f'No symbols')
            return  False, None
        df = self.history(symbols, 100, Resolution.DAILY)
        if df.empty:
            self.log(f'Empy history for {symbols}')
            return  False, None
         return True, df.close.unstack(0)

    If you run algorithms on your local machine and history requests return no data, check if your data directory contains the data you request. To download datasets, see Download .

    Numerical Precision Errors

    Some factor files have INF split values, which indicate that the stock has so many splits that prices can't be calculated with correct numerical precision. To allow history requests with these symbols, we need to move the starting date forward when reading the data. If there are numerical precision errors in the factor files for a security in your history request, LEAN throws the following error:

    "Warning: when performing history requests, the start date will be adjusted if there are numerical precision errors in the factor files."

    Live Trading Considerations

    In live trading, if you make a history request for minute data at noon and the history period covers the start of the previous day to the present moment, the data from the previous day will be backtest data. The data of the current day will be live data that we collected throughout the morning. If you make this history request in a backtest, you might get slightly different data for the current day because of post-processing from the data vendor.

    Examples

    Demonstration Algorithm
    HistoryAlgorithm.py Python WarmupHistoryAlgorithm.py Python HistoryAlgorithm.cs C# WarmupHistoryAlgorithm.cs C#

     

    Historical Data

    Warm Up Periods

    Introduction

    LEAN supports an automated fast-forward system called "Warm Up". It simulates winding back the clock from the time you deploy the algorithm. In a backest, this is the StartDate start_date of your algorithm. In live trading, it's the current date. Warm Up is a great way to prepare your algorithm and its indicators for trading.

    Set Warm Up Periods

    You can set a warm-up period based on a period of time or a number of bars. To set a warm-up, in your algorithm's Initialize initialize method, call the SetWarmUp set_warm_up method.

    // Wind time back 7 days from start
    SetWarmUp(TimeSpan.FromDays(7));
    
    // Feed in 100 bars before start date
    SetWarmUp(100);
    
    # Wind time back 7 days from start
    self.set_warm_up(timedelta(7))
    
    # Feed in 100 bars before start date
    self.set_warm_up(100)
    

    If you pass a timedelta TimeSpan argument, the warm-up period consists of that timedelta TimeSpan before the start date and pipes in data that matches the resolution of your data subscriptions.

    If you pass just an integer argument, LEAN calculates the start of the warm-up period for each of your security subscriptions by using the number of bars you specify, the resolution of each security, and the trading calendar of each security. After it calculates the start time of the warm-up period for each security, it sets the earliest start time as the start of the algorithm warm-up period. For instance, in the following example, the warm-up period consists of 100 minute resolution bars for SPY and as many second resolution bars for BTCUSD that occur from the start of the SPY warm-up period to the algorithm StartDate start_date .

    AddEquity("SPY", Resolution.Minute, fillForward: false);
    AddCrypto("BTCUSD", Resolution.Second, fillForward: false);
    SetWarmUp(100);
    
    self.add_equity("SPY", Resolution.MINUTE, fill_forward=False)
    self.add_crypto("BTCUSD", Resolution.SECOND, fill_forward=False)
    self.set_warm_up(100)
    

    To use a specific resolution of data for the warm-up period, pass a resolution argument to the SetWarmUp set_warm_up method.

    // Feed in 100 days of daily data before the start date
    SetWarmUp(TimeSpan.FromDays(100), Resolution.Daily);
    
    // Feed in data for 100 trading days of daily data before the start date
    SetWarmUp(100, Resolution.Daily);
    # Feed in 100 days of daily data before the start date
    self.set_warm_up(timedelta(days=100), Resolution.DAILY)
    
    # Feed in data for 100 trading days before the start date
    self.set_warm_up(100, Resolution.DAILY)

    If you pass a timedelta TimeSpan and a resolution, the warm-up period consists of the time period and resolution you set, regardless of the resolution of your data subscriptions.

    If you pass an integer and a resolution, the warm-up period consists of the number of bars and resolution you set, regardless of the resolution of your data subscriptions. In this case, LEAN calculates the start of the warm-up period for each of your security subscriptions just like it does when you only pass an integer argument. After it calculates the start time of the warm-up period for each security, it sets the earliest start time as the start of the algorithm warm-up period.

    If you pass a resolution argument and you registered indicators or consolidators for automatic updates, the warm-up period resolution must be less than or equal to the lowest resolution of your automatic indicators and consolidators. For instance, in the following example, the indicators use minute resolution data, so you can set the warm-up period to use tick, second, or minute resolution data.

    _spy = AddEquity("SPY", Resolution.Minute, fillForward: false).Symbol;
    _btc = AddCrypto("BTCUSD", Resolution.Second, fillForward: false).Symbol;
    
    _spySma = SMA(_spy, 10);
    _btcSMA = SMA(_btc, 10, Resolution.Minute);
    
    SetWarmUp(100, Resolution.Minute);
    
    self._spy = self.add_equity("SPY", Resolution.MINUTE, fill_forward=False).symbol
    self._btc = self.add_crypto("BTCUSD", Resolution.SECOND, fill_forward=False).symbol
    
    self._spy_sma = self.sma(self._spy, 10)
    self._btc_sma = self.sma(self._btc, 10, Resolution.MINUTE)
    
    self.set_warm_up(100, Resolution.MINUTE)
    

    Warm Up Vs Reality

    You may need to distinguish warm-up data from real data. To check if the algorithm is currently in a warm up period, use the IsWarmingUp is_warming_up property.

    // In Initialize
    var emaFast = EMA("IBM", 50);
    var emaSlow = EMA("IBM", 100);
    SetWarmup(100);
    
    // In OnData: Don't run if the indicators aren't ready
    if (IsWarmingUp) return;
    
    # In Initialize
    self._ema_fast = self.ema("IBM", 50);
    self._ema_slow = self.ema("IBM", 100);
    self.set_warmup(100);
    
    // In OnData: Don't run if the indicators aren't ready
    if self.is_warming_up: return
    

    Event Handler

    The OnWarmupFinished on_warmup_finished event handler executes when the warm up period ends, even if you don't set a warm up period.

    public override void OnWarmupFinished()
    {
        // Done warming up
    }
    
    def on_warmup_finished(self) -> None:
        pass # Done warming up

    Limitations

    You can't place trades during the warm-up period because they would be operating on fictional fast-forwarded data.

    Examples

    Demonstration Algorithms
    WarmupAlgorithm.py Python WarmupAlgorithm.cs C#

     

    Historical Data

    Rolling Window

    Introduction

    A RollingWindow is an array of a fixed-size that holds trailing data. It's more efficient to use RollingWindow objects to hold periods of data than to make multiple historical data requests . With a RollingWindow , you just update the latest data point while a History history call fetches all of the data over the period you request. RollingWindow objects operate on a first-in, first-out process to allow for reverse list access semantics. Index 0 refers to the most recent item in the window and the largest index refers to the last item in the window.

    Supported Types

    RollingWindow objects can store any native or C# types.

    closeWindow = new RollingWindow<decimal>(4);
    tradeBarWindow = new RollingWindow<TradeBar>(2);
    quoteBarWindow = new RollingWindow<QuoteBar>(2);
    self._close_window = RollingWindow[float](4)
    self._trade_bar_window = RollingWindow[TradeBar](2)
    self._quote_bar_window = RollingWindow[QuoteBar](2)

    To be notified when RollingWindow objects support additional types, subscribe to GitHub Issue #6199 .

    Add Data

    To add data to a RollingWindow , call the Add add method.

    closeWindow.Add(data["SPY"].Close);
    tradeBarWindow.Add(data["SPY"]);
    quoteBarWindow.Add(data["EURUSD"]);
    self._close_window.add(data["SPY"].close)
    self._trade_bar_window.add(data["SPY"])
    self._quote_bar_window.add(data["EURUSD"])

    To update the data at a specific index, set the value for that index. If the index doesn't currently exist, it increases the size and fills the empty indices with a default value (zero or null None ).

    closeWindow[0] = data["SPY"].Close;
    tradeBarWindow[0] = data["SPY"];
    quoteBarWindow[0] = data["EURUSD"];
    self._close_window[0] = data["SPY"].close
    self._trade_bar_window[0] = data["SPY"]
    self._quote_bar_window[0] = data["EURUSD"]

    Warm Up

    To warm up a RollingWindow , make a history request and then iterate through the result to add the data to the RollingWindow .

    var spy = AddEquity("SPY", Resolution.Daily).Symbol;
    var historyTradeBar = History<TradeBar>(spy, 10, Resolution.Daily);
    var historyQuoteBar = History<QuoteBar>(spy, 10, Resolution.Minute);
    
    // Warm up the close price and trade bar rolling windows with the previous 10-day trade bar data
    var closePriceWindow = new RollingWindow<decimal>(10);
    var tradeBarWindow = new RollingWindow<TradeBar>(10);
    foreach (var tradeBar in historyTradeBar)
    {
        closePriceWindow.Add(tradeBar.Close);
        tradeBarWindow.Add(tradeBar);
    }
    
    // Warm up the quote bar rolling window with the previous 10-minute quote bar data
    var quoteBarWindow = new RollingWindow<QuoteBar>(10);
    foreach (var quoteBar in historyQuoteBar)
    {
        quoteBarWindow.Add(quoteBar);
    }
    spy = self.add_equity("SPY", Resolution.DAILY).symbol
    history_trade_bar = self.history[TradeBar](spy, 10, Resolution.DAILY)
    history_quote_bar = self.history[QuoteBar](spy, 10, Resolution.MINUTE)
    
    # Warm up the close price and trade bar rolling windows with the previous 10-day trade bar data
    close_price_window = RollingWindow[float](10)
    trade_bar_window = RollingWindow[TradeBar](10)
    for trade_bar in history_trade_bar:
        close_price_window.add(trade_bar.close)
        trade_bar_window.add(trade_bar)
    
    # Warm up the quote bar rolling window with the previous 10-minute quote bar data
    quote_bar_window = RollingWindow[QuoteBar](10)
    for quote_bar in history_quote_bar:
        quote_bar_window.add(quote_bar)

    Check Readiness

    To check if a RollingWindow is full, use its IsReady flag.

    if (!closeWindow.IsReady) 
    {
        return;
    }
    if not self._close_window.is_ready:
        return

    Adjust Size

    To adjust the RollingWindow size, set the Size size property.

    closeWindow.Size = 3;
    tradeBarWindow.Size = 3;
    quoteBarWindow.Size = 3;
    self.close_window.size = 3
    self.trade_bar_window.size = 3
    self.quote_bar_window.size = 3

    When you decrease the size, it removes the oldest values that no longer fit in the RollingWindow . When you explicitly increase the Size size member, it doesn't automatically add any new elements to the RollingWindow . However, if you set the value of an index in the RollingWindow and the index doesn't currently exist, it fills the empty indices with a default value (zero or null None ). For example, the following code increases the Size size to 10, sets the 10th element to 3, and sets the 4th-9th elements to the default value:

    closeWindow[9] = 3;
    self.close_window[9] = 3

    Access Data

    RollingWindow objects operate on a first-in, first-out process to allow for reverse list access semantics. Index 0 refers to the most recent item in the window and the largest index refers to the last item in the window.

    var currentClose = closeWindow[0];
    var previousClose = closeWindow[1];
    var oldestClose = closeWindow[closeWindow.Count-1];
    current_close = self.close_window[0]
    previous_close = self.close_window[1]
    oldest_close = self.close_window[self.close_window.count-1]

    To get the item that was most recently removed from the RollingWindow , use the MostRecentlyRemoved most_recently_removed property.

    var removedClose = closeWindow.MostRecentlyRemoved;
    removed_close = self.close_window.most_recently_removed

    Combine with Indicators

    Indicators have a built-in RollingWindow that stores historical values. To access these historical values, see Get Indicator Values .

    Combine with Consolidators

    To store a history of consolidated bars , in the consolidation handler, add the consolidated bar to the RollingWindow .

    _consolidator.DataConsolidated += (sender, consolidatedBar) => tradeBarWindow.Add(consolidatedBar);
    self.consolidator.data_consolidated += lambda sender, consolidated_bar: self.trade_bar_window.add(consolidated_bar)

    Cast to Other Types

    You can cast a RollingWindow to a list or a DataFrame. If you cast it to a list, reverse the list so the most recent element is at the last index of the list. This is the order the elements would be in if you added the elements to the list with the Add method. To cast a RollingWindow to a DataFrame, the RollingWindow must contain Slice , Tick , QuoteBar , or TradeBar objects. If the RollingWindow contains ticks, the ticks must have unique timestamps.

    You can cast a RollingWindow to a list. If you cast it to a list, reverse the list so the most recent element is at the last index of the list. This is the order the elements would be in if you added the elements to the list with the Add add method.

    var closes = closeWindow.Reverse().ToList();
    closes = list(self.close_window)[::-1]
    
    tick_df = self.pandas_converter.get_data_frame[Tick](list(self.tick_window)[::-1])
    trade_bar_df = self.pandas_converter.get_data_frame[TradeBar](list(self.trade_bar_window)[::-1])
    quote_bar_df = self.pandas_converter.get_data_frame[QuoteBar](list(self.quote_bar_window)[::-1])

    Delete Data

    To remove all of the elements from a RollingWindow , call the Reset reset method.

    closeWindow.Reset();
    self.close_window.reset()

    Examples

    Demonstration Algorithm
    RollingWindowAlgorithm.py Python CustomVolatilityModelAlgorithm.py Python MultipleSymbolConsolidationAlgorithm.py Python RollingWindowAlgorithm.cs C# MultipleSymbolConsolidationAlgorithm.cs C#

     

    Trading and Orders

    Trading and Orders

    Key Concepts

    Introduction

    LEAN has dozens of methods to create, update, and cancel orders. You can place orders automatically with helper methods or manually through methods on the algorithm API. You can fetch, update, and cancel manual orders with order tickets . As the state of your orders change, LEAN creates events that notify your algorithm.

    In backtesting, LEAN simulates order fills with historical data, but you can create your own fill, fee, slippage, and margin models via plugin points. You control how optimistic or pessimistic order fills are with transaction model classes. For more information about these types of models, see Reality Modeling .

    Orders and Tickets

    When you call one of the order methods to place an order, LEAN performs pre-order checks to ensure that the order meets some requirements and uses the last known price to check you have enough capital . To see the requirements of each order, see the Requirements section of the documentation for the order types and the Orders section of your brokerage model . If you can place the order, LEAN creates Order and OrderTicket objects. The order ticket is sent to your brokerage. As the brokerage processes your order, it returns another order ticket and it's compared against the order to see if the order is satisfied. Orders are asynchronous in live trading, so if you want to change an order, you must request it with the order ticket. Order changes are not guaranteed since your order may fill by the time brokerage receives the request.

    Flow of ordering and filling between algorithm and brokerage

    Order Types

    LEAN supports the following order types:

    Symbol Properties

    The SymbolProperties symbol_properties are a property of the Security object. LEAN uses some of the SymbolProperties symbol_properties to prevent invalid orders, and to calculate order quantities for a given target.

    SymbolProperties objects have the following properties:

    To get the SymbolProperties symbol_properties , use the property on the Security object.

    var symbolProperties = Securities["BTCUSD"].SymbolProperties;
    var lotSize = symbolProperties.LotSize;
    var minimumOrderSize = symbolProperties.MinimumOrderSize;
    var minimumPriceVariation = symbolProperties.MinimumPriceVariation;
    symbol_properties = self.securities["BTCUSD"].symbol_properties
    lot_size = symbol_properties.lot_size
    minimum_order_size = symbol_properties.minimum_order_size
    minimum_price_variation = symbol_properties.minimum_price_variation

    LEAN uses the MinimumPriceVariation minimum_price_variation to round the LimitPrice limit_price , StopPrice stop_price , and the TriggerPrice trigger_price .

    Quote Currency

    The quote currency is the currency you must give the seller to buy an asset. For currency trades, the quote currency is the currency ticker on the right side of the currency pair. For other types of assets, the quote currency is usually USD, but the quote currency for India Equities is INR. To get the quote currency of a Security , use the QuoteCurrency quote_currency property.

    var aaplQuoteCurrency = Securities["AAPL"].QuoteCurrency; // USD
    var btcusdtQuoteCurrency = Securities["BTCUSDT"].QuoteCurrency; // USDT
    aapl_quote_currency = self.securities["AAPL"].quote_currency # USD
    btcusdt_quote_currency = self.securities["BTCUSDT"].quote_currency # USDT

    The QuoteCurrency quote_currency is a Cash object, which have the following properties:

    You can use the ConversionRate conversion_rate property to calculate the value of the minimum price movement in the account currency

    var cfd = Securities["SG30SGD"];
    var quoteCurrency = cfd.QuoteCurrency; // SGD
    var contractMutiplier = cfd.SymbolProperties.ContractMultiplier;
    var minimumPriceVariation = cfd.SymbolProperties.MinimumPriceVariation;
    
    // Value of a pip in account currency
    var pip = minimumPriceVariation * contractMutiplier * quoteCurrency.ConversionRate;
    cfd = self.securities["SG30SGD"]
    quote_currency = cfd.quote_currency # SGD
    contract_mutiplier = cfd.symbol_properties.contract_multiplier
    minimum_price_variation = cfd.symbol_properties.minimum_price_variation
    
    # Value of a pip in account currency
    pip = minimum_price_variation * contract_mutiplier * quote_currency.conversion_rate

    Trade Models

    Reality models make backtests as realistic as possible to how the strategy would perform in live trading.

    Split Adjustment

    If a split event occurs before your order is filled, the unfilled portion of the order is adjusted automatically, where its quantity is multiplied by the split factor and the limit/stop/trigger price (if any) is divided by the split factor.

    Open Order Margin Requirements

    When an order fills, LEAN uses the portfolio information to check if you have enough capital to maintain the remaining open orders. If you don't, they are canceled.

    The following table shows the order events of three orders of SPY 240109C00470000:

    Time Id Type Price Quantity Status
    2024-01-08 09:31 1 Buy Market 0.91 20 Filled FILLED
    2 Sell Stop Market 0.81 -20 Submitted SUBMITTED
    2024-01-08 10:31 3 Sell Market 1.50 -10 Filled FILLED
    2 Sell Stop Market 0.81 -20 Invalid INVALID

    When the sell market order fills at 10:31, LEAN checks the sell stop order and sets its status to OrderStatus.Invalid OrderStatus.INVALID due to insufficient buying power to complete it.

    Live Trading Considerations

    In live trading, orders fill asynchronously. We send your order to the API of your brokerage and wait for their response to update the state of your algorithm and portfolio. The timing of live order fills doesn't depend on the resolution of your security subscriptions. When your order fills, the fill price and fee is set by your brokerage. You can add event handlers to your algorithm to monitor the brokerage connection and brokerage messages .

    In backtesting, the trade fill timing depends on the resolution of your security subscription. For example, if you subscribe to a security with minute resolution data, the algorithm only receives data in one-minute time slices . As a result, the fill model can only evaluate if the order should fill on a minute-by-minute frequency.

     

    Trading and Orders

    Order Management

    Order Management

    Order Tickets

    Introduction

    When you create an order, you get an OrderTicket object to manage your order.

    Properties

    OrderTicket objects have the following attributes:

    Track Orders

    As the state of your order updates over time, your order ticket automatically updates. To track an order, you can check any of the preceding order ticket properties.

    To get an order field, call the Get get method with an OrderField .

    var limitPrice = ticket.Get(OrderField.LimitPrice);
    limit_price = ticket.get(OrderField.LIMIT_PRICE)

    The OrderField enumeration has the following members:

    In addition to using order tickets to track orders, you can receive order events through the OnOrderEvent on_order_event event handler.

    Update Orders

    To update an order, use its OrderTicket . You can update other orders until they are filled or the brokerage prevents modifications. You just can't update orders during warm up and initialization .

    Updatable Properties

    The specific properties you can update depends on the order type. The following table shows the properties you can update for each order type.

    Order Type Updatable Properties
    Tag Quantity LimitPrice TriggerPrice StopPrice
    Market Order
    Limit Order green check green check green check
    Limit If Touched Order green check green check green check green check
    Stop Market Order green check green check green check
    Stop Limit Order green check green check green check green check
    Market On Open Order green check green check
    Market On Close Order green check green check

    Update Methods

    To update an order, pass an UpdateOrderFields object to the Update update method. The method returns an OrderResponse to signal the success or failure of the update request.

    // Create an order 
    var ticket = LimitOrder("SPY", 100, 221.05, tag: "New SPY trade");
    
    // Update the order tag and limit price
    var response = ticket.Update(new UpdateOrderFields()
    { 
        Tag = "Our New Tag for SPY Trade",
        LimitPrice = 222.00
    });
    
    // Check the OrderResponse
    if (response.IsSuccess)
    { 
        Debug("Order updated successfully");
    }
     # Create an order 
    ticket = self.limit_order("SPY", 100, 221.05, False, "New SPY trade")
    
    # Update the order tag and limit price
    updateSettings = UpdateOrderFields()
    updateSettings.limit_price = 222.00
    updateSettings.tag = "Limit Price Updated for SPY Trade"
    response = ticket.update(updateSettings)
    
    # Check the OrderResponse
    if response.is_success:
        self.debug("Order updated successfully")

    To update individual fields of an order, call any of the following methods:

    var limitResponse = ticket.UpdateLimitPrice(limitPrice, tag);
    
    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var stopResponse = ticket.UpdateStopPrice(stopPrice, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_limit_price(limit_price, tag)
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_stop_price(stop_price, tag)
    
    response = ticket.update_tag(tag)
    
    

    Update Order Requests

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Workaround for Brokerages That Don’t Support Updates

    Not all brokerages fully support order updates. To check what functionality your brokerage supports for order updates, see the Orders section of the documentation for your brokerage model . If your brokerage doesn't support order updates and you want to update an order, cancel the order . When you get an order event that confirms the order is no longer active, place a new order.

    public override void OnData(Slice slice)
    {
        // Cancel the order
        _ticket.Cancel();
    }
    
    public override void OnOrderEvent(OrderEvent orderEvent)
    {
        if (_ticket != null 
            && orderEvent.OrderId == _ticket.OrderId 
            && orderEvent.Status == OrderStatus.Canceled)
        {
            // Place a new order
            var quantity = _ticket.Quantity - _ticket.QuantityFilled;
            var limitPrice = Securities[_ticket.Symbol].Price + 1;
            _ticket = LimitOrder(_ticket.Symbol, quantity, limitPrice);
        }
    }
    def on_data(self, slice: Slice) -> None:
        # Cancel the order
        self._ticket.cancel()
    
    def on_order_event(self, order_event: OrderEvent) -> None:
        if (self._ticket and order_event.order_id == self._ticket.order_id and
            order_event.status == OrderStatus.CANCELED):
            # Place a new order
            quantity = self._ticket.quantity - self._ticket.quantity_filled
            limit_price = self.securities[self._ticket.symbol].price + 1
            self._ticket = self.limit_order(self._ticket.symbol, quantity, limit_price)

    Cancel Orders

    To cancel an order, call the Cancel cancel method on the OrderTicket . The method returns an OrderResponse object to signal the success or failure of the cancel request.

    // Create an order and save its ticket
    var ticket = LimitOrder("SPY", 100, 221.05, tag: "SPY Trade to Cancel");
    
    // Cancel the order
    var response = ticket.Cancel("Canceled SPY trade");
    
    // Use the order response object to read the status
    if (response.IsSuccess)
    {
        Debug("Order successfully canceled");
    }
     # Create an order and save its ticket
    ticket = self.limit_order("SPY", 100, 221.05, False, "SPY Trade to Cancel")
    
    # Cancel the order
    response = ticket.cancel("Canceled SPY Trade")
    
    # Use the order response object to read the status
    if response.is_success:
        self.debug("Order successfully canceled")

    You can't cancel market orders because they are immediately transmitted to the brokerage. You also can't cancel any orders during warm up and initialization .

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Order Response

    When you update or cancel an order, LEAN returns an OrderReponse object, which have the following attributes:

    If your order changes fail, check the ErrorCode or ErrorMessage . For more information about specific order errors, see the Order Response Error Reference .

    To get most recent order response, call the GetMostRecentOrderResponse get_most_recent_order_response method.

    var response = ticket.get_most_recent_order_response();
    response = ticket.get_most_recent_order_response()

    Examples

    Demonstration Algorithms
    OrderTicketDemoAlgorithm.py Python OrderTicketDemoAlgorithm.cs C#

     

    Order Management

    Transaction Manager

    Introduction

    The algorithm transactions manager ( SecurityTransactionManager ) contains a collection of helper methods to quickly access all your orders. To access the transaction manager, use the Transactions transactions property of your algorithm. If you save a reference to your order tickets , you shouldn't need to use the transaction manager. LEAN updates the order tickets as the brokerage processes your orders.

    Get a Single Order Ticket

    If you didn't save a reference to the order ticket when you created an order, you can call the GetOrderTicket get_order_ticket method to get it. You need to pass the order ID to the method. If you don't have the order ID, you can use the LastOrderId last_order_id property to get the order ID of the most recent order.

    var orderId = Transactions.LastOrderId;
    var ticket = Transactions.GetOrderTicket(orderId);
    order_id = self.transactions.last_order_id
    ticket = self.transactions.get_order_ticket(order_id)

    Get Order Tickets

    To get order tickets, call the GetOrderTickets get_order_tickets or GetOpenOrderTickets get_open_order_tickets method. You can pass in a filter function to filter all of the order tickets or pass a Symbol to get the order tickets for a specific asset.

    // Get all order tickets
    var orderTickets = Transactions.GetOrderTickets();
    
    // Get order tickets that pass a filter
    var filteredOrderTickets = Transactions.GetOrderTickets(orderTicket => orderTicket.Symbol == symbol);
    
    // Get all open order tickets
    var openOrderTickets = Transactions.GetOpenOrderTickets();
    
    // Get all open order tickets for a symbol
    var symbolOpenOrderTickets = Transactions.GetOpenOrderTickets(symbol);
    
    // Get open order tickets that pass a filter
    var filteredOpenOrderTickets = Transactions.GetOpenOrderTickets(orderTicket => orderTicket.Quantity > 10);
    
    # Get all order tickets
    order_tickets = self.transactions.get_order_tickets()
    
    # Get order tickets that pass a filter
    filtered_order_tickets = self.transactions.get_order_tickets(lambda order_ticket: order_ticket.symbol == symbol)
    
    # Get all open order tickets
    open_order_tickets = self.transactions.get_open_order_tickets()
    
    # Get all open order tickets for a symbol
    symbol_open_order_tickets = self.transactions.get_open_order_tickets(symbol)
    
    # Get open order tickets that pass a filter
    filtered_open_order_tickets = self.transactions.get_open_order_tickets(lambda order_ticket: order_ticket.quantity > 10)
    

    Get a Single Order

    To get a clone of a specific order, call the GetOrderById get_order_by_id method with the order Id. To get the order Id, use the OrderId order_id property of the order ticket or use the LastOrderID property if you want the most recent order.

    var orderId = Transactions.LastOrderID;
    var order = Transactions.GetOrderById(orderId);
    order_id = self.transactions.last_order_id
    order = self.transactions.get_order_by_id(order_id)

    Order objects are immutable and changes to the order object will not impact the trade. To make an update to an order you must use Order Tickets . Order objects have the following attributes:

    Get Orders

    To get a list of orders, call the GetOrders get_orders , GetOpenOrders get_open_orders , or GetOrdersByBrokerageId get_orders_by_brokerage_id method. These method returns a list of Order objects.

    // Get all completed orders
    var completedOrders = Transactions.GetOrders();
    
    // Get all completed orders that pass a filter
    var filteredCompletedOrders = Transactions.GetOrders(x => x.Quantity > 10);
    
    // Get a list of all completed orders for a symbol
    var symbolCompletedOrders = Transactions.GetOrders(x => x.Symbol == symbol);
    
    // Get all open orders
    var openOrders = Transactions.GetOpenOrders();
    
    // Get all open orders that pass a filter
    var filteredOpenOrders = Transactions.GetOpenOrders(x => x.Quantity > 10);
    
    // Get a list of all open orders for a symbol
    var symbolOpenOrders = Transactions.GetOpenOrders(symbol);
    
    // Get all open and completed orders that correspond to an Id that the brokerage assigned in live trading
    var ordersByBrokerageId = Transactions.GetOrdersByBrokerageId(brokerageId);
    # Get all completed orders
    completed_Orders = self.transactions.get_orders()
    
    # Get all completed orders that pass a filter
    filtered_completed_orders = self.transactions.get_orders(lambda x: x.quantity > 10)
    
    # Retrieve a list of all completed orders for a symbol
    symbol_completed_orders = self.transactions.get_orders(lambda x: x.symbol == symbol)
    
    # Get all open orders
    open_orders = self.transactions.get_open_orders()
    
    # Get all open orders that pass a filter
    filtered_open_orders = self.transactions.get_open_orders(lambda x: x.quantity > 10)
    
    # Retrieve a list of all open orders for a symbol
    symbol_open_orders = self.transactions.get_open_orders(symbol)
    
    # Get all open and completed orders that correspond to an Id that the brokerage assigned in live trading
    orders_by_brokerage_id = self.transactions.get_orders_by_brokerage_id(brokerageId)

    Order objects have the following attributes:

    The OrdersCount orders_count property gets the current number of orders that have been processed.

    Get Remaining Order Quantity

    To get the unfilled quantity of open orders, call the GetOpenOrdersRemainingQuantity get_open_orders_remaining_quantity method.

    // Get the quantity of all open orders
    var allOpenQuantity = Transactions.GetOpenOrdersRemainingQuantity();
    
    // Get the quantity of open orders that pass a filter
    var filteredOpenQuantity = Transactions.GetOpenOrdersRemainingQuantity(
        orderTicket => orderTicket.Quantity > 10
    );
    
    // Get the quantity of open orders for a symbol
    var symbolOpenQuantity = Transactions.GetOpenOrdersRemainingQuantity(symbol);
    
    # Get the quantity of all open orders
    all_open_quantity = self.transactions.get_open_orders_remaining_quantity()
    
    # Get the quantity of open orders that pass a filter
    filtered_open_quantity = self.transactions.get_open_orders_remaining_quantity(
        lambda order_ticket: order_ticket.quantity > 10
    )
    
    # Get the quantity of open orders for a symbol
    symbol_open_quantity = self.transactions.get_open_orders_remaining_quantity(symbol)

    Cancel Orders

    To cancel open orders, call the CancelOpenOrders cancel_open_orders method. This method returns a list of OrderTicket objects that correspond to the canceled orders.

    // Cancel all open orders
    var allCancelledOrders = Transactions.CancelOpenOrders();
    
    // Cancel orders related to IBM and apply a tag
    var ibmCancelledOrders = Transactions.CancelOpenOrders("IBM", "Hit stop price");
    
     # Cancel all open orders
    all_cancelled_orders = self.transactions.cancel_open_orders()
    
    # Cancel orders related to IBM and apply a tag
    ibm_cancelled_orders = self.transactions.cancel_open_orders("IBM", "Hit stop price")
    

     

    Trading and Orders

    Order Types

    You can place any of the following order types that your brokerage supports. Click one to learn more.

    See Also

    Brokerages

     

    Order Types

    Market Orders

    Introduction

    Market orders are instructions to trade a specific number of units, regardless of the fill price. If your highest priority is to fill an order as fast as possible, use market orders. If the order book of the security you're trading has sufficient liquidity when the brokerage receives your order, it immediately fills. However, if there is not enough liquidity by the brokerage, you may need to wait a few minutes to fill the order, you may get partial fills, and you may incur additional costs from market impact.

    Place Orders

    To send a market order, call the MarketOrder , Buy , Sell , or Order market_order , buy , sell , or order method and provide a Symbol and quantity. If you don't have sufficient capital for the order, it's rejected. By default, market orders are synchronous and fill immediately.

    // Buy orders
    MarketOrder("IBM", 100);
    Buy("AAPL", 10);
    Order("SPY", 20);
    
    // Sell orders
    MarketOrder("AMZN", -15);
    Sell("TSLA", 25);
    Order("SPY", -20);
    
    # Buy orders
    self.market_order("IBM", 100)
    self.buy("AAPL", 10)
    self.order("SPY", 20)
    
    # Sell orders
    self.market_order("AMZN", -15)
    self.sell("TSLA", 25)
    self.order("SPY", -20)
    

    You can also provide a tag and order properties to the Order and MarketOrder order and market_order methods.

    MarketOrder(symbol, quantity, tag: tag, orderProperties: orderProperties);
    self.market_order(symbol, quantity, tag=tag, order_properties=order_properties)

    If you place a market order during pre-market or post-market hours, LEAN converts your order to market on open order. To override this behavior, create a custom fill model . To be notified when the default fill model allows you to submit market orders outside of regular trading hours, subscribe to GitHub Issue #3947 .

    Monitor Order Fills

    If the brokerage has sufficient liquidity in their order book, market orders fill immediately. Otherwise, you get partial fills. To monitor the fills of your order, save a reference to the order ticket .

    var ticket = MarketOrder("XLK", 10);
    Debug($"Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    ticket = self.market_order("XLK", 10)
    self.debug(f"Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Synchronous Timeouts

    Market orders are synchronous by default, so your algorithm waits for the order to fill before moving to the next line of code. If your order takes longer than five seconds to fill, your algorithm continues executing even if the trade isn't filled. To adjust the timeout period, set the Transactions.MarketOrderFillTimeout transactions.market_order_fill_timeout property.

    // Adjust the market fill-timeout to 30 seconds.
    Transactions.MarketOrderFillTimeout = TimeSpan.FromSeconds(30);
    
     # Adjust the market fill-timeout to 30 seconds.
    self.transactions.market_order_fill_timeout = timedelta(seconds=30)

    Market orders may take a few minutes to fill for illiquid assets such as out-of-the-money Options or penny stocks.

    Place Asynchronous Orders

    When you trade a large portfolio of assets, you may want to send orders in batches and not wait for the response of each one. To send asynchronous orders, set the asynchronous argument to true.

    MarketOrder("IBM", 100, asynchronous: true);
    
    self.market_order("IBM", 100, True)
    

    Cancel Orders

    To cancel a market order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with market orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for market orders, see the Orders section of the brokerage model documentation .

    Requirements

    You can submit market orders during regular trading hours for all asset classes. For Futures and Future Options, you can place market orders during regular and extended market hours. For all other asset classes, if you place market orders at/after the last minute of regular market hours, LEAN converts the market orders into market-on-open orders as long as the asset class supports them . To view the trading hours of each asset class, follow these steps:

    1. Open the Asset Classes documentation.
    2. Click an asset class.
    3. Click Market Hours .

    Example

    The following backtest verifies the MarketOrder market_order behavior. The algorithm buys SPY on the first day and liquidates the position on the second day. The following table shows the first two trades in the backtest:

    Time Symbol Price Quantity Type Status Value Tag
    2021-07-01T09:31:00Z SPY 429.11 10 Market Filled 4291.10
    2021-07-02T09:31:00Z SPY 431.54 -10 Market Filled -4315.40

    On July 1, 2021, the algorithm buys SPY at $429.11. The fill model fills this order at the ask close price.

    On July 2, 2021, the algorithm sells the SPY holdings at $431.54. The fill model fills this order at the bid close price.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Limit Orders

    Introduction

    Limit orders are instructions to trade a quantity of an asset at a specific price or a better price. A marketable limit order has a limit price that crosses the spread. An unmarketable limit order has a limit price that doesn't cross the spread. For example, if an asset has an ask price of $100 and you place a limit order to buy at $100 or higher, that's a marketable limit order that should immediately fill. If you place a limit order to buy at $99.99 or lower, that's an unmarketable limit order that should go on the order book. Unmarketable limit orders save you from paying spread costs. Some brokerages even charge you a lower transaction fee if you use unmarketable limit orders rather than marketable limit orders.

    Limit orders are helpful in illiquid markets. You can use them to get a good entry price or to set a take-profit level on an existing holding. However, if the market trades away from your limit price, you may have to adjust your limit price or wait for the market to trade back to your limit price to fill the order.

    Place Orders

    To send a limit order, call the LimitOrder limit_order method with a Symbol , quantity, and limit price. You can also provide a tag and order properties to the LimitOrder limit_order method. If you do not have sufficient capital for the order, it's rejected.

    LimitOrder(symbol, quantity, limitPrice, tag, orderProperties);
    self.limit_order(symbol, quantity, limit_price, tag, order_properties)

    To buy an asset with a marketable limit order, set the limit price to the current ask price or higher.

    To sell an asset with a marketable limit order, set the limit price to the current bid price or lower.

    To buy an asset with an unmarketable limit order, set the limit price below the current ask price.

    // Buy 1 Bitcoin when the price drops to $34,000
    LimitOrder("BTCUSD", 1, 34000);
    # Buy 1 Bitcoin when the price drops to $34,000
    self.limit_order("BTCUSD", 1, 34000)
    When the asset currently trades at 55,000, the limit price is set at 34,000. The limit order is filled when the price drops to 34,000.

    To sell an asset with an unmarketable limit order, set the limit price above the current bid price.

    // Sell 1 Bitcoin when the price moves up to $60,000
    LimitOrder("BTCUSD", -1, 60000);
    # Sell 1 Bitcoin when the price moves up to $60,000
    self.limit_order("BTCUSD", -1, 60000)
    When the asset currently trades at 45,000, the limit price is set at 60,000. The limit order is filled when the price move up to 60,000.

    Monitor Order Fills

    Limit orders fill when the security price passes the limit price. To monitor the fills of your order, save a reference to the order ticket .

    // Buy 10 shares of XLK at $140
    var ticket = LimitOrder("XLK", 10, 140); Debug($"Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    # Buy 10 shares of XLK at $140
    ticket = self.limit_order("XLK", 10, 140)
    self.debug(f"Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Update Orders

    You can update the quantity, limit price, and tag of limit orders until the order fills or the brokerage prevents modifications. To update an order, pass an UpdateOrderFields object to the Update update method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Update update method returns an OrderResponse to signal the success or failure of the update request.

    // Create a new order and save the order ticket
    var ticket = LimitOrder("SPY", 100, 221.05m, tag: "original tag");
    
    // Update the order
    var response = ticket.Update(new UpdateOrderFields() 
    {
        Quantity = 80,
        LimitPrice = 222.00m,
        Tag = "new tag"
    });
    
    // Check if the update was successful
    if (response.IsSuccess) 
    {
        Debug("Order updated successfully");
    }
    # Create a new order and save the order ticket
    ticket = self.limit_order("SPY", 100, 221.05, tag="original tag")
    
    # Update the order
    update_settings = UpdateOrderFields()
    update_settings.quantity = 80
    update_settings.limit_price = 222.00
    update_settings.tag = "new tag"
    response = ticket.update(update_settings)
    
    # Check if the update was successful
    if response.is_success:
        self.debug("Order updated successfully")

    To update individual fields of an order, call any of the following methods:

    var limitResponse = ticket.UpdateLimitPrice(limitPrice, tag);
    
    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_limit_price(limit_price, tag)
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_tag(tag)
    
    

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Cancel Orders

    To cancel a limit order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with limit orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for limit orders, see the Orders section of the brokerage model documentation .

    Requirements

    Limit orders can be submitted at any time for all security types.

    If your algorithm subscribes to extended market hours, they can be filled outside regular trading hours.

    Example

    The following backtest verifies the LimitOrder limit_order method behavior. On the first day, the algorithm buys SPY with an unmarketable limit order. On the second day, the algorithm sells SPY with an unmarketable limit order and places another unmarketable limit order to buy SPY, which doesn't fill. The following table shows the first three trades in the backtest:

    Submitted Time Filled Time Symbol Limit Price Filled Price Quantity Type Status Value Tag
    2021-07-01T09:31:00Z 2021-07-01T09:32:00Z SPY 429.00 429.00 10 Limit Filled 4290.00 Limit Price: ¤429.00
    2021-07-02T09:31:00Z 2021-07-02T09:35:00Z SPY 431.70 431.70 -10 Limit Filled -4317.00 Limit Price: ¤431.70
    2021-07-02T09:31:00Z / SPY 400.00 / 10 Limit Submitted / Limit Price: ¤400.00

    On July 1, 2021 at 9:31 AM Eastern Time (ET), the algorithm places a buy limit order with a limit price of $429 when the ask low price is $428.81 and the ask high price is $429.15. The order fills at 9:32 AM ET at a price of $429. The fill model fills buy limit orders when the ask low price is less than the limit price. It sets the fill price of the order to the minimum of ask high price and the limit price.

    On July 2, 2021 at 9:31 AM ET, the algorithm places a sell limit order at $431.70 and a buy limit order at $400. At the time of the order, the bid high price is $431.65, the bid low price is $431.49, and the ask low price is $431.50. The sell limit order fills at 9:35 AM ET at a price of $431.70 and the buy limit order doesn't fill. The fill model fills sell limit order when the bid high price is greater than the limit price. It sets the fill price of the order to the maximum of the bid low price and the limit price. The buy limit order doesn't fill because the ask low price is above the limit price for the remainder of the backtest period.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Limit if Touched Orders

    Introduction

    Limit if touched (LIT) orders are instructions to place a limit order once an asset touches a specific price level. A buy LIT order has a trigger price below the current market price and a sell LIT order has a trigger price above the current market price. In effect, LIT orders are the opposite of stop limit orders .

    Place Orders

    To send a LIT order, call the LimitIfTouchedOrder limit_if_touched_order method and provide a Symbol , quantity, trigger price, and limit price. You can also provide a tag and order properties to the LimitIfTouchedOrder limit_if_touched_order method. If you do not have sufficient capital for the order, it's rejected.

    LimitIfTouchedOrder(symbol, quantity, triggerPrice, limitPrice, tag, orderProperties);
    self.limit_if_touched_order(symbol, quantity, trigger_price, limit_price, tag, order_properties)

    To buy an asset with a LIT order that has a marketable limit price, set the trigger price below the current market price and set the limit price above the trigger price.

    // Once Bitcoin trades down to $36,000, place a limit order to buy 1 Bitcoin at $38,000
    LimitIfTouchedOrder("BTCUSD", 1, 33000, 36000);
    
    # Once Bitcoin trades down to $36,000, place a limit order to buy 1 Bitcoin at $38,000
    self.limit_if_touched_order("BTCUSD", 1, 33000, 36000)
    When the market price is at $55,000, a marketable buy limit if touched order is set with a trigger price at $33,000 and a limit price at $36,000. The trigger is hit, the limit is set, and the LIT order is filled when the price break below the trigger price.

    To sell an asset with a LIT order that has a marketable limit price, set the trigger price above the current market price and set the limit price below the trigger price.

    // Once Bitcoin trades up to $62,000, place a limit order to sell 1 Bitcoin at $59,000
    LimitIfTouchedOrder("BTCUSD", -1, 62000, 59000);
    # Once Bitcoin trades up to $62,000, place a limit order to sell 1 Bitcoin at $59,000
    self.limit_if_touched_order("BTCUSD", -1, 62000, 59000)
    When the asset is trading at $47,000, place a marketable sell limit-if-touched order with a trigger price at $62,000 and a limit price at $59,000. The trigger is hit, the limit is set, and the limit-if-touched order fills when the asset trades up to $62,000.

    To buy an asset with a LIT order that has an unmarketable limit price, set the trigger price below the current market price and set the limit price below the trigger price.

    // Once Bitcoin trades down to $46,000, place a limit order to buy 1 Bitcoin at $36,000
    LimitIfTouchedOrder("BTCUSD", 1, 46000, 36000);
    # Once Bitcoin trades down to $46,000, place a limit order to buy 1 Bitcoin at $36,000
    self.limit_if_touched_order("BTCUSD", 1, 46000, 36000)
    When the market price is at $56,000, set an unmarketable buy limit if touched order with a trigger price at $46,000 and a limit price at $36,000. The trigger is hit and the the limit is set when the asset trades down to $46,000. Then the limit-if-touched order fills when the asset trades down to $36,000.

    To sell an asset with a LIT order that has an unmarketable limit price, set the trigger price above the current market price and set the limit price above the trigger price.

    // Once Bitcoin trades up to $54,000, place a limit order to sell 1 Bitcoin at $62,000
    LimitIfTouchedOrder("BTCUSD", -1, 54000, 62000);
    # Once Bitcoin trades up to $54,000, place a limit order to sell 1 Bitcoin at $62,000
    self.limit_if_touched_order("BTCUSD", -1, 54000, 62000)
    When the market price is at $42,000, set a marketable sell limit if touched order with a trigger price at $54,000 and a limit price at $62,000. The trigger is hit and the the limit is set when the asset trades up to $54,000. The limit-if-touched order fills when the asset trades up to $62,000.

    Monitor Order Fills

    LIT orders fill when the security price touches the trigger price and is at least as favorable as the limit price. To monitor the fills of your order, save a reference to the order ticket .

    // Once SPY trades down to $425, place a limit order to buy 10 shares at $415
    var ticket = LimitIfTouchedOrder("SPY", 10, 425, 415);
    Debug($"Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    # Once SPY trades down to $425, place a limit order to buy 10 shares at $415
    ticket = self.limit_if_touched_order("SPY", 10, 425, 415)
    self.debug(f"Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Update Orders

    You can update the quantity, trigger price, limit price, and tag of LIT orders until the order fills or the brokerage prevents modifications. To update an order, pass an UpdateOrderFields object to the Update update method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Update update method returns an OrderResponse to signal the success or failure of the update request.

    // Create a new order and save the order ticket
    var ticket = LimitIfTouchedOrder("SPY", 100, 350, 340, tag: "Original tag");
    
    // Update the order
    var updateOrderFields = new UpdateOrderFields()
    {
        Quantity = 80,
        TriggerPrice = 380,
        LimitPrice = 370,
        Tag = "New tag"
    }
    var response = ticket.Update(updateOrderFields);
    
    // Check the OrderResponse
    if (response.IsSuccess)
    { 
        Debug("Order updated successfully");
    }
    # Create a new order and save the order ticket
    ticket = self.limit_if_touched_order("SPY", 100, 350, 340, tag="Original tag")
    
    # Update the order
    update_order_fields = UpdateOrderFields()
    update_order_fields.quantity = 80
    update_order_fields.trigger_price = 380
    update_order_fields.limit_price = 370
    update_order_fields.tag = "New tag"
    response = ticket.update(update_settings)
    
    # Check the OrderResponse
    if response.is_success:
        self.debug("Order updated successfully")

    To update individual fields of an order, call any of the following methods:

    var limitResponse = ticket.UpdateLimitPrice(limitPrice, tag);
    
    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var triggerResponse = ticket.UpdateTriggerPrice(triggerPrice, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_limit_price(limit_price, tag)
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_trigger_price(trigger_price, tag)
    
    response = ticket.update_tag(tag)
    
    

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Cancel Orders

    To cancel a LIT order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with LIT orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for LIT orders, see the Orders section of the brokerage model documentation .

    Requirements

    LIT orders can be submitted at any time for all security types.

    If your algorithm subscribes to extended market hours, they can be filled outside regular trading hours.

    Example

    The following backtest verifies the LimitIfTouchedOrder limit_if_touched_order behavior. The following table shows the trades in the backtest:

    Submitted Time Filled Time Symbol Trigger Price Limit Price Filled Price Quantity Type Status Value Tag
    2021-07-01T09:31:00Z 2021-07-01T09:38:00Z SPY 429.00 428.95 428.95 10 Limit if touched Filled 4285.00 Trigger Price: ¤429.00
    Limit Price: ¤428.95
    2021-07-02T09:31:00Z 2021-07-02T09:49:00Z SPY 431.70 431.75 431.84 -10 Limit if touched Filled -4318.40 Trigger Price: ¤431.70
    Limit Price: ¤431.75
    2021-07-02T09:31:00Z / SPY 431.70 400.00 / 10 Limit if touched Submitted / Trigger Price: ¤431.70
    Limit Price: ¤400.00
    / / SPY 400.00 400.00 / 10 Limit if touched Submitted / Trigger Price: ¤400.00
    Limit Price: ¤400.00

    On July 1, 2021 at 9:31 AM Eastern Time (ET), the algorithm places a LIT order to buy SPY with a trigger price of $429 and a limit price of $428.95. At the time of the order submission, the low price was $428.80 and the bid close price was $429.10. The order fills at 9:38 AM ET at a price of $428.95. The fill model sets the limit price for buy orders when the low price is less than or equal to the trigger price, fills the order when the bid close price is less than or equal to the limit price, and sets the fill price to the minimum of the ask price and the limit price.

    On July 2, 2021 at 9:31 AM ET, the algorithm places a LIT order to sell SPY with a trigger price of $431.70 and a limit price of $431.75. At the time of the order submission, the high price was $431.78 and the ask close price was $431.55. The order fills at 9:49 AM ET at a price of $431.84. The fill model sets the limit price for sell orders when the high price is greater than or equal to the trigger price, fills the order when the ask close price is greater than or equal to the limit price, and sets the fill price to the maximum of the bid price and the limit price.

    On July 2, 2021, the algorithm places a third LIT order to buy SPY with a trigger price of $431.70 and a limit price of $400. The fill model sets the fill price, but it doesn't fill the order because the limit price is too low. On the same day, the algorithm places a fourth LIT order to buy SPY with a trigger price of $400 and a limit price of $400. The fill model doesn't set the limit price for this order because SPY doesn't touch the trigger price before the backtest ends.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Stop Market Orders

    Introduction

    Stop market orders fill as a market order when the asset reaches a specific price. A buy stop market order triggers when the asset price is greater than or equal to the stop price. A sell stop market order triggers when the asset price is less than or equal to the stop price. You can use stop market orders to buy breakouts or to mitigate the risk of large losses. However, if the market gaps past your stop price, the order may fill at a worse price than the stop price you set. There is no guarantee that a stop market order fills at the stop price.

    Place Orders

    To send a stop market order, call the StopMarketOrder stop_market_order method and provide a Symbol , quantity, and stop price. You can also provide a tag and order properties to the StopMarketOrder stop_market_order method. If you do not have sufficient capital for the order, it is rejected.

    StopMarketOrder(symbol, quantity, stopPrice, tag, orderProperties);
    self.stop_market_order(symbol, quantity, stop_price, tag, order_properties)

    To buy an asset with a stop market order, set the stop price above the current ask price.

    // When Bitcoin trades up to $60,000, buy 1 Bitcoin
    StopMarketOrder("BTCUSD", 1, 60000);
    # When Bitcoin trades up to $60,000, buy 1 Bitcoin
    self.stop_market_order("BTCUSD", 1, 60000)
    When the asset currently trades at $45,000, the stop price of the buy stop market order is set at $60,000. The order fills when the price trades up to $60,000.

    To sell an asset with a stop market order, set the stop price below the current bid price.

    // When Bitcoin trades down to $43,000, sell 1 Bitcoin
    StopMarketOrder("BTCUSD", -1, 43000);
    # When Bitcoin trades down to $43,000, sell 1 Bitcoin
    self.stop_market_order("BTCUSD", -1, 43000)
    When the asset currently trades at $56,000, the stop price of the sell stop market order is set at $43,000. The order fills when the price trades down to $43,000.

    Monitor Order Fills

    Stop market orders fill as a market order when the security price passes the stop price. To monitor the fills of your order, save a reference to the order ticket .

    // When XLK trades down to $130, sell 10 shares
    var ticket = StopMarketOrder("XLK", -10, 130);
    Debug($"Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    # When XLK trades down to $130, sell 10 shares
    ticket = self.stop_market_order("XLK", -10, 130)
    self.debug(f"Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Update Orders

    You can update the quantity, stop price, and tag of stop market orders until the order fills or the brokerage prevents modifications. To update an order, pass an UpdateOrderFields object to the Update update method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Update update method returns an OrderResponse to signal the success or failure of the update request.

    // Create a new order and save the order ticket
    var ticket = StopMarketOrder("SPY", -100, 415, tag: "original tag");
    
    // Update the order
    var response = ticket.Update(new UpdateOrderFields() { 
      Quantity = -80,
      StopPrice = 400,
      Tag = "new tag"
    });
    
    // Check if the update was successful
    if (response.IsSuccess) { 
         Debug("Order updated successfully");
    }
    
    # Create a new order and save the order ticket
    ticket = self.stop_market_order("SPY", -100, 415, tag="original tag")
    
    # Update the order
    update_settings = UpdateOrderFields()
    update_settings.quantity = -80
    update_settings.stop_price = 400
    update_settings.tag = "new tag"
    response = ticket.update(update_settings)
    
    # Check if the update was successful
    if response.is_success:
         self.debug("Order updated successfully")
    

    To update individual fields of an order, call any of the following methods:

    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var stopResponse = ticket.UpdateStopPrice(stopPrice, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_stop_price(stop_price, tag)
    
    response = ticket.update_tag(tag)
    
    

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Cancel Orders

    To cancel a stop market order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with stop market orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for stop market orders, see the Orders section of the brokerage model documentation .

    Requirements

    Stop market orders can be submitted at any time for all security types.

    Example

    The following backtest verifies the StopMarketOrder stop_market_order behavior. On even days, the algorithm buys SPY at the current market price and sells when the price drops 1%. On odd days, the algorithm shorts SPY and buys when the price rises 1%. The following table shows the first four trades in the backtest:

    Time Symbol Price Quantity Type Status Value Tag
    2021-07-01T13:31:00Z SPY 429.10 -1 Market Filled -429.10
    2021-07-01T13:31:00Z SPY 433.44 1 Stop Market Filled 433.44 Stop Price: 433.43
    2021-07-02T17:04:00Z SPY 433.44 1 Market Filled 433.44
    2021-07-02T17:04:00Z SPY 429.00 -1 Stop Market Filled -429.00 Stop Price: 429.10

    On July 1, 2021, the algorithm shorts SPY at $429.10 and then buys it back at $433.44 when the stop price is $433.43. The stop price is 1% above the market price. Note that $429.10 is not the market price when the algorithm places the first two orders. $429.10 is the fill price at the bid, but it's not far from the market price because 429.1 * 1.01 = 433.39. The fill price of the stop market order is $433.44, which, as expected, is higher than $433.43. The fill model assumes the worst-case scenario between the market price and the stop price. In this case, the worst-case scenario is the maximum of the market price and stop price.

    On July 2, 2021, the algorithm buys SPY at $433.44 and sells it at $429 when the stop price is $429.10. The stop price is 1% below the market price. Note that $433.44 is not the market price when the algorithm places the second two orders. $433.44 is the fill price at the ask, but it's not far off from the market price because 433.44 * 0.99 = 429.11. The fill price of the stop market order is $429, which, as expected, is lower than $429.10. The fill model assumes the worst-case scenario between the market price and the stop price. In this case, the worst-case scenario is the minimum of the market price and stop price.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Stop Limit Orders

    Introduction

    Stop limit orders are instructions to place a limit order once an asset passes a specific price level. They are similar to stop market orders , but use limit orders instead of market orders to give you more control over the fill price. A buy stop limit order has a stop price above the current market price and a sell stop limit order has a stop price below the current market price. In effect, they are the opposite of limit if touched orders .

    Place Orders

    To send a stop limit order, call the StopLimitOrder stop_limit_order method and provide a Symbol , quantity, stop price, and limit price. You can also provide a tag and order properties to the StopLimitOrder stop_limit_order method. If you do not have sufficient capital for the order, it is rejected.

    StopLimitOrder(symbol, quantity, stopPrice, limitPrice, tag, orderProperties);
    self.stop_limit_order(symbol, quantity, stop_rice, limit_price, tag, order_properties)

    To buy an asset with a stop limit order that has a marketable limit price, set the stop price above the current market price and set the limit price above the stop price.

    // When Bitcoin trades up to $59,000, buy 1 Bitcoin with a limit order at $62,000
    StopLimitOrder("BTCUSD", 1, 59000, 62000);
    # When Bitcoin trades up to $59,000, buy 1 Bitcoin with a limit order at $62,000
    self.stop_limit_order("BTCUSD", 1, 59000, 62000)
    When the asset is trading at $46,000, place an unmarketable sell stop limit order with a stop at $59,000 and a limit at $62,000. The stop is hit, the limit is set, and the order fills when the asset trades up to $59,000.

    To buy an asset with a stop limit order that has an unmarketable limit price, set the stop price above the current market price and set the limit price below the stop price.

    // When Bitcoin trades up to $52,000, buy 1 Bitcoin with a limit order at $41,000
    StopLimitOrder("BTCUSD", 1, 52000, 41000);
    
    # When Bitcoin trades up to $52,000, buy 1 Bitcoin with a limit order at $41,000
    self.stop_limit_order("BTCUSD", 1, 52000, 41000)
    When the asset is trading at $37,000, place an unmarketable buy stop limit order with a stop at $52,500 and a limit at $41,000. The stop is hit and the limit is set when the asset trades up to $52,500. Then the stop limit order fills when the security trades down to $41,000.

    To sell an asset with a stop limit order that has an unmarketable limit price, set the stop price below the current market price and set the limit price above the stop price.

    // When Bitcoin trades down to $49,000, sell 1 Bitcoin with a limit order at $58,000
    StopLimitOrder("BTCUSD", -1, 49000, 58000);
    # When Bitcoin trades down to $49,000, sell 1 Bitcoin with a limit order at $58,000
    self.stop_limit_order("BTCUSD", -1, 49000, 58000)
    When the asset is trading at $57,000, place an unmarketable sell stop limit order with a stop at $49,000 and a limit at $58,000. The stop is hit and the limit is set when the asset trades down to $49,000. Then the stop limit order fills when the security trades up to $58,000.

    To sell an asset with a stop limit order that has a marketable limit price, set the stop price below the current market price and set the limit price below the stop price.

    // When Bitcoin trades down to $37,000, sell 1 Bitcoin with a limit order at $34,000
    StopLimitOrder("BTCUSD", -1, 37000, 34000);
    # When Bitcoin trades down to $37,000, sell 1 Bitcoin with a limit order at $34,000
    self.stop_limit_order("BTCUSD", -1, 37000, 34000)
    When the asset is trading at $57,000, place a marketable sell stop limit order with a stop at $37,000 and a limit at $34,000. The stop is hit, the limit is set, and the order fills when the asset trades down to $37,000.

    Monitor Order Fills

    Stop limit orders fill as limit orders when the security price passes the stop price. To monitor the fills of your order, save a reference to the order ticket .

    // When GLD trades up to $200, buy 10 shares with a limit order at $205
    var ticket = StopLimitOrder("GLD", 10, 200, 205);
    Debug($"Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    # When GLD trades up to $200, buy 10 shares with a limit order at $205
    ticket = self.stop_limit_order("GLD", 10, 200, 205)
    self.debug(f"Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Update Orders

    You can update the quantity, stop price, limit price, and tag of stop limit orders until the order fills or the brokerage prevents modifications. To update an order, pass an UpdateOrderFields object to the Update update method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Update update method returns an OrderResponse to signal the success or failure of the update request.

    // Create a new order and save the order ticket
    var ticket = StopLimitOrder("SPY", -10, 400, 390, tag: "original tag");
    
    // Update the order
    var response = ticket.Update(new UpdateOrderFields() { 
      Quantity = -15,
      StopPrice = 415,
      LimitPrice = 395,
      Tag = "new tag"
    });
    
    // Check if the update was successful
    if (response.IsSuccess) { 
         Debug("Order updated successfully");
    }
    
    # Create a new order and save the order ticket
    ticket = self.stop_limit_order("SPY", -10, 400, 390, tag="original tag")
    
    # Update the order
    update_settings = UpdateOrderFields()
    update_settings.quantity = -15
    update_settings.stop_price = 415
    update_settings.limit_price = 395
    update_settings.tag = "new tag"
    response = ticket.update(update_settings)
    
    # Check if the update was successful
    if response.is_success:
         self.debug("Order updated successfully")
    

    To update individual fields of an order, call any of the following methods:

    var limitResponse = ticket.UpdateLimitPrice(limitPrice, tag);
    
    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var stopResponse = ticket.UpdateStopPrice(stopPrice, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_limit_price(limit_price, tag)
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_stop_price(stop_price, tag)
    
    response = ticket.update_tag(tag)
    
    

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with stop limit orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for stop limit orders, see the Orders section of the brokerage model documentation .

    Requirements

    Stop limit orders can be submitted at any time for all security types.

    If your algorithm subscribes to extended market hours, they can be filled outside regular trading hours.

    Example

    The following backtest verifies the StopLimitOrder stop_limit_order behavior. The following table shows the trades in the backtest:

    Submitted Time Filled Time Symbol Stop Price Limit Price Filled Price Quantity Type Status Value Tag
    2021-07-01T09:31:00Z 2021-07-01T09:37:00Z SPY 428.95 429.00 429.00 -10 Stop Limit Filled -4290.00 Stop Price: ¤428.95 Limit Price: ¤429.00
    2021-07-02T09:31:00Z 2021-07-02T10:12:00Z SPY 431.80 431.75 431.75 10 Stop Limit Filled 4317.50 Stop Price: ¤431.80 Limit Price: ¤431.75

    On July 1, 2021 at 9:31 AM Eastern Time (ET), the algorithm places a stop limit order to sell SPY with a stop price of $428.95 and a limit price of $429. At the time of the order submission, the ask high price is $429.16 and the ask close price is $429.11. The order fills at 9:37 AM ET at a price of $429. The fill model triggers the stop for buy orders when the ask high price is greater than the stop price, fills the order when the ask close price is less than the limit price, and sets the fill price to the maximum of the ask high price and the limit price.

    On July 2, 2021 at 9:31 AM ET, the algorithm places a stop limit order to buy SPY with a stop price of $431.80 and a limit price of $431.75. At the time of the order submissions, the bid low price is $431.49 and the bid close price is $431.54. The order fills at 10:12 AM ET at a price of $431.75. The fill model triggers the stop for sell orders when bid low price is less than the stop price, fills the order when the ask close price is less than the limit price, and sets the fill price to the minimum of the ask high price and the limit price.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Trailing Stop Orders

    Introduction

    Trailing stop orders are stop market orders with a dynamic stop price. A sell trailing stop starts with the stop price at a fixed amount below the market price. As the market price rises, the stop price rises by the trail amount, but if the stock price falls, the stop loss price doesn't change. A buy trailing stop order starts with the stop price at a fixed amount above the market price. As the market price falls, the stop price falls by the trail amount, but if the stock price rises, the stop loss price doesn't change.

    Trailing stop orders fill as a market order when the asset reaches the stop price. You can use trailing stop orders to buy breakouts or to mitigate the risk of large losses while protecting your gains. However, if the market gaps past your stop price, the order may fill at a worse price than the stop price you set. There's no guarantee that a trailing stop order fills at the stop price.

    Place Orders

    To send a trailing stop order, call the TrailingStopOrder trailing_stop_order method and provide a Symbol , quantity, trailing amount, and the trailing type. You can also provide a tag and order properties to the TrailingStopOrder trailing_stop_order method. If you do not have sufficient capital for the order, it is rejected.

    TrailingStopOrder(symbol, quantity, trailingAmount, trailingAsPercentage, tag, orderProperties);
    self.trailing_stop_order(symbol, quantity, trailing_amount, trailing_as_percentage, tag, order_properties)

    If you set the trailingAsPercentage trailing_as_percentage parameter to false False , the trailingAmount trailing_amount is denominated in the asset's quote currency .

    Buy With a Currency-Based Trailing Stop

    To buy an asset with a currency-based trailing stop order, pass the trailing amount and disable the trailingAsPercentage trailing_as_percentage parameter.

    // Buy 1 share of SPY through a trailing stop order that starts $30 above the current price
    TrailingStopOrder("SPY", 1, 30m, false);
    # Buy 1 share of SPY through a trailing stop order that starts $30 above the current price
    self.trailing_stop_order("SPY", 1, 30, False)
    When the asset currently trades at $440, the stop price of the buy stop market order is set at $470 and a trailing amount of $30. The order fills when the price trades up to $402.82.

    Buy With a Percent-Based Trailing Stop

    To buy an asset with a percent-based trailing stop order, pass the trailing percent and enable the trailingAsPercentage trailing_as_percentage parameter.

    // Buy 1 share of SPY through a trailing stop order that starts 7% above the current price
    TrailingStopOrder("SPY", 1, 0.07m, true);
    # Buy 1 share of SPY through a trailing stop order that starts 7% above the current price
    self.trailing_stop_order("SPY", 1, 0.07, True)
    When the asset currently trades at $440, the stop price of the buy stop market order is set at $470 and a trailing amount of 7%. The order fills when the price trades up to $398.92.

    Sell With a Currency-Based Trailing Stop

    To sell an asset with a currency-based trailing stop order, pass the trailing amount and disable the trailingAsPercentage trailing_as_percentage parameter.

    // Sell 1 share of SPY through a trailing stop order that starts $20 below the current price
    TrailingStopOrder("SPY", -1, 20m, false)
    # Sell 1 share of SPY through a trailing stop order that starts $20 below the current price
    self.trailing_stop_order("SPY", -1, 20, False)
    When the asset currently trades at $415, the stop price of the sell stop market order is set at $395 and a trailing amount of $20. The order fills when the price trades down to $420.49.

    Sell With a Percent-Based Trailing Stop

    To sell an asset with a percent-based trailing stop order, pass the trailing percent and enable the trailingAsPercentage trailing_as_percentage parameter.

    // Sell 1 share of SPY through a trailing stop order that starts 5% above the current price
    TrailingStopOrder("SPY", -1, 0.05m, true);
    # Sell 1 share of SPY through a trailing stop order that starts 5% above the current price
    self.trailing_stop_order("SPY", -1, 0.05, True)
    When the asset currently trades at $415, the stop price of the sell stop market order is set at $395 and a trailing amount of 5%. The order fills when the price trades down to $418.46.

    Custom Starting Prices

    In the preceding examples, LEAN calculates the stop price based on the current security price. If you want the order to start with a stop price closer to the security price than the trailingAmount trailing_amount , pass a stopPrice stop_price parameter to the TrailingStopOrder trailing_stop_order method.

    TrailingStopOrder(symbol, quantity, stopPrice, trailingAmount, trailingAsPercentage, tag, orderProperties);
    self.trailing_stop_order(symbol, quantity, stop_price, trailing_amount, trailing_as_percentage, tag, order_properties)

    Monitor Order Fills

    Trailing stop orders fill as a market order when the security price passes the stop price. To monitor the fills of your order, save a reference to the order ticket .

    // When XLK trades down to less than 5% of the current price, sell 10 shares, and update 
    var ticket = TrailingStopOrder("XLK", -10, 0.05, true);
    Debug($"Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    # When XLK trades down to less than 5% of the current price
    ticket = self.trailing_stop_order("XLK", -10, 0.05, True)
    self.debug(f"Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Update Orders

    The security's fill model automatically updates the stop price of trailing stop orders as the security's price moves away from the stop price. You can update the quantity, stop price, and tag of trailing stop orders until the order fills or the brokerage prevents modifications. To update an order, pass an UpdateOrderFields object to the Update update method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Update update method returns an OrderResponse to signal the success or failure of the update request.

    // Create a new order and save the order ticket
    var ticket = TrailingStopOrder("SPY", -100, 415, 10, false, tag: "original tag");
    
    // Update the order
    var response = ticket.Update(new UpdateOrderFields() { 
      Quantity = -80,
      StopPrice = 400,
      Tag = "new tag"
    });
    
    // Check if the update was successful
    if (response.IsSuccess) { 
         Debug("Order updated successfully");
    }
    
    # Create a new order and save the order ticket
    ticket = self.trailing_stop_order("SPY", -100, 415, 10, False, tag="original tag")
    
    # Update the order
    update_settings = UpdateOrderFields()
    update_settings.quantity = -80
    update_settings.stop_price = 400
    update_settings.tag = "new tag"
    response = ticket.update(update_settings)
    
    # Check if the update was successful
    if response.is_success:
         self.debug("Order updated successfully")
    

    To update individual fields of an order, call any of the following methods:

    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var stopResponse = ticket.UpdateStopPrice(stopPrice, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_stop_price(stop_price, tag)
    
    response = ticket.update_tag(tag)
    
    

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Cancel Orders

    To cancel a trailing stop order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with trailing stop orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for trailing stop orders, see the Orders section of the brokerage model documentation .

    If your brokerage doesn't support them, you can implement a workaround with stop market orders . For an example, see the Buy and Hold with a Trailing Stop Bootcamp lesson.

    Requirements

    Trailing stop orders can be submitted at any time for all security types.

    Example

    The following backtest verifies the TrailingStopOrder trailing_stop_order behavior. On even days, the algorithm buys SPY at the current market price and sells when the price drops 1%. On odd days, the algorithm shorts SPY and buys when the price rises 1%. The following table shows the first four trades in the backtest:

    Time Symbol Price Quantity Type Status Value Tag
    2021-07-01T13:31:00Z SPY 429.10 -1 Market Filled -429.10
    2021-07-01T13:31:00Z SPY 433.16 1 Trailing Stop Filled 433.16 Stop Price: 433.431400 Trailing Amount: 1.00%
    2021-07-02T16:53:00Z SPY 433.16 1 Market Filled 433.16
    2021-07-02T16:53:00Z SPY 429.00 -1 Trailing Stop Filled -429.00 Stop Price: 428.823450 Trailing Amount: 1.00%

    On July 1, 2021, the algorithm shorts SPY at $429.10 and then buys it back at $433.16 when the stop price is $433.16. The stop price is 0.95% above the market price. Note that $429.10 is not the market price when the algorithm places the first two orders. The market price is $429.14, and the initial stop price is 429.14 * 1.01 = 433.4314. The market price drops to $428.86 at 9:40, and the stop price is set to 428.86 * 1.01 = 433.1486. The fill price of the stop market order is $433.16, which, as expected, is higher than $433.15. The fill model assumes the worst-case scenario between the market price and the stop price. In this case, the worst-case scenario is the maximum of the market price and stop price.

    On July 2, 2021, the algorithm buys SPY at $433.16 and then sells it at $429 when the stop price is $429.00. The stop price is 0.96% below the market price. Note that $433.16 is not the market price when the algorithm places the second two orders. The market price is $433.155, and the initial stop price is 433.155 * 0.99 = 428.82345. The market prices increased to $434.76 on July 7 at 3:35 PM, and the stop price is set to 434.76 * 0.99 = 430.4124. The fill price of the stop market order is $429, which, as expected, is lower than $430.41. The fill model assumes the worst-case scenario between the market price and the stop price. In this case, the worst-case scenario is the minimum of the market price and stop price in a gap down opening.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Market On Open Orders

    Introduction

    Market on open (MOO) orders fill at the official opening auction price for a security. Market that operate 24/7 don't support MOO orders.

    Place Orders

    To send a MOO order, call the MarketOnOpenOrder market_on_open_order method and provide a Symbol and quantity. Submit the order at least two minutes before the market opens to be included in the opening auction. If you do not have sufficient capital for the order, it's rejected.

    // Buy 100 shares of IBM at the market open
    MarketOnOpenOrder("IBM", 100);
    
    // Sell 100 shares of IBM at the market open
    MarketOnOpenOrder("IBM", -100);
    # Buy 100 shares of IBM at the market open
    self.market_on_open_order("IBM", 100)
    
    # Sell 100 shares of IBM at the market open
    self.market_on_open_order("IBM", -100)

    You can provide a tag and order properties to the MarketOnOpenOrder market_on_open_order method.

    MarketOnOpenOrder(symbol, quantity, tag: tag, orderProperties: orderProperties);
    self.market_on_open_order(symbol, quantity, tag=tag, order_properties=order_properties)

    Monitor Order Fills

    MOO orders fill at the opening auction. If the auction is heavily skewed to one side of the market, your MOO order may not fill. To monitor the fills of your order, save a reference to the order ticket .

    // Buy 10 shares of SPY at the market open
    var ticket = MarketOnOpenOrder("SPY", 10);
    Debug($"Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    # Buy 10 shares of SPY at the market open
    ticket = self.market_on_open_order("SPY", 10)
    self.debug(f"Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    You won't know the fill price of the order until after the market opens. If the asset price moves before the market open to where you can't afford the quantity of the order, the brokerage rejects your order. To increase the probability of a successful trade, leave a sufficient buying power buffer to handle daily price gaps.

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Update Orders

    You can update the quantity and tag of MOO orders until the order fills or the brokerage prevents modifications. To update an order, pass an UpdateOrderFields object to the Update update method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Update update method returns an OrderResponse to signal the success or failure of the update request.

    // Create a new order and save the order ticket
    var ticket = MarketOnOpenOrder("AAPL", 100, "original tag");
    
    // Update the order
    var response = ticket.Update(new UpdateOrderFields()
    {
        Quantity = 75,
        Tag = "new tag"
    });
    
    // Check if the update was successful
    if (response.IsSuccess)
    { 
        Debug("Order updated successfully");
    }
    # Create a new order and save the order ticket
    ticket = self.market_on_open_order("AAPL", 100, "original tag")
    
    # Update the order
    update_settings = UpdateOrderFields()
    update_settings.quantity = 75
    update_settings.tag = "new tag"
    response = ticket.update(update_settings)
    
    # Check if the update was successful
    if response.is_success:
        self.debug("Order updated successfully")
    

    To update individual fields of an order, call any of the following methods:

    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_tag(tag)
    
    

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Cancel Orders

    To cancel a MOO order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with MOO orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for MOO orders, see the Orders section of the brokerage model documentation .

    Requirements

    You can submit MOO orders at any time for Equity, Equity Options, and Index Options.

    Markets that operate 24/7 don't support MOO orders. The Forex market doesn't operate during the weekend. However, MOO orders are invalid if you place them after this market closes for the weekend.

    MOO orders don't support the GoodTilDate time in force . If you submit a MOO order with the GoodTilDate time in force, LEAN automatically adjusts the time in force to be GoodTilCanceled .

    Example

    The following backtest verifies the MarketOnOpenOrder market_on_open_order behavior. The following table shows the first trade in the backtest:

    Submitted Time Filled Time Symbol Price Quantity Type Status Value Tag
    2021-07-01T10:31:00Z 2021-07-02T09:31:00Z SPY 431.67 10 Market On Open Filled 4316.70

    On July 1, 2021 at 10:31 AM Eastern Time (ET), the algorithm places a market on open order to buy SPY. The fill model fills the order on July 2, 2021 at 9:31 AM at a price of $431.67, which is the official opening auction price for July 2, 2021.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Market On Close Orders

    Introduction

    Market on close (MOC) orders fill at the official closing auction price for a security. Markets that operate 24/7 don't support MOC orders.

    Place Orders

    To send a MOC order, call the MarketOnCloseOrder market_on_close_order method with a Symbol and quantity. If you don't have sufficient capital for the order, it is rejected.

    // Buy 100 shares of AAPL at the market open
    MarketOnCloseOrder("AAPL", 100);
    
    // Sell 100 shares of AAPL at the market open
    MarketOnCloseOrder("AAPL", -100);
    # Buy 100 shares of AAPL at the market open
    self.market_on_close_order("AAPL", 100)
    
    # Sell 100 shares of AAPL at the market open
    self.market_on_close_order("AAPL", -100)

    You can provide a tag and order properties to the MarketOnCloseOrder market_on_close_order method.

    MarketOnCloseOrder(symbol, quantity, tag: tag, orderProperties: orderProperties);
    self.market_on_close_order(symbol, quantity, tag=tag, order_properties=order_properties)

    By default, you must place MOC orders at least 15.5 minutes before the close, but some exchanges let you submit them closer to the market closing time. To adjust the buffer period that's required, set the MarketOnCloseOrder.SubmissionTimeBuffer MarketOnCloseOrder.SUBMISSION_TIME_BUFFER property.

    Orders.MarketOnCloseOrder.SubmissionTimeBuffer = TimeSpan.FromMinutes(10);
    MarketOnCloseOrder.SUBMISSION_TIME_BUFFER = timedelta(minutes=10)

    You can also place MOC orders after the market close.

    Monitor Order Fills

    MOC orders fill at the closing auction. If the auction is heavily skewed to one side of the market, your MOC order may not fill. To monitor the fills of your order, save a reference to the order ticket .

    // Buy 10 shares of SPY at the market close
    var ticket = MarketOnCloseOrder("SPY", 10);
    Debug($"Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    # Buy 10 shares of SPY at the market close
    ticket = self.market_on_close_order("SPY", 10)
    self.debug(f"Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    You won't know the fill price of the order until after the market closes. If the asset price moves before the market close to where you can't afford the quantity of the order, the brokerage rejects your order. To increase the probability of a successful trade, leave a sufficient buying power buffer to handle the price movements before the close.

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Update Orders

    You can update the quantity and tag of MOC orders until the order fills or the brokerage prevents modifications. To update an order, pass an UpdateOrderFields object to the Update update method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Update update method returns an OrderResponse to signal the success or failure of the update request.

    // Create a new order and save the order ticket
    var ticket = MarketOnCloseOrder("SLV", 25, "original tag");
    
    // Update the order
    var response = ticket.Update(new UpdateOrderFields()
    {
        Quantity = 50,
        Tag = "new tag"
    });
    
    // Check if the update was successful
    if (response.IsSuccess)
    {
        Debug("Order updated successfully");
    }
    # Create a new order and save the order ticket
    ticket = self.market_on_open_order("SLV", 25, "original tag")
    
    # Update the order
    update_settings = UpdateOrderFields()
    update_settings.quantity = 50
    update_settings.tag = "new tag"
    response = ticket.update(update_settings)
    
    # Check if the update was successful
    if response.is_success:
        self.debug("Order updated successfully")

    To update individual fields of an order, call any of the following methods:

    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_tag(tag)
    
    

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Cancel Orders

    To cancel a MOC order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with MOC orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for MOC orders, see the Orders section of the brokerage model documentation .

    Requirements

    By default, you must place MOC orders at least 15.5 minutes before the close, but some exchanges let you submit them closer to the market closing time. To adjust the buffer period that's required, set the MarketOnCloseOrder.SubmissionTimeBuffer MarketOnCloseOrder.SUBMISSION_TIME_BUFFER property.

    Orders.MarketOnCloseOrder.SubmissionTimeBuffer = TimeSpan.FromMinutes(10);
    MarketOnCloseOrder.SUBMISSION_TIME_BUFFER = timedelta(minutes=10)

    Markets that operate 24/7 don't support MOC orders. The Forex market doesn't operate during the weekend.

    MOC orders don't support the GoodTilDate time in force . If you submit a MOC order with the GoodTilDate time in force, LEAN automatically adjusts the time in force to be GoodTilCanceled .

    Example

    The following backtest verifies the MarketOnCloseOrder market_on_close_order behavior. The following table shows the first trade in the backtest:

    Submitted Time Filled Time Symbol Price Quantity Type Status Value Tag
    2021-07-01T10:31:00Z 2021-07-01T16:00:00Z SPY 430.43 10 Market On Close Filled 4304.30

    On July 1, 2021 at 10:31 AM Eastern Time (ET), the algorithm places a market on open order to buy SPY. The fill model fills the order on July 1, 2021 at 4:00 PM ET at a price of $430.43, which is the official closing auction price for July 1, 2021.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Combo Market Orders

    Introduction

    Combo market orders are individual orders that contain market orders for muliple securities. Combo market orders currently only work for trading Option contracts.

    Place Orders

    To send a combo market order, create multiple Leg objects to represent the legs of the combo order, then call the ComboMarketOrder combo_market_order method. At least one leg must have a positive quantity and at least one leg must have a negative quantity. The legs must each target a unique contract. If you don't have sufficient capital for the order, it's rejected. By default, combo market orders are synchronous and fill immediately.

    foreach (var kvp in slice.OptionChains)
    {
        // Select contracts
        var contracts = kvp.Value.Contracts.Values.ToList();
        if (contracts.Count < 2) 
        {
            return;
        }
    
        // Create order legs
        var legs = new List<Leg>()
        {
            Leg.Create(contracts[0].Symbol, 1),
            Leg.Create(contracts[1].Symbol, -1)
        };
    
        // Place order
        ComboMarketOrder(legs, 1);
    }
    for canonical_symbol, chain in slice.option_chains.items():
        # Select contracts
        contracts = [c for c in chain][:2]
        if len(contracts) < 2:
            return
    
        # Create order legs
        legs = []
        quantities = [1, -1]
        for i, contract in enumerate(contracts):
            legs.append(Leg.create(contract.symbol, quantities[i]))
        
        # Place order
        self.combo_market_order(legs, 1)

    The quantity of the legs sets the ratio of the leg orders while the quantity argument of the ComboMarketOrder combo_market_order method sets the combo order size and acts as a global multiplier. In the preceding example, if we set the global multiplier to two, then the algorithm buys two units of the first contract and sells two units of the second contract. The quantity argument of the ComboMarketOrder combo_market_order method also sets the order direction of the combo order, which affects how the fill model fills the order.

    You can also provide a tag and order properties to the ComboMarketOrder combo_market_order method.

    ComboMarketOrder(legs, quantity, tag: tag, orderProperties: orderProperties);
    self.combo_market_order(legs, quantity, tag=tag, order_properties=order_properties)

    Monitor Order Fills

    If the brokerage has sufficient liquidity in their order book, combo market orders fill immediately. Otherwise, you get partial fills. To monitor the fills of your order, save a reference to the order tickets .

    var tickets = ComboMarketOrder(legs, 1);
    foreach (var ticket in tickets)
    {
        Debug($"Symbol: {ticket.Symbol}; Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    }
    ticket = self.combo_market_order(legs, 1)
    for ticket in tickets:
        self.debug(f"Symbol: {ticket.symbol}; Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Synchronous Timeouts

    Combo market orders are synchronous by default, so your algorithm waits for the order to fill before moving to the next line of code. If your order takes longer than five seconds to fill, your algorithm continues executing even if the trade isn't filled. To adjust the timeout period, set the Transactions.MarketOrderFillTimeout transactions.market_order_fill_timeout property.

    // Adjust the market fill-timeout to 30 seconds.
    Transactions.MarketOrderFillTimeout = TimeSpan.FromSeconds(30);
    
     # Adjust the market fill-timeout to 30 seconds.
    self.transactions.market_order_fill_timeout = timedelta(seconds=30)

    Combo market orders may take a few minutes to fill for illiquid assets such as out-of-the-money Options.

    Place Asynchronous Orders

    When you trade a large portfolio of assets, you may want to send orders in batches and not wait for the response of each one. To send asynchronous orders, set the asynchronous argument to true.

    ComboMarketOrder(legs, quantity, true);
    self.combo_market_order(legs, quantity, True)

    Cancel Orders

    To cancel a combo market order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with combo market orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for combo market orders, see the Orders section of the brokerage model documentation .

    Requirements

    You can submit combo market orders during regular trading hours for all asset classes. For Futures and Future Options, you can place combo market orders during regular and extended market hours. For all other asset classes, if you place combo market orders at/after the last minute of regular market hours, LEAN converts the combo market orders into market-on-open orders as long as the asset class supports them . To view the trading hours of each asset class, follow these steps:

    1. Open the Asset Classes documentation.
    2. Click an asset class.
    3. Click Market Hours .

    Example

    The following backtest verifies the ComboMarketOrder combo_market_order behavior. The algorithm buys one contract and sells one contract at the same time. The following table shows the two trades in the backtest:

    Time Symbol Price Quantity Type Status Value Tag
    2015-12-24T09:31:00Z GOOG 16011SC00745000 16.90 1 Buy Filled 16.90
    2015-12-24T09:31:00Z GOOG 160115C00747500 14.20 -1 Sell Filled -14.20

    On December 24, 2015, the algorithm buys GOOG 16011SC00745000 at $16.90 and sells GOOG 160115C00747500 at $14.20. The fill model fills the buy order at the ask close price and fills the sell order at the bid close price.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Combo Limit Orders

    Introduction

    Combo limit orders are individual orders that contain limit orders for muliple securities. Combo limit orders are different from combo leg limit orders because you must set the limit price of all the leg orders to be the same with combo limit orders. With combo leg limit orders, you can create the order without forcing each leg to have the same limit price. Combo limit orders currently only work for trading Option contracts and their underlying Equities.

    Place Orders

    To send a combo limit order, create multiple Leg objects to represent the legs of the combo order, then call the ComboLimitOrder combo_limit_order method. At least one leg must have a positive quantity and a tleast one leg must have a negative quantity. The legs must each target a unique contract, but don't set the OrderPrice property for any of the legs. If you don't have sufficient capital for the order, it's rejected.

    foreach (var kvp in slice.OptionChains)
    {
        // Select contracts
        var contracts = kvp.Value.Contracts.Values.ToList();
        if (contracts.Count < 2) 
        {
            return;
        }
    
        // Create order legs
        var legs = new List&lgt;Leg>()
        {
            Leg.Create(contracts[0].Symbol, 1),
            Leg.Create(contracts[1].Symbol, -1)
        };
    
        // Calculate limit price
        var limitPrice = Math.Round(legs.Select(leg => Securities[leg.Symbol].Close).Sum() * 0.95m, 2);
    
        // Place order
        ComboLimitOrder(legs, quantity: 1, limitPrice: limitPrice);
    }
    for canonical_symbol, chain in slice.option_chains.items():
        # Select contracts
        contracts = [c for c in chain][:2]
        if len(contracts) < 2:
            return
    
        # Create order legs
        legs = []
        quantities = [1, -1]
        for i, contract in enumerate(contracts):
            legs.append(Leg.create(contract.symbol, quantities[i]))
        
        # Calculate limit price
        limit_price = round(sum([self.securities[leg.symbol].close for leg in legs]) * 0.95, 2)
    
        # Place order
        self.combo_limit_order(legs, 1, limit_price)

    The quantity of the legs sets the ratio of the leg orders while the quantity argument of the ComboLimitOrder combo_limit_order method sets the combo order size and acts as a global multiplier. In the preceding example, if we set the global multiplier to two, then the algorithm buys two units of the first contract and sells two units of the second contract. The quantity also sets the order direction of the combo limit order, which affects how the fill model fills the order.

    You can also provide a tag and order properties to the ComboLimitOrder combo_limit_order method.

    ComboLimitOrder(legs, quantity, limitPrice, tag: tag, orderProperties: orderProperties);
    self.combo_limit_order(legs, quantity, limit_price, tag=tag, order_properties=order_properties)

    Monitor Order Fills

    Combo limit orders fill all the legs at the same time. Each leg can fill when the sum of the security prices of the legs pass the limit price of the combo order. To monitor the fills of your order, save a reference to the order tickets .

    var tickets = ComboLimitOrder(legs, 1, limitPrice);
    foreach (var ticket in tickets)
    {
        Debug($"Symbol: {ticket.Symbol}; Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    }
    tickets = self.combo_limit_order(legs, 1, limit_price)
    for ticket in tickets:
        self.debug(f"Symbol: {ticket.symbol}; Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Update Orders

    You can update the quantity, limit price, and tag of the limit orders in each leg until the combo order fills or the brokerage prevents modifications. To update an order, pass an UpdateOrderFields object to the Update update method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . To update the limit price of the combo order, you only need to update the limit price of one of the leg orders. The Update update method returns an OrderResponse to signal the success or failure of the update request.

    // Create a new order and save the order ticket
    var tickets = ComboLimitOrder(legs, quantity: 1, limitPrice: limitPrice);
    
    // Update the leg orders
    foreach (var ticket in tickets)
    {
        var response = ticket.Update(new UpdateOrderFields() 
        {
            Quantity = 2 * Math.Sign(ticket.Quantity),
            LimitPrice = ticket.Get(OrderField.LimitPrice) + 0.01m,
            Tag = $"Update #{ticket.UpdateRequests.Count + 1}"
        }); 
    
        // Check if the update was successful
        if (response.IsSuccess) 
        {
            Debug($"Order updated successfully for {ticket.Symbol}");
        }
    }
    # Create a new order and save the order tickets
    tickets = self.combo_limit_order(legs, 1, limit_price)
    
    # Update the leg orders
    for ticket in tickets:
        update_settings = UpdateOrderFields()
        update_settings.quantity = 2 * np.sign(ticket.quantity)
        update_settings.limit_price = ticket.get(OrderField.LIMIT_PRICE) + 0.01
        update_settings.tag = f"Update #{len(ticket.update_requests) + 1}"
        response = ticket.update(update_settings)
    
        # Check if the update was successful
        if response.is_success:
            self.debug(f"Order updated successfully for {ticket.symbol}")

    To update individual fields of an order, call any of the following methods:

    var limitResponse = ticket.UpdateLimitPrice(limitPrice, tag);
    
    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_limit_price(limit_price, tag)
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_tag(tag)
    
    

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Cancel Orders

    To cancel a combo limit order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with combo limit orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for combo limit orders, see the Orders section of the brokerage model documentation .

    Requirements

    Combo limit orders can be submitted at any time for all security types.

    If your algorithm subscribes to extended market hours, they can be filled outside regular trading hours.

    Example

    The following backtest verifies the ComboLimitOrder combo_limit_order behavior. The algorithm buys one contract and sells one contract at the same time. The following table shows the two trades in the backtest:

    Time Symbol Price Quantity Type Status Value Tag
    2015-12-24T09:31:00Z GOOG 16011SC00745000 16.50 1 Buy Filled 16.50
    2015-12-24T09:31:00Z GOOG 160115C00747500 14.60 -1 Sell Filled -14.60

    On December 24, 2015 at 9:31 AM Eastern Time (ET), the algorithm places a combo limit order to buy one GOOG 16011SC00745000 contract and sell one GOOG 160115C00747500 contracts. The limit price is 75% of the contract spread, which equals $2.02. The combo order doesn't fill immediately because the contract spread $2.40 > $2.02. By 9:36 AM, the spread drops to $1.90, which is below the limit price, so the fill model fills the combo limit order.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Combo Leg Limit Orders

    Introduction

    Combo leg limit orders are individual orders that contain limit orders for muliple securities. Combo leg limit orders are different from combo limit orders because you can create combo leg limit orders without forcing each leg to have the same limit price. Combo leg limit orders currently only work for trading Option contracts.

    Place Orders

    To send a combo leg limit order, create multiple Leg objects to represent the legs of the combo order, then call the ComboLegLimitOrder combo_leg_limit_order method. The legs must each target a unique contract. At least one leg must have a positive quantity and at least one leg must have a negative quantity. If you don't have sufficient capital for the order, it's rejected.

    foreach (var kvp in slice.OptionChains)
    {
        // Select contracts
        var contracts = kvp.Value.Contracts.Values.ToList();
        if (contracts.Count < 2) 
        {
            return;
        }
    
        // Create order legs
        var legs = new List<Leg>()
        {
            Leg.Create(contracts[0].Symbol, 1, contracts[0].LastPrice * 0.98m),
            Leg.Create(contracts[1].Symbol, -1, contracts[1].LastPrice * 1.02m)
        };
    
        // Place order
        ComboLegLimitOrder(legs, 1);
    }
    for canonical_symbol, chain in slice.option_chains.items():
        # Select contracts
        contracts = [c for c in chain][:2]
        if len(contracts) < 2:
            return
    
        # Create order legs            
        legs = []
        quantities = [1, -1]
        factors = [0.98, 1.02]
        for i, contract in enumerate(contracts):
            legs.append(Leg.create(contract.symbol, quantities[i], contract.last_price * factors[i]))
        
        # Place order
        self.combo_leg_limit_order(legs, 1)

    The quantity of the legs sets the ratio of the leg orders while the quantity argument of the ComboLegLimitOrder combo_leg_limit_order method sets the combo order size and acts as a global multiplier. In the preceding example, if we set the global multiplier to two, then the algorithm buys two units of the first contract and sells two units of the second contract. The quantity also sets the order direction of the combo limit order, which affects how the fill model fills the order.

    You can also provide a tag and order properties to the ComboLegLimitOrder combo_leg_limit_order method.

    ComboLegLimitOrder(legs, quantity, tag: tag, orderProperties: orderProperties);
    self.combo_leg_limit_order(legs, quantity, tag=tag, order_properties=order_properties)

    Monitor Order Fills

    Combo leg limit orders fill all the legs at the same time. Each leg can fill when the security price passes the limit price of the leg. To monitor the fills of your order, save a reference to the order tickets .

    var tickets = ComboLegLimitOrder(legs, 1);
    foreach (var ticket in tickets)
    {
        Debug($"Symbol: {ticket.Symbol}; Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    }
    tickets = self.combo_leg_limit_order(legs, 1)
    for ticket in tickets:
        self.debug(f"Symbol: {ticket.symbol}; Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models order fills in backtests, see Trade Fills .

    Update Orders

    You can update the quantity, limit price, and tag of the leg limit orders until the combo order fills or the brokerage prevents modifications. To update an order, pass an UpdateOrderFields object to the Update update method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Update update method returns an OrderResponse to signal the success or failure of the update request.

    // Create a new order and save the order ticket
    var tickets = ComboLegLimitOrder(legs, 1);
    
    // Update the leg orders
    foreach (var ticket in tickets)
    {
        var direction = Math.Sign(ticket.Quantity);
        var response = ticket.Update(new UpdateOrderFields() 
        {
            Quantity = 2 * direction,
            LimitPrice = ticket.Get(OrderField.LimitPrice) + 0.01m * direction,
            Tag = $"Update #{ticket.UpdateRequests.Count + 1}"
        }); 
    
        // Check if the update was successful
        if (response.IsSuccess) 
        {
            Debug($"Order updated successfully for {ticket.Symbol}");
        }
    }
    # Create a new order and save the order tickets
    tickets = self.combo_leg_limit_order(legs, 1)
    
    # Update the leg orders
    for ticket in tickets:
        direction = np.sign(ticket.quantity)
        update_settings = UpdateOrderFields()
        update_settings.quantity = 2 * direction
        update_settings.limit_price = ticket.get(OrderField.LIMIT_PRICE) + 0.01 * direction
        update_settings.tag = f"Update #{len(ticket.update_requests) + 1}"
        response = ticket.update(update_settings)
    
        # Check if the update was successful
        if response.is_success:
            self.debug(f"Order updated successfully for {ticket.symbol}")

    To update individual fields of an order, call any of the following methods:

    var limitResponse = ticket.UpdateLimitPrice(limitPrice, tag);
    
    var quantityResponse = ticket.UpdateQuantity(quantity, tag);
    
    var tagResponse = ticket.UpdateTag(tag);
    
    
    response = ticket.update_limit_price(limit_price, tag)
    
    response = ticket.update_quantity(quantity, tag)
    
    response = ticket.update_tag(tag)
    
    

    When you update an order, LEAN creates an UpdateOrderRequest object, which have the following attributes:

    To get a list of UpdateOrderRequest objects for an order, call the UpdateRequests update_requests method.

    var updateRequests = ticket.UpdateRequests();
    update_requests = ticket.update_requests()

    Cancel Orders

    To cancel a combo leg limit order, call the Cancel cancel method on the OrderTicket . If you don't have the order ticket, get it from the transaction manager . The Cancel cancel method returns an OrderResponse object to signal the success or failure of the cancel request.

    var response = ticket.Cancel("Cancelled trade");
    if (response.IsSuccess)
    {
        Debug("Order successfully cancelled");
    }
    response = ticket.cancel("Cancelled Trade")
    if response.is_success:
        self.debug("Order successfully cancelled")

    When you cancel an order, LEAN creates a CancelOrderRequest , which have the following attributes:

    To get the CancelOrderRequest for an order, call the CancelRequest cancel_order_request method on the order ticket. The method returns null None if the order hasn't been cancelled.

    var request = ticket.cancel_order_request();
    request = ticket.cancel_order_request()

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with combo leg limit orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for combo leg limit orders, see the Orders section of the brokerage model documentation .

    Requirements

    Combo leg limit orders can be submitted at any time for all security types.

    If your algorithm subscribes to extended market hours, they can be filled outside regular trading hours.

    Example

    The following backtest verifies the ComboLegLimitOrder combo_leg_limit_order behavior. The algorithm buys one contract and sells one contract at the same time. The following table shows the two trades in the backtest:

    Time Symbol Price Quantity Type Status Value Tag
    2015-12-24T09:31:00Z GOOG 16011SC00745000 16.10 2 Buy Filled 32.20 Update #72
    2015-12-24T09:31:00Z GOOG 160115C00747500 14.11515 -2 Sell Filled -28.2303 Update #72

    On December 24, 2015 at 9:31 AM Eastern Time (ET), the algorithm places a combo leg limit order to buy one GOOG 16011SC00745000 contract and sell two GOOG 160115C00747500 contracts. The limit price of both orders is 99.9% of the respective contract price, which is $16.2837 for GOOG 16011SC00745000 and $14.83515 for GOOG 160115C00747500. The combo order doesn't fill immediately, so the algorithm updates the leg orders at each time step. During the first update, the algorithm sets the quantity of the GOOG 160115C00747500 leg to -2. During each update, the limit price moves $0.01 closer to the market. That is, the limit price of GOOG 16011SC00745000 increases by $0.01 and the limit price of GOOG 160115C00747500 decreases by $0.01. After the 72nd update, the ask low price is below the limit price of the leg to buy GOOG 16011SC00745000 and the bid high price is above the limit price of the leg to sell GOOG 160115C00747500, so the fill model fills the combo leg limit order at 10:44 AM ET.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Option Exercise Orders

    Introduction

    If you buy an Option contract, you can exercise your right to buy or sell the underlying asset at the strike price. However, you don't need to exercise it. You can sell the Option or let it expire worthless if it's out of the money. If you hold a long position in an Option that expires in the money, LEAN automatically exercises it at the expiration date. If you sell an Option contract and the buyer exercises their right to buy or sell the underlying asset, you are assigned the Option and must trade with the buyer at the strike price.

    Place Orders

    You can exercise American-style Option contracts anytime before they expire. Depending on your brokerage and the delivery method, you may be able to exercise European-style Option contracts on their expiration date. To exercise an Option, call the ExerciseOption exercise_option method with the Option contract Symbol and a quantity. If you do not have sufficient capital for the order, it's rejected. By default, Option exercise orders are synchronous and fill immediately.

    var ticket = ExerciseOption(contractSymbol, quantity);
    ticket = self.exercise_option(contract_symbol, quantity)

    You can provide a tag and order properties to the ExerciseOption exercise_option method.

    ExerciseOption(symbol, quantity, tag: tag, orderProperties: orderProperties);
    self.exercise_option(symbol, quantity, tag=tag, order_properties=order_properties)

    Monitor Order Fills

    To monitor the fills of your order, save a reference to the order ticket .

    var ticket = ExerciseOption(contractSymbol, quantity);
    Debug($"Quantity filled: {ticket.QuantityFilled}; Fill price: {ticket.AverageFillPrice}");
    ticket = self.exercise_option(contract_symbol, quantity)
    self.debug(f"Quantity filled: {ticket.quantity_filled}; Fill price: {ticket.average_fill_price}")

    For more information about how LEAN models Option exercise orders in backtests, see the Exercise Option model .

    Synchronous Timeouts

    Option exercise orders are synchronous by default, so your algorithm waits for the order to fill before moving to the next line of code. If your order takes longer than five seconds to fill, your algorithm continues executing even if the trade isn't filled. To adjust the timeout period, set the Transactions.MarketOrderFillTimeout transactions.market_order_fill_timeout property.

    // Adjust the market fill-timeout to 30 seconds.
    Transactions.MarketOrderFillTimeout = TimeSpan.FromSeconds(30);
    
     # Adjust the market fill-timeout to 30 seconds.
    self.transactions.market_order_fill_timeout = timedelta(seconds=30)

    Place Asynchronous Orders

    When you trade a large portfolio of assets, you may want to send orders in batches and not wait for the response of each one. To send asynchronous orders, set the asynchronous argument to True true .

    var ticket = ExerciseOption(contractSymbol, quantity, true);
    ticket = self.exercise_option(contract_symbol, quantity, True)

    Option Assignments

    If you sell an Option in a backtest, LEAN can simulate an Option exercise order on behalf of the buyer. By default, LEAN scans your portfolio every hour. It considers exercising American-style Options if they are within 4 days of their expiration and it considers exercising European-style Options on their day of expiration. If you have sold an Option that's 5% in-the-money and the Option exercise order is profitable after the cost of fees, LEAN exercises the Option. For more information about how we simulate Option assignments, see the Assignment reality model.

    Brokerage Support

    Each brokerage has a set of assets and order types they support. To avoid issues with Option exercise orders, set the brokerage model to a brokerage that supports them.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage);
    self.set_brokerage_model(BrokerageName.QuantConnectBrokerage)

    To check if your brokerage has any special requirements for Option exercise orders, see the Orders section of the brokerage model documentation .

    Requirements

    Option exercise orders can only be submitted for option contracts with a long position. European-style options cannot be exercised before their expiration date.

    Example

    The following backtest verifies the ExerciseOption exercise_option behavior. The following table shows the first three trades in the backtest:

    Time Symbol Price Quantity Type Status Value Tag
    2021-07-01T09:31:00Z SPY 221216C00085000 345.30 1 Buy Market Filled 34530.00
    2021-07-01T09:31:00Z SPY 221216C00085000 0.00 -1 Sell Option Exercise Filled 0.00 Automatic Exercise
    2021-07-01T09:31:00Z SPY 85.00 100 Sell Option Exercise Filled 8500.00 Option Exercise

    The algorithm first brought a deep ITM option based on the set option selection conditions by $345.30, then exercise it actively, so 100 shares of SPY (in which 1 contract represents) was brought at its strike price at $85.00, with the option discarded from the portfolio.

    To reproduce these results, backtest the following algorithm:

     

    Order Types

    Other Order Types

    Introduction

    We are often asked to support other order types like one cancels the other, trailing stop, and multi-leg orders. Currently, LEAN doesn't support these order types, but we will add them over time. Part of the difficulty of implementing them is the incomplete brokerage support.

    One Cancels the Other Orders

    One cancels the other (OCO) orders are a set of orders that when one fills, it cancels the rest of the orders in the set. An example is to set a take-profit and a stop-loss order right after you enter a position. In this example, when either the take-profit or stop-loss order fills, you cancel the other order. OCO orders usually create an upper and lower bound on the exit price of a trade.

    When you place OCO orders, their price levels are usually relative to the fill price of an entry trade. If your entry trade is a synchronous market order, you can immediately get the fill price from the order ticket. If your entry trade doesn't execute immediately, you can get the fill price in the OnOrderEvents on_order_events event handler. Once you have the entry fill price, you can calculate the price levels for the OCO orders.

    // Get the fill price from the order ticket of a sync market order
    _ticket = MarketOrder("SPY", 1);
    var fillPrice = _ticket.AverageFillPrice;
    
    // Get the fill price from the OnOrderEvent event handler
    public override void OnOrderEvent(OrderEvent orderEvent)
    {
        if (orderEvent.Status == OrderStatus.Filled && _ticket.OrderId == orderEvent.OrderId)
        {
            var fillPrice = orderEvent.FillPrice;
        }
    }
    # Get the fill price from the order ticket of a sync market order
    self.ticket = self.market_order("SPY", 1)
    fill_price = self.ticket.average_fill_price
    
    # Get the fill price from the OnOrderEvent event handler
    def on_order_event(self, order_event: OrderEvent) -> None:
        if order_event.status == OrderStatus.FILLED and self.ticket.order_id == order_event.order_id:
            fill_price = order_event.fill_price

    After you have the target price levels, to implement the OCO orders, you can place active orders or track the security price to simulate the orders.

    Place Active Orders

    To place active orders for the OCO orders, use a combination of limit orders and stop limit orders . Place these orders so that their price levels that are far enough apart from each other. If their price levels are too close, several of the orders can fill in a single time step. When one of the orders fills, in the OnOrderEvent on_order_event event handler, cancel the other orders in the OCO order set.

    OrderTicket _stopLoss = null;
    OrderTicket _takeProfit = null;
    
    public override void OnOrderEvent(OrderEvent orderEvent)
    {
        if (orderEvent.Status == OrderStatus.Filled)
        {
            if (orderEvent.OrderId == _ticket.OrderId)
            {
                _stopLoss = StopMarketOrder(orderEvent.Symbol, -orderEvent.FillQuantity, orderEvent.FillPrice*0.95m);
                _takeProfit = LimitOrder(orderEvent.Symbol, -orderEvent.FillQuantity, orderEvent.FillPrice*1.10m);
            }
            else if (_stopLoss != null && orderEvent.OrderId == _stopLoss.OrderId)
            {
                _takeProfit.Cancel();
            }
            else if (_takeProfit != null && orderEvent.OrderId == _takeProfit.OrderId)
            {
                _stopLoss.Cancel();
            }
        }
    }
    
    self.stop_loss = None
    self.take_profit = None
    
    def on_order_event(self, order_event: OrderEvent) -> None:
        if order_event.status == OrderStatus.FILLED:
            if order_event.order_id == self.ticket.order_id:
                self.stop_loss = self.stop_market_order(order_event.symbol, -order_event.fill_quantity, order_event.fill_price*0.95)
                self.take_profit = self.limit_order(order_event.symbol, -order_event.fill_quantity, order_event.fill_price*1.10)
    
            elif self.stop_loss is not None and order_event.order_id == self.stop_loss.order_id:
                self.take_profit.cancel()
    
            elif self.take_profit is not None and order_event.order_id == self.take_profit.order_id:
                self.stop_loss.cancel()
    

    Simulate Orders

    To simulate OCO orders, track the asset price in the OnData on_data method and place market or limit orders when asset price reaches the take-profit or stop-loss level. The benefit of manually simulating the OCO orders is that both of the orders can't fill in the same time step.

    decimal _entryPrice;
    
    public override void OnData(Slice slice)
    {
        if (!Portfolio.Invested)
        {
            var ticket = MarketOrder("SPY", 1);
            _entryPrice = ticket.AverageFillPrice;
        }
    
        if (!slice.Bars.ContainsKey("SPY")) return;
    
        if (slice.Bars["SPY"].Price >= _entryPrice * 1.10m)
        {
            Liquidate("SPY", -1, "take profit");
        }
        else if (slice.Bars["SPY"].Price <= _entryPrice * 0.95m)
        {
            Liquidate("SPY", -1, "stop loss");
        }
    }
    
    def on_data(self, slice: Slice) -> None:
        if not self.portfolio.invested:
            ticket = self.market_order("SPY", 1)
            self.entry_price = ticket.average_fill_price
    
        bar = slice.get("SPY")
        if bar:
            if bar.price >= self.entry_price * 1.10:
                self.liquidate("SPY", -1, "take profit")
    
            elif bar.price <= self.entry_price * 0.95:
                self.liquidate("SPY", -1, "stop loss")

    Multi-Leg Orders

    Multi-leg orders are orders that contain multiple sub-orders. Examples of multi-leg orders include Option strategies like spreads , straddles , and strangles . You can manually implement other types of multi-leg orders with the built-in order types.

     

    Trading and Orders

    Position Sizing

    Introduction

    LEAN provides several methods to help you set specific portfolio weights for assets. These methods account for lot size and pre-calculated order fees.

    Single Asset Targets

    The SetHoldings set_holdings method calculates the number of asset units to purchase based on the portfolio weight you provide and then submits market orders. This method provides a quick way to set up a portfolio with a set of weights for assets. If you already have holdings, you may want to liquidate the existing holdings first to free up buying power.

    // Allocate 50% of portfolio value to IBM
    SetHoldings("IBM", 0.5);
    
    // Allocate 50% of portfolio value to IBM, but liquidate other holdings first
    SetHoldings("IBM", 0.5, true);
    
    // Provide a tag and order properties to the SetHoldings method
    SetHoldings(symbol, weight, liquidateExistingHoldings, tag, orderProperties);
    
     # Allocate 50% of buying power to IBM
    self.set_holdings("IBM", 0.5)
    
    # Allocate 50% of portfolio value to IBM, but liquidate other holdings first
    self.set_holdings("IBM", 0.5, True)
    
    # Provide a tag and order properties to the SetHoldings method
    self.set_holdings(symbol, weight, liquidate_existing_holdings, tag, order_properties)

    If the percentage you provide translates to an order quantity of 0, the SetHoldings set_holdings method doesn’t place an order and doesn’t log anything.

    Multiple Asset Targets

    When you trade a weighted basket of assets, sometimes you must intelligently scale down existing positions before increasing allocations to other assets. If you call the SetHoldings set_holdings method with a list of PortfolioTarget objects, LEAN sorts the orders based on your position delta and then places the orders that reduce your position size in an asset before it places orders that increase your position size in an asset. When you call the SetHoldings set_holdings method with a list of PortfolioTarget objects, the decimal you pass to the PortfolioTarget constructor represents the portfolio weight. In this situation, don't use the PortfolioTarget.Percent PortfolioTarget.percent method.

    // Purchase a portfolio of targets, processing orders intelligently.
    var targets = new List<PortfolioTarget>() {
          new PortfolioTarget("SPY", 0.8m),
          new PortfolioTarget("IBM", 0.2m)
    };
    SetHoldings(targets);
    
    # Purchase a portfolio of targets, processing orders intelligently.
    self.set_holdings([PortfolioTarget("SPY", 0.8), PortfolioTarget("IBM", 0.2)]))

    If you want the targets you pass to define the target portfolio state, enable the liquidateExistingHoldings liquidate_existing_holdings argument.

    SetHoldings(targets, true);
    self.set_holdings([PortfolioTarget("SPY", 0.8), PortfolioTarget("IBM", 0.2)], True)

    The method also accepts tag and order properties arguments.

    SetHoldings(targets, liquidateExistingHoldings, tag, orderProperties);
    self.set_holdings(targets, liquidate_existing_holdings, tag, orderProperties)

    Calculate Order Quantities

    The SetHoldings set_holdings method uses market order to reach the target portfolio weight you provide. If you want to use a different order type, you need to specify the quantity to trade. To calculate the number of units to trade based on a portfolio weight, call the CalculateOrderQuantity calculate_order_quantity method. The method calculates the quantity based on the current price of the asset and adjusts it for the fee model of the security. The target weight you provide is an unleveraged value. For instance, if you have 2x leverage and request a 100% weight, the method calculates the quantity that uses half of your available margin.

    // Calculate the fee-adjusted quantity of shares with given buying power
    var quantity = CalculateOrderQuantity("IBM", 0.4);
    
     # Calculate the fee-adjusted quantity of shares with given buying power
    quantity = self.calculate_order_quantity("IBM", 0.4)
    

    Buying Power Buffer

    If you place a market on open order near the market close, the market can gap overnight to a worse open price. If the gap is large enough against your trade direction, you may not have sufficient buying power at the open to fill your trade. To ensure a high probability of order fills through market gaps and discontinuities, the SetHoldings set_holdings method assumes a 2.5% cash buffer. If LEAN rejects your orders due to buying power, widen the cash buffer through the algorithm Settings settings property.

    // Set the cash buffer to 5%
    Settings.FreePortfolioValuePercentage = 0.05m;
    
    // Set the cash buffer to $10,000
    Settings.FreePortfolioValue = 10000m;
    # Set the cash buffer to 5%
    self.settings.free_portfolio_value_percentage = 0.05
    
    # Set the cash buffer to $10,000
    self.settings.free_portfolio_value = 10000

    If you use FreePortfolioValuePercentage free_portfolio_value_percentage , you must set it in the Initialize initialize or PostInitialize post_initialize event handler. If you use FreePortfolioValue free_portfolio_value , you must set it after the PostInitialize post_initialize event handler.

     

    Trading and Orders

    Liquidating Positions

    Introduction

    The Liquidate liquidate method lets you liquidate individual assets or your entire portfolio. The method creates market orders to close positions and returns the IDs of the liquidation orders. If you have pending open orders for the security when you call Liquidate liquidate , LEAN tries to cancel them. The Liquidate liquidate method works for all asset classes, except Crypto. To liquidate Crypto positions, see Crypto Trades .

    Liquidate Individual Positions

    To liquidate your holdings in an individual security, call the Liquidate liquidate method and provide a ticker or Symbol .

    // Liquidate all IBM in your portfolio
    var orderIds = Liquidate("IBM");
    # Liquidate all IBM in your portfolio
    order_ids = self.liquidate("IBM")

    You can pass an order tag to the Liquidate liquidate method.

    Liquidate("AAPL", "Liquidated");
    self.liquidate("AAPL", "Liquidated")

    Liquidate All Positions

    To liquidate all of the positions in your portfolio, call the Liquidate liquidate method without any ticker of Symbol arguments.

    // Liquidate your entire portfolio
    var orderIds = Liquidate();
    // Liquidate your entire portfolio
    order_ids = self.liquidate()

    You can pass an order tag to the Liquidate liquidate method.

    Liquidate(tag: "Liquidated");
    self.liquidate(tag = "Liquidated")

    Enable and Disable Liquidations

    By default, the Liquidate liquidate method is functional. To enable and disable it, set the Settings.LiquidateEnabled property.

    // Disable liquidations
    Settings.LiquidateEnabled = false;
    
    // Enable liquidations
    Settings.LiquidateEnabled = true;
    # Disable liquidations
    self.settings.liquidate_enabled = False
    
    # Enable liquidations
    self.settings.liquidate_enabled = True

    Market Closed Considerations

    If you liquidate your positions when the market is closed, LEAN converts the orders into market on open orders. If your brokerage doesn't support market on open orders , the order is invalid.

     

    Trading and Orders

    Crypto Trades

    Introduction

    All fiat and Crypto currencies are individual assets. When you buy a pair like BTCUSDT, you trade USDT for BTC. In this case, LEAN removes some USDT from your portfolio cash book and adds some BTC. The virtual pair BTCUSDT represents your position in the trade, but the virtual pair doesn't actually exist. It simply represents an open trade.

    Place Trades

    When you place Crypto trades, don't use the CalculateOrderQuantity calculate_order_quantity or SetHoldings set_holdings methods. Instead, calculate the order quantity based on the currency amounts in your cash book and place manual orders.

    The following code snippet demonstrates how to allocate 90% of your portfolio to BTC.

    public override void OnData(Slice data)
    {
        SetCryptoHoldings(_symbol, 0.9m);
    }
    
    private void SetCryptoHoldings(Symbol symbol, decimal percentage)
    {
        var crypto = Securities[symbol] as Crypto;
        var baseCurrency = crypto.BaseCurrency;
    
        // Calculate the target quantity in the base currency
        var targetQuantity = percentage * (Portfolio.TotalPortfolioValue - Settings.FreePortfolioValue) / baseCurrency.ConversionRate;
        var quantity = targetQuantity - baseCurrency.Amount;
    
        // Round down to observe the lot size
        var lotSize = crypto.SymbolProperties.LotSize;
        quantity = Math.Round(quantity / lotSize) * lotSize;
    
        if (IsValidOrderSize(crypto, quantity))
        {
            MarketOrder(symbol, quantity);
        }
    }
    
    // Brokerages have different order size rules
    // Binance considered the minimum volume (price x quantity):
    private bool IsValidOrderSize(Crypto crypto, decimal quantity)
    {
        return Math.Abs(crypto.Price * quantity) > crypto.SymbolProperties.MinimumOrderSize;
    }
    def on_data(self, data: Slice):
        self.set_crypto_holdings(self._symbol, .9)
    
    def set_crypto_holdings(self, symbol, percentage):
        crypto = self.securities[symbol]
        base_currency = crypto.base_currency
    
        # Calculate the target quantity in the base currency
        target_quantity = percentage * (self.portfolio.total_portfolio_value - self.settings.free_portfolio_value) / base_currency.conversion_rate    
        quantity = target_quantity - base_currency.amount
    
        # Round down to observe the lot size
        lot_size = crypto.symbol_properties.lot_size
        quantity = round(quantity / lot_size) * lot_size
    
        if self.is_valid_order_size(crypto, quantity):
            self.market_order(symbol, quantity)
    
    # Brokerages have different order size rules
    # Binance considers the minimum volume (price x quantity):
    def is_valid_order_size(self, crypto, quantity):
        return abs(crypto.price * quantity) > crypto.symbol_properties.minimum_order_size

    The preceding example doesn't take into account order fees. You can add a 0.1% buffer to accommodate it.

    The following example demonstrates how to form an equal-weighted Crypto portfolio and stay within the cash buffer .

    public override void OnData(Slice data)
    {
        var percentage = (1m - Settings.FreePortfolioValuePercentage) / _symbols.Count;
        foreach (var symbol in _symbols)
        {
            SetCryptoHoldings(_symbol, percentage);
        }
    }
    def on_data(self, data: Slice):
        percentage = (1 - self.settings.free_portfolio_value_percentage) / len(self.symbols);
        for symbol in self.symbols:
            self.set_crypto_holdings(symbol, percentage)

    You can replace the Settings.FreePortfolioValuePercentage settings.free_portfolio_value_percentage for a class variable (e.g. self.cash_buffer _cashBuffer ).

    When you place Crypto trades, ensure you have a sufficient balance of the base or quote currency before each trade. If you hold multiple assets and you want to put all of your capital into BTCUSDT, you need to first convert all your non-BTC assets into USDT and then purchase BTCUSDT.

    By default, the account currency is USD and your starting cash is $100,000. Some Crypto exchanges don't support fiat currencies, which means you can't convert the $100,000 USD to the pair's quote currency . In this case, set your account currency to the quote currency with a positive quantity.

    SetAccountCurrency("USDT", 1000);   // Set account currency to Thether and its quantity to 1000 USDT
    self.set_account_currency("USDT", 1000)   # Set account currency to Thether and its quantity to 1000 USDT

    For a full example of placing crypto trades, see the BasicTemplateCryptoAlgorithm BasicTemplateCryptoAlgorithm .

    Liquidate Positions

    If you use the Liquidate liquidate method to liquidate a Crypto position, it only liquidates the quantity of the virtual pair. Since the virtual pair BTCUSDT may not represent all of your BTC holdings, don't use the Liquidate liquidate method to liquidate Crypto positions. Instead, calculate the order quantity based on the currency amounts in your cash book and place manual orders. The following code snippet demonstrates how to liquidate a BTCUSDT position.

    public override void OnData(Slice data)
    {
        LiquidateCrypto(_symbol);
    }
    
    private void LiquidateCrypto(Symbol symbol)
    {
        var crypto = Securities[symbol] as Crypto;
        var baseCurrency = crypto.BaseCurrency;
    
        // Avoid negative amount after liquidate
        var quantity = Math.Min(crypto.Holdings.Quantity, baseCurrency.Amount);
        
        // Round down to observe the lot size
        var lotSize = crypto.SymbolProperties.LotSize;
        quantity = (Math.Round(quantity / lotSize) - 1) * lotSize;
    
        if (IsValidOrderSize(crypto, quantity))
        {
            MarketOrder(symbol, -quantity);
        }
    }
    def on_data(self, data: Slice):
        self.liquidate_crypto(self._symbol)
    
    def liquidate_crypto(self, symbol):
        crypto = self.securities[symbol]
        base_currency = crypto.base_currency
    
        # Avoid negative amount after liquidate
        quantity = min(crypto.holdings.quantity, base_currency.amount)
            
        # Round down to observe the lot size
        lot_size = crypto.symbol_properties.lot_size;
        quantity = (round(quantity / lot_size) - 1) * lot_size
    
        if self.is_valid_order_size(crypto, quantity):
            self.market_order(symbol, -quantity)

    The order fees don't respect the lot size. When you try to liquidate a position, the absolute value of the base currency quantity can be less than the lot size and greater than zero. In this case, your algorithm holds a position that you can't liquidate and self. Portfolio[symbol].Invested is True true . The following code snippet demonstrates how to determine if you can liquidate a position:

    public override void OnData(Slice data)
    {
        var crypto = Securities[_symbol];
        if (Math.Abs(crypto.Holdings.Quantity) > crypto.SymbolProperties.LotSize)
        {
            LiquidateCrypto(_symbol);
        }
    }
    def on_data(self, data: Slice):
        crypto = self.securities[self._symbol]
        if abs(crypto.holdings.quantity) > crypto.symbol_properties.lot_size:
            self.liquidate_crypto(self._symbol)

     

    Trading and Orders

    Option Strategies

    You can implement any of the following Option strategies in an algorithm. Click one to learn more.

    See Also

    Equity Options
    Future Options
    Index Options

     

    Option Strategies

    Bear Call Spread

    Introduction

    Bear call spread , also known as short call spread , consists of selling an ITM call and buying an OTM call. Both calls have the same underlying Equity and the same expiration date. The ITM call serves as a hedge for the OTM call. The bear call spread profits from a drop in underlying asset price.

    Implementation

    Follow these steps to implement the bear call spread strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 3, 5);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-15, 15).Expiration(0, 31));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 3, 5)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-15, 15).expiration(0, 31))
    3. In the OnData on_data method, select the expiration and strikes of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select the call Option contracts with the furthest expiry
          var expiry = chain.Max(x => x.Expiry);    
          var calls = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Call);
          if (calls.Count() == 0) return;
      
          // Select the ITM and OTM contract strike prices from the remaining contracts
          var strikes = calls.Select(x => x.Strike).ToList();
          var otmStrike = strikes.Max();
          var itmStrike = strikes.Min();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
          
          # Select the call Option contracts with the furthest expiry
          expiry = max([x.expiry for x in chain])
          calls = [i for i in chain if i.expiry == expiry and i.right == OptionRight.CALL]
          if not calls == 0:
              return
      
          # Select the ITM and OTM contract strike prices from the remaining contracts
          strikes = [x.strike for x in calls]
          otm_strike = max(strikes)
          itm_strike = min(strikes)
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.BearCallSpread OptionStrategies.bear_call_spread method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.BearCallSpread(_symbol, itmStrike, otmStrike, expiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.bear_call_spread(self._symbol, itm_strike, otm_strike, expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var itmCall = calls.Single(x => x.Strike == itmStrike);
      var otmCall = calls.Single(x => x.Strike == otmStrike);
      
      var legs = new List<Leg>()
          {
              Leg.Create(itmCall.Symbol, -1),
              Leg.Create(otmCall.Symbol, 1)
          };
      ComboMarketOrder(legs, 1);
      itm_call = [x for x in calls if x.strike == itm_strike][0]
      otm_call = [x for x in calls if x.strike == otm_strike][0]
      
      legs = [
          Leg.create(itm_call.symbol, -1),
          Leg.create(otm_call.symbol, 1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The bear call spread is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{OTM})^{+}\\ C^{ITM}_T & = & (S_T - K^{ITM})^{+}\\ P_T & = & (C^{OTM}_T - C^{ITM}_T + C^{ITM}_0 - C^{OTM}_0)\times m - fee\\ \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{OTM}_T & = & \textrm{OTM call value at time T}\\ & C^{ITM}_T & = & \textrm{ITM call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{OTM} & = & \textrm{OTM call strike price}\\ & K^{ITM} & = & \textrm{ITM call strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{ITM}_0 & = & \textrm{ITM call value at position opening (debit paid)}\\ & C^{OTM}_0 & = & \textrm{OTM call value at position opening (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of bear call spread

    The maximum profit is the net credit you receive from opening the trade, $C^{ITM}_0 - C^{OTM}_0$. If the price declines, both calls expire worthless.

    The maximum loss is $K^{OTM} - K^{ITM} + C^{ITM}_0 - C^{OTM}_0$, which occurs when the underlying price is above the strike prices of both call Option contracts.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    OTM call 26.90 1197.50
    ITM call 57.80 1125.00
    Underlying Equity at expiration 1078.92 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{OTM})^{+}\\ & = & (1078.92-1197.50)^{+}\\ & = & 0\\ C^{ITM}_T & = & (S_T - K^{ITM})^{+}\\ & = & (1078.92-1125.00)^{+}\\ & = & 0\\ P_T & = & (C^{OTM}_T - C^{ITM}_T + C^{ITM}_0 - C^{OTM}_0)\times m - fee\\ & = & (0-0+57.80-26.90)\times100-1.00\times2\\ & = & 3088\\ \end{array} $$

    So, the strategy profits $3,088.

    The following algorithm implements a bear call spread Option strategy:


    Demonstration Algorithm
    IndexOptionBearCallSpreadAlgorithm.py Python IndexOptionBearCallSpreadAlgorithm.cs C#

     

    Option Strategies

    Bear Put Spread

    Introduction

    Bear put spread , also known as short put spread , consists of buying an ITM put and selling an OTM put. Both puts have the same underlying Equity and the same expiration date. The OTM put serves as a hedge for the ITM put. The bear put spread profits from a decline in underlying asset price.

    Implementation

    Follow these steps to implement the bear put spread strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 3, 5);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-15, 15).Expiration(0, 31));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 3, 5)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-15, 15).expiration(0, 31))
    3. In the OnData on_data method, select the expiration and strikes of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select the put Option contracts with the furthest expiry
          var expiry = chain.Max(x => x.Expiry);    
          var puts = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Put);
          if (puts.Count() == 0) return;
      
          // Select the ITM and OTM contract strike prices from the remaining contracts
          var strikes = puts.Select(x => x.Strike).ToList();
          var otmStrike = strikes.Min();
          var itmStrike = strikes.Max();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
          
          # Select the put Option contracts with the furthest expiry
          expiry = max([x.expiry for x in chain])
          puts = [i for i in chain if i.expiry == expiry and i.right == OptionRight.PUT]
          if not puts == 0:
              return
      
          # Select the ITM and OTM contract strike prices from the remaining contracts
          strikes = [x.strike for x in puts]
          otm_strike = min(strikes)
          itm_strike = max(strikes)
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.BearPutSpread OptionStrategies.bear_put_spread method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.BearPutSpread(_symbol, itmStrike, otmStrike, expiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.bear_put_spread(self._symbol, itm_strike, otm_strike, expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var itmPut = puts.Single(x => x.Strike == itmStrike);
      var otmPut = puts.Single(x => x.Strike == otmStrike);
      
      var legs = new List<Leg>()
          {
              Leg.Create(itmPut.Symbol, 1),
              Leg.Create(otmPut.Symbol, -1)
          };
      ComboMarketOrder(legs, 1);
      itm_put = [x for x in puts if x.strike == itm_strike][0]
      otm_put = [x for x in puts if x.strike == otm_strike][0]
      
      legs = [
          Leg.create(itm_put.symbol, 1),
          Leg.create(otm_put.symbol, -1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The bear put spread is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} P^{OTM}_T & = & (K^{OTM} - S_T)^{+}\\ P^{ITM}_T & = & (K^{ITM} - S_T)^{+}\\ P_T & = & (P^{ITM}_T - P^{OTM}_T + P^{OTM}_0 - P^{ITM}_0)\times m - fee\\ \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & P^{OTM}_T & = & \textrm{OTM put value at time T}\\ & P^{ITM}_T & = & \textrm{ITM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{OTM} & = & \textrm{OTM put strike price}\\ & K^{ITM} & = & \textrm{ITM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & P^{ITM}_0 & = & \textrm{ITM put value at position opening (debit paid)}\\ & P^{OTM}_0 & = & \textrm{OTM put value at position opening (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of bear put spread

    The maximum profit is $K^{ITM} - K^{OTM} + P^{OTM}_0 - P^{ITM}_0$. If the underlying price is below than the strike prices of both put Option contracts, they are worth $(K - S_T)$ at expiration.

    The maximum loss is the net debit you paid to open the position, $P^{OTM}_0 - P^{ITM}_0$.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    OTM put 4.60 767.50
    ITM put 40.00 835.00
    Underlying Equity at expiration 829.08 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} P^{OTM}_T & = & (K^{OTM} - S_T)^{+}\\ & = & (767.50-829.08)^{+}\\ & = & 0\\ P^{ITM}_T & = & (K^{ITM} - S_T)^{+}\\ & = & (835.00-829.08)^{+}\\ & = & 5.92\\ P_T & = & (P^{ITM}_T - P^{OTM}_T + P^{OTM}_0 - P^{ITM}_0)\times m - fee\\ & = & (5.92-0+4.60-40.00)\times100-1.00\times2\\ & = & -2950\\ \end{array} $$

    So, the strategy loses $2,950.

    The following algorithm implements a bear put spread strategy:


    Demonstration Algorithm
    IndexOptionBearPutSpreadAlgorithm.py Python IndexOptionBearPutSpreadAlgorithm.cs C#

     

    Option Strategies

    Bull Call Spread

    Introduction

    Bull call spread , also known as long call spread , consists of buying an ITM call and selling an OTM call. Both calls have the same underlying Equity and the same expiration date. The OTM call serves as a hedge for the ITM call. The bull call spread profits from a rise in underlying asset price.

    Implementation

    Follow these steps to implement the bull call spread strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 3, 5);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-15, 15).Expiration(0, 31));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 3, 5)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-15, 15).expiration(0, 31))
    3. In the OnData on_data method, select the expiration and strikes of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select the call Option contracts with the furthest expiry
          var expiry = chain.Max(x => x.Expiry);    
          var calls = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Call);
          if (calls.Count() == 0) return;
      
          // Select the ITM and OTM contract strike prices from the remaining contracts
          var strikes = calls.Select(x => x.Strike).ToList();
          var otmStrike = strikes.Max();
          var itmStrike = strikes.Min();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
          
          # Select the call Option contracts with the furthest expiry
          expiry = max([x.expiry for x in chain])
          calls = [i for i in chain if i.expiry == expiry and i.right == OptionRight.CALL]
          if not calls == 0:
              return
      
          # Select the ITM and OTM contract strike prices from the remaining contracts
          strikes = [x.strike for x in calls]
          otm_strike = max(strikes)
          itm_strike = min(strikes)
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.BullCallSpread OptionStrategies.bull_call_spread method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.BullCallSpread(_symbol, itmStrike, otmStrike, expiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.bull_call_spread(self._symbol, itm_strike, otm_strike, expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var itmCall = calls.Single(x => x.Strike == itmStrike);
      var otmCall = calls.Single(x => x.Strike == otmStrike);
      
      var legs = new List<Leg>()
          {
              Leg.Create(itmCall.Symbol, 1),
              Leg.Create(otmCall.Symbol, -1)
          };
      ComboMarketOrder(legs, 1);
      itm_call = [x for x in calls if x.strike == itm_strike][0]
      otm_call = [x for x in calls if x.strike == otm_strike][0]
      
      legs = [
          Leg.create(itm_call.symbol, 1),
          Leg.create(otm_call.symbol, -1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The bull call spread is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{OTM})^{+}\\ C^{ITM}_T & = & (S_T - K^{ITM})^{+}\\ P_T & = & (C^{ITM}_T - C^{OTM}_T + C^{OTM}_0 - C^{ITM}_0)\times m - fee\\ \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{OTM}_T & = & \textrm{OTM call value at time T}\\ & C^{ITM}_T & = & \textrm{ITM call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{OTM} & = & \textrm{OTM call strike price}\\ & K^{ITM} & = & \textrm{ITM call strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{ITM}_0 & = & \textrm{ITM call value at position opening (debit paid)}\\ & C^{OTM}_0 & = & \textrm{OTM call value at position opening (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of bull call spread

    The maximum profit is $K^{OTM} - K^{ITM} + C^{OTM}_0 - C^{ITM}_0$. If the underlying price increases to exceed both strikes at expiration, both calls are worth $(S_T - K)$ at expiration.

    The maximum loss is the net debit you paid to open the position, $C^{OTM}_0 - C^{ITM}_0$.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    OTM call 3.00 835.00
    ITM call 41.00 767.50
    Underlying Equity at expiration 829.08 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{OTM})^{+}\\ & = & (829.08-835.00)^{+}\\ & = & 0\\ C^{ITM}_T & = & (S_T - K^{ITM})^{+}\\ & = & (829.08-767.50)^{+}\\ & = & 61.58\\ P_T & = & (C^{ITM}_T - C^{OTM}_T + C^{OTM}_0 - C^{ITM}_0)\times m - fee\\ & = & (61.58-0+3.00-41.00)\times100-1.00\times2\\ & = & 2356\\ \end{array} $$

    So, the strategy profits $2,356.

    The following algorithm implements a bull call spread strategy:


    Demonstration Algorithm
    IndexOptionBullCallSpreadAlgorithm.py Python IndexOptionBullCallSpreadAlgorithm.cs C#

     

    Option Strategies

    Bull Put Spread

    Introduction

    Bull put spread , also known as long put spread , consists of buying an OTM put and selling an ITM put. Both puts have the same underlying Equity and the same expiration date. The OTM put serves as a hedge for the ITM put. The bull put spread profits from a rise in underlying asset price.

    Implementation

    Follow these steps to implement the bull put spread strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 3, 5);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-15, 15).Expiration(0, 31));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 3, 5)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-15, 15).expiration(0, 31))
    3. In the OnData on_data method, select the expiration and strikes of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select the put Option contracts with the furthest expiry
          var expiry = chain.Max(x => x.Expiry);    
          var puts = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Put);
          if (puts.Count() == 0) return;
      
          // Select the ITM and OTM contract strike prices from the remaining contracts
          var strikes = puts.Select(x => x.Strike).ToList();
          var otmStrike = strikes.Min();
          var itmStrike = strikes.Max();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
          
          # Select the put Option contracts with the furthest expiry
          expiry = max([x.expiry for x in chain])
          puts = [i for i in chain if i.expiry == expiry and i.right == OptionRight.PUT]
          if not puts == 0:
              return
      
          # Select the ITM and OTM contract strike prices from the remaining contracts
          strikes = [x.strike for x in puts]
          otm_strike = min(strikes)
          itm_strike = max(strikes)
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.BullPutSpread OptionStrategies.bull_put_spread method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.BullPutSpread(_symbol, itmStrike, otmStrike, expiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.bull_put_spread(self._symbol, itm_strike, otm_strike, expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var itmPut = puts.Single(x => x.Strike == itmStrike);
      var otmPut = puts.Single(x => x.Strike == otmStrike);
      
      var legs = new List<Leg>()
          {
              Leg.Create(itmPut.Symbol, -1),
              Leg.Create(otmPut.Symbol, 1)
          };
      ComboMarketOrder(legs, 1);
      itm_put = [x for x in puts if x.strike == itm_strike][0]
      otm_put = [x for x in puts if x.strike == otm_strike][0]
      
      legs = [
          Leg.create(itm_put.symbol, -1),
          Leg.create(otm_put.symbol, 1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    This is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} P^{OTM}_T & = & (K^{OTM} - S_T)^{+}\\ P^{ITM}_T & = & (K^{ITM} - S_T)^{+}\\ P_T & = & (P^{OTM}_T - P^{ITM}_T + P^{ITM}_0 - P^{OTM}_0)\times m - fee\\ \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & P^{OTM}_T & = & \textrm{OTM put value at time T}\\ & P^{ITM}_T & = & \textrm{ITM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{OTM} & = & \textrm{OTM put strike price}\\ & K^{ITM} & = & \textrm{ITM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & P^{ITM}_0 & = & \textrm{ITM put value at position opening (credit received)}\\ & P^{OTM}_0 & = & \textrm{OTM put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of bear call spread

    The maximum profit is the net credit you received when opening the position, $P^{ITM}_0 - P^{OTM}_0$. If the underlying price is higher than the strike prices of both put contracts at expiration, both puts expire worthless.

    The maximum loss is $K^{ITM} - K^{OTM} + P^{ITM}_0 - P^{OTM}_0$.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    OTM put 5.70 767.50
    ITM put 35.50 835.00
    Underlying Equity at expiration 829.08 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} P^{OTM}_T & = & (K^{OTM} - S_T)^{+}\\ & = & (767.50-829.08)^{+}\\ & = & 0\\ P^{ITM}_T & = & (K^{ITM} - S_T)^{+}\\ & = & (835.00-829.08)^{+}\\ & = & 5.92\\ P_T & = & (P^{OTM}_T - P^{ITM}_T + P^{ITM}_0 - P^{OTM}_0)\times m - fee\\ & = & (0-5.92+35.50-5.70)\times100-1.00\times2\\ & = & 2386\\ \end{array} $$

    So, the strategy profits $2,386.

    The following algorithm implements a bull put spread strategy:


    Demonstration Algorithm
    IndexOptionBullPutSpreadAlgorithm.py Python IndexOptionBullPutSpreadAlgorithm.cs C#

     

    Option Strategies

    Long Call Butterfly

    Introduction

    The long call butterfly strategy is the combination of a bull call spread and a bear call spread . In the call butterfly, all of the calls should have the same underlying Equity, the same expiration date, and the same strike price distance between the ITM-ATM and OTM-ATM call pairs. The long call butterfly consists of a long ITM call, a long OTM call, and 2 short ATM calls. This strategy profits from low volatility in the underlying Equity price.

    Implementation

    Follow these steps to implement the long call butterfly strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 3, 5);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-15, 15).Expiration(0, 31));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 3, 5)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-15, 15).expiration(0, 31))
    3. In the OnData on_data method, select the contracts of the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select the call Option contracts with the furthest expiry
          var expiry = chain.Max(x =x> x.Expiry);    
          var calls = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Call);
          if (calls.Count() == 0) return;
      
          // Select the ATM, ITM and OTM contracts from the remaining contracts
          var atmCall = calls.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First();
          var itmCall = calls.OrderBy(x => x.Strike).SkipLast(1).Last();
          var otmCall = calls.Single(x => x.Strike == atmCall.Strike * 2 - itmCall.Strike);
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain.
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Get the furthest expiry date of the contracts.
          expiry = max([x.expiry for x in chain])
          
          # Select the call Option contracts with the furthest expiry.
          calls = [i for i in chain if i.expiry == expiry and i.right == OptionRight.CALL]
          if len(calls) == 0:
              return
      
          # Select the target contracts.
          atm_call = sorted(calls, key=lambda x: abs(x.strike - chain.underlying.price))[0]
          itm_call = sorted(calls, key=lambda x: x.strike)[-2]
          otm_call = [x for x in calls if x.strike == atm_call.strike * 2 - itm_call.strike][0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.ButterflyCall OptionStrategies.butterfly_call method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.ButterflyCall(_symbol, itmCall.Strike, atmCall.Strike, otmCall.Strike, expiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.butterfly_call(self._symbol, itm_call.strike, atm_call.strike, otm_call.strike, expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(atmCall.Symbol, -2),
              Leg.Create(itmCall.Symbol, 1),
              Leg.Create(otmCall.Symbol, 1)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(atm_call.symbol, -2),
          Leg.create(itm_call.symbol, 1),
          Leg.create(otm_call.symbol, 1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The long call butterfly is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{OTM})^{+}\\ C^{ITM}_T & = & (S_T - K^{ITM})^{+}\\ C^{ATM}_T & = & (S_T - K^{ATM})^{+}\\ P_T & = & (C^{OTM}_T + C^{ITM}_T - 2\times C^{ATM}_T + 2\times C^{ATM}_0 - C^{ITM}_0 - C^{OTM}_0)\times m - fee\\ \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{OTM}_T & = & \textrm{OTM call value at time T}\\ & C^{ITM}_T & = & \textrm{ITM call value at time T}\\ & C^{ATM}_T & = & \textrm{ATM call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{OTM} & = & \textrm{OTM call strike price}\\ & K^{ITM} & = & \textrm{ITM call strike price}\\ & K^{ATM} & = & \textrm{ATM call strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{ITM}_0 & = & \textrm{ITM call value at position opening (debit paid)}\\ & C^{OTM}_0 & = & \textrm{OTM call value at position opening (debit paid)}\\ & C^{ATM}_0 & = & \textrm{OTM call value at position opening (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of long call butterfly

    The maximum profit is $K^{ATM} - K^{ITM} + 2\times C^{ATM}_0 - C^{ITM}_0 - C^{OTM}_0$. It occurs when the underlying price is the same price at expiration as it was when opening the position and the payouts of the bull and bear call spreads are at their maximum.

    The maximum loss is the net debit paid: $2\times C^{ATM}_0 - C^{ITM}_0 - C^{OTM}_0$. It occurs when the underlying price is less than ITM strike or greater than OTM strike at expiration.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Example

    The following table shows the price details of the assets in the long call butterfly:

    Asset Price ($) Strike ($)
    OTM call 4.90 767.50
    ATM call 15.00 800.00
    ITM call 41.00 832.50
    Underlying Equity at expiration 829.08 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{OTM})^{+}\\ & = & (767.50-829.08)^{+}\\ & = & 0\\ C^{ITM}_T & = & (S_T - K^{ITM})^{+}\\ & = & (832.50-829.08)^{+}\\ & = & 3.42\\ C^{ATM}_T & = & (S_T - K^{ATM})^{+}\\ & = & (800.00-829.08)^{+}\\ & = & 0\\ P_T & = & (C^{OTM}_T + C^{ITM}_T - 2\times C^{ATM}_T + 2\times C^{ATM}_0 - C^{ITM}_0 - C^{OTM}_0)\times m - fee\\ & = & (0+3.42-0\times2-4.90-41.00+15.00\times2)\times100-1.00\times4\\ & = & -1252 \end{array} $$

    So, the strategy loses $1,252.

    The following algorithm implements a long call butterfly Option strategy:


    Demonstration Algorithm
    IndexOptionCallButterflyAlgorithm.py Python IndexOptionCallButterflyAlgorithm.cs C#

     

    Option Strategies

    Short Call Butterfly

    Introduction

    The short call butterfly strategy is the combination of a bull call spread and a bear call spread . In the call butterfly, all of the calls should have the same underlying Equity, the same expiration date, and the same strike price distance between the ITM-ATM and OTM-ATM call pairs. The short call butterfly consists of a short ITM call, a short OTM call, and 2 long ATM calls. This strategy profits from high volatility in the underlying Equity price.

    Implementation

    Follow these steps to implement the short call butterfly strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 3, 5);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-15, 15).Expiration(0, 31));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 3, 5)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-15, 15).expiration(0, 31))
    3. In the OnData on_data method, select the contracts of the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select the call Option contracts with the furthest expiry
          var expiry = chain.Max(x =x> x.Expiry);    
          var calls = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Call);
          if (calls.Count() == 0) return;
      
          // Select the ATM, ITM and OTM contracts from the remaining contracts
          var atmCall = calls.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First();
          var itmCall = calls.OrderBy(x => x.Strike).Skip(1).First();
          var otmCall = calls.Single(x => x.Strike == atmCall.Strike * 2 - itmCall.Strike);
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Get the furthest expiry date of the contracts
          expiry = max([x.expiry for x in chain])
          
          # Select the call Option contracts with the furthest expiry
          calls = [i for i in chain if i.expiry == expiry and i.right == OptionRight.CALL]
          if len(calls) == 0:
              return
      
          # Select the ATM, ITM and OTM contracts from the remaining contracts
          atm_call = sorted(calls, key=lambda x: abs(x.strike - chain.underlying.price))[0]
          itm_call = sorted(calls, key=lambda x: x.strike)[1]
          otm_call = [x for x in calls if x.strike == atm_call.strike * 2 - itm_call.strike][0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.ShortButterflyCall OptionStrategies.short_butterfly_call method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.ShortButterflyCall(_symbol, otmCall.Strike, atmCall.Strike, itmCall.Strike, expiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.short_butterfly_call(self._symbol, otm_call.strike, atm_call.strike, itm_call.strike, expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(atmCall.Symbol, 2),
              Leg.Create(itmCall.Symbol, -1),
              Leg.Create(otmCall.Symbol, -1)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(atm_call.symbol, 2),
          Leg.create(itm_call.symbol, -1),
          Leg.create(otm_call.symbol, -1)
      ]
      self.combo_market_order(legs, 1)

      If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Strategy Payoff

    The short call butterfly is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{OTM})^{+}\\ C^{ITM}_T & = & (S_T - K^{ITM})^{+}\\ C^{ATM}_T & = & (S_T - K^{ATM})^{+}\\ P_T & = & (2\times C^{ATM}_T - C^{OTM}_T - C^{ITM}_T - 2\times C^{ATM}_0 + C^{ITM}_0 + C^{OTM}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{OTM}_T & = & \textrm{OTM call value at time T}\\ & C^{ITM}_T & = & \textrm{ITM call value at time T}\\ & C^{ATM}_T & = & \textrm{ATM call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{OTM} & = & \textrm{OTM call strike price}\\ & K^{ITM} & = & \textrm{ITM call strike price}\\ & K^{ATM} & = & \textrm{ATM call strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{ITM}_0 & = & \textrm{ITM call value at position opening (credit received)}\\ & C^{OTM}_0 & = & \textrm{OTM call value at position opening (credit received)}\\ & C^{ATM}_0 & = & \textrm{ATM call value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of short call butterfly

    The maximum profit is the net credit received: $C^{ITM}_0 + C^{OTM}_0 - 2\times C^{ATM}_0$. It occurs when the underlying price is less than ITM strike or greater than OTM strike at expiration.

    The maximum loss is $K^{ATM} - K^{ITM} + C^{ITM}_0 + C^{OTM}_0 - 2\times C^{ATM}_0$. It occurs when the underlying price is at the same level as when you opened the trade.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Example

    The following table shows the price details of the assets in the short call butterfly:

    Asset Price ($) Strike ($)
    OTM call 4.90 767.50
    ATM call 15.00 800.00
    ITM call 41.00 832.50
    Underlying Equity at expiration 829.08 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{OTM})^{+}\\ & = & (767.50-829.08)^{+}\\ & = & 0\\ C^{ITM}_T & = & (S_T - K^{ITM})^{+}\\ & = & (832.50-829.08)^{+}\\ & = & 3.42\\ C^{ATM}_T & = & (S_T - K^{ATM})^{+}\\ & = & (800.00-829.08)^{+}\\ & = & 0\\ P_T & = & (-C^{OTM}_T - C^{ITM}_T + 2\times C^{ATM}_T - 2\times C^{ATM}_0 + C^{ITM}_0 + C^{OTM}_0)\times m - fee\\ & = & (-0-3.42+0\times2+4.90+41.00-15.00\times2)\times100-1.00\times4\\ & = & -1252 \end{array} $$

    So, the strategy gains $1,244.

    The following algorithm implements a short call butterfly Option strategy:


    Demonstration Algorithm
    LongAndShortButterflyCallStrategiesAlgorithm.py Python LongAndShortButterflyCallStrategiesAlgorithm.cs C#

     

    Option Strategies

    Long Put Butterfly

    Introduction

    Long Put butterfly is the combination of a bull put spread and a bear put spread . In this strategy, all the puts have the same underlying stock, the same expiration date, and the strike price distance of ITM-ATM and OTM-ATM put pairs are the same. The long put butterfly strategy consists of buying an ITM put, buying an OTM put, and selling 2 ATM puts. This strategy profits from low volatility.

    Implementation

    Follow these steps to implement the long put butterfly strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 3, 5);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-15, 15).Expiration(0, 31));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 3, 5)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-15, 15).expiration(0, 31))
    3. In the OnData on_data method, select the contracts of the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select the call Option contracts with the furthest expiry
          var expiry = chain.Max(x =x> x.Expiry);    
          var puts = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Put);
          if (puts.Count() == 0) return;
      
          // Select the ATM, ITM and OTM contracts from the remaining contracts
          var atmPut = puts.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First();
          var itmPut = puts.OrderBy(x => x.Strike).SkipLast(1).Last();
          var otmPut = puts.Single(x => x.Strike == atmPut.Strike * 2 - itmPut.Strike);
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Get the furthest expiry date of the contracts
          expiry = max([x.expiry for x in chain])
          
          # Select the call Option contracts with the furthest expiry
          puts = [i for i in chain if i.expiry == expiry and i.right == OptionRight.PUT]
          if len(puts) == 0:
              return
      
          # Select the ATM, ITM and OTM contracts from the remaining contracts
          atm_put = sorted(puts, key=lambda x: abs(x.strike - chain.underlying.price))[0]
          itm_put = sorted(puts, key=lambda x: x.strike)[-2]
          otm_put = [x for x in puts if x.strike == atm_put.strike * 2 - itm_put.strike][0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.ButterflyPut OptionStrategies.butterfly_put method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.ButterflyPut(_symbol, itmPut.Strike, atmPut.Strike, otmPut.Strike, expiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.butterfly_put(self._symbol, itm_put.strike, atm_put.strike, otm_put.strike, expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(atmPut.Symbol, -2),
              Leg.Create(itmPut.Symbol, 1),
              Leg.Create(otmPut.Symbol, 1)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(atm_put.symbol, -2),
          Leg.create(itm_put.symbol, 1),
          Leg.create(otm_put.symbol, 1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The long put butterfly is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} P^{OTM}_T & = & (K^{OTM} - S_T)^{+}\\ P^{ITM}_T & = & (K^{ITM} - S_T)^{+}\\ P^{ATM}_T & = & (K^{ATM} - S_T)^{+}\\ P_T & = & (P^{OTM}_T + P^{ITM}_T - 2\times P^{ATM}_T + 2\times P^{ATM}_0 - P^{ITM}_0 - P^{OTM}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & P^{OTM}_T & = & \textrm{OTM put value at time T}\\ & P^{ITM}_T & = & \textrm{ITM put value at time T}\\ & P^{ATM}_T & = & \textrm{ATM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{OTM} & = & \textrm{OTM put strike price}\\ & K^{ITM} & = & \textrm{ITM put strike price}\\ & K^{ATM} & = & \textrm{ATM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & P^{ITM}_0 & = & \textrm{ITM put value at position opening (debit paid)}\\ & P^{OTM}_0 & = & \textrm{OTM put value at position opening (debit paid)}\\ & P^{ATM}_0 & = & \textrm{ATM put value at position opening (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of long put butterfly

    The maximum profit is $K^{ATM} - K^{OTM} + 2\times P^{ATM}_0 - P^{ITM}_0 - P^{OTM}_0$. It occurs when the underlying price is the same at expiration as it was when you open the trade. In this case, the payout of the combined bull put and bear put spreads are at their maximum.

    The maximum loss is the net debit paid, $2\times P^{ATM}_0 - P^{ITM}_0 - P^{OTM}_0$. It occurs when the underlying price is below the ITM strike price or above the OTM strike price at expiration.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Example

    The following table shows the price details of the assets in the long put butterfly algorithm:

    Asset Price ($) Strike ($)
    ITM put 37.80 832.50
    ATM put 14.70 800.00
    OTM put 5.70 767.50
    Underlying Equity at expiration 829.08 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} P^{OTM}_T & = & (K^{OTM} - S_T)^{+}\\ & = & (829.08-832.50)^{+}\\ & = & 0\\ P^{ITM}_T & = & (K^{ITM} - S_T)^{+}\\ & = & (829.08-767.50)^{+}\\ & = & 61.58\\ P^{ATM}_T & = & (K^{ATM} - S_T)^{+}\\ & = & (829.08-800.00)^{+}\\ & = & 29.08\\ P_T & = & (P^{OTM}_T + P^{ITM}_T - 2\times P^{ATM}_T + 2\times P^{ATM}_0 - P^{ITM}_0 - P^{OTM}_0)\times m - fee\\ & = & (61.58+0-29.08\times2-5.70-37.80+14.70\times2)\times100-1.00\times4\\ & = & -1072 \end{array} $$

    So, the strategy loses $1,072.

    The following algorithm implements a long put butterfly Option strategy:


    Demonstration Algorithm
    IndexOptionPutButterflyAlgorithm.py Python IndexOptionPutButterflyAlgorithm.cs C#

     

    Option Strategies

    Short Put Butterfly

    Introduction

    Short Put butterfly is the combination of a bull put spread and a bear put spread . In this strategy, all the puts have the same underlying stock, the same expiration date, and the strike price distance of ITM-ATM and OTM-ATM put pairs are the same. The short put butterfly strategy consists of selling an ITM put, selling an OTM put, and buying 2 ATM puts. This strategy profits from a drastic change in underlying price.

    Implementation

    Follow these steps to implement the short put butterfly strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 3, 5);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-15, 15).Expiration(0, 31));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 3, 5)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-15, 15).expiration(0, 31))
    3. In the OnData on_data method, select the contracts of the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select the call Option contracts with the furthest expiry
          var expiry = chain.Max(x =x> x.Expiry);    
          var puts = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Put);
          if (puts.Count() == 0) return;
      
          // Select the ATM, ITM and OTM contracts from the remaining contracts
          var atmPut = puts.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First();
          var itmPut = puts.OrderBy(x => x.Strike).SkipLast(1).Last();
          var otmPut = puts.Single(x => x.Strike == atmPut.Strike * 2 - itmPut.Strike);
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Get the furthest expiry date of the contracts
          expiry = max([x.expiry for x in chain])
          
          # Select the call Option contracts with the furthest expiry
          puts = [i for i in chain if i.expiry == expiry and i.right == OptionRight.PUT]
          if len(puts) == 0:
              return
      
          # Select the ATM, ITM and OTM contracts from the remaining contracts
          atm_put = sorted(puts, key=lambda x: abs(x.strike - chain.underlying.price))[0]
          itm_put = sorted(puts, key=lambda x: x.strike)[-2]
          otm_put = [x for x in puts if x.strike == atm_put.strike * 2 - itm_put.strike][0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.ShortButterflyPut OptionStrategies.short_butterfly_put method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.ShortButterflyPut(_symbol, itmPut.Strike, atmPut.Strike, otmPut.Strike, expiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.short_butterfly_put(self._symbol, itm_put.strike, atm_put.strike, otm_put.strike, expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(atmPut.Symbol, 2),
              Leg.Create(itmPut.Symbol, -1),
              Leg.Create(otmPut.Symbol, -1)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(atm_put.symbol, 2),
          Leg.create(itm_put.symbol, -1),
          Leg.create(otm_put.symbol, -1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The short put butterfly is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} P^{OTM}_T & = & (K^{OTM} - S_T)^{+}\\ P^{ITM}_T & = & (K^{ITM} - S_T)^{+}\\ P^{ATM}_T & = & (K^{ATM} - S_T)^{+}\\ P_T & = & (2\times P^{ATM}_T - P^{OTM}_T - P^{ITM}_T - 2\times P^{ATM}_0 + P^{ITM}_0 + P^{OTM}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & P^{OTM}_T & = & \textrm{OTM put value at time T}\\ & P^{ITM}_T & = & \textrm{ITM put value at time T}\\ & P^{ATM}_T & = & \textrm{ATM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{OTM} & = & \textrm{OTM put strike price}\\ & K^{ITM} & = & \textrm{ITM put strike price}\\ & K^{ATM} & = & \textrm{ATM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & P^{ITM}_0 & = & \textrm{ITM put value at position opening (credit received)}\\ & P^{OTM}_0 & = & \textrm{OTM put value at position opening (credit received)}\\ & P^{ATM}_0 & = & \textrm{ATM put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of short put butterfly

    The maximum profit is the net credit received, $P^{ITM}_0 + P^{OTM}_0 - 2\times P^{ATM}_0$. It occurs when the underlying price is below the ITM strike or above the OTM strike at expiration.

    The maximum loss is $K^{ATM} - K^{OTM} - 2\times P^{ATM}_0 + P^{ITM}_0 + P^{OTM}_0$. It occurs when the underlying price at expiration is at the same price as when you opened the trade.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Example

    The following table shows the price details of the assets in the short put butterfly algorithm:

    Asset Price ($) Strike ($)
    ITM put 37.80 832.50
    ATM put 14.70 800.00
    OTM put 5.70 767.50
    Underlying Equity at expiration 829.08 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} P^{OTM}_T & = & (K^{OTM} - S_T)^{+}\\ & = & (829.08-832.50)^{+}\\ & = & 0\\ P^{ITM}_T & = & (K^{ITM} - S_T)^{+}\\ & = & (829.08-767.50)^{+}\\ & = & 61.58\\ P^{ATM}_T & = & (K^{ATM} - S_T)^{+}\\ & = & (829.08-800.00)^{+}\\ & = & 29.08\\ P_T & = & (-P^{OTM}_T - P^{ITM}_T + 2\times P^{ATM}_T - 2\times P^{ATM}_0 + P^{ITM}_0 + P^{OTM}_0)\times m - fee\\ & = & (-61.58-0+29.08\times2+5.70+37.80-14.70\times2)\times100-1.00\times4\\ & = & 1064 \end{array} $$

    So, the strategy gains $1,064.

    The following algorithm implements a short put butterfly Option strategy:


    Demonstration Algorithm
    LongAndShortButterflyPutStrategiesAlgorithm.py Python LongAndShortButterflyPutStrategiesAlgorithm.cs C#

     

    Option Strategies

    Long Call Calendar Spread

    Introduction

    Long call calendar spread , also known as call horizontal spread , is a combination of a longer-term (far-leg/front-month) call and a shorter-term (near-leg/back-month) call, where all calls have the same underlying stock and the same strike price. The long call calendar spread consists of buying a longer-term call and selling a shorter-term call. This strategy profits from a decrease in the underlying price. It also profits from the time decay value because the theta $\theta$ (the Option price decay by 1 day closer to maturity) of the shorter-term call is larger than longer-term call.

    Implementation

    Follow these steps to implement the long call calendar spread strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 2, 19);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-1, 1).Expiration(0, 62));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 2, 19)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-1, 1).expiration(0, 62))
    3. In the OnData on_data method, select the strike price and expiration dates of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Get the ATM strike
          var atmStrike = chain.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First().Strike;
      
          // Select the ATM call Option contracts
          var calls = chain.Where(x => x.Strike == atmStrike && x.Right == OptionRight.Call);
          if (calls.Count() == 0) return;
      
          // Select the near and far expiry contracts
          var expiries = calls.Select(x => x.Expiry).ToList();
          var nearExpiry = expiries.Min();
          var farExpiry = expiries.Max();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Get the ATM strike
          atm_strike = sorted(chain, key=lambda x: abs(x.strike - chain.underlying.price))[0].strike
      
          # Select the ATM call Option contracts
          calls = [i for i in chain if i.strike == atm_strike and i.right == OptionRight.CALL]
          if len(calls) == 0:
              return
      
          # Select the near and far expiry dates
          expiries = sorted([x.expiry for x in calls])
          near_expiry = expiries[0]
          far_expiry = expiries[-1]
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.CallCalendarSpread OptionStrategies.call_calendar_spread method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.CallCalendarSpread(_symbol, atmStrike, nearExpiry, farExpiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.call_calendar_spread(self._symbol, atm_strike, near_expiry, far_expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var nearExpiryCall = calls.Single(x => x.Expiry == nearExpiry);
      var farExpiryCall = calls.Single(x => x.Expiry == farExpiry);
      
      var legs = new List<Leg>()
          {
              Leg.Create(nearExpiryCall.Symbol, -1),
              Leg.Create(farExpiryCall.Symbol, 1)
          };
      ComboMarketOrder(legs, 1);
      near_expiry_call = [x for x in calls if x.expiry == near_expiry][0]
      far_expiry_call = [x for x in calls if x.expiry == far_expiry][0]
      
      legs = [
          Leg.create(near_expiry_call.symbol, -1),
          Leg.create(far_expiry_call.symbol, 1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The long call calendar spread is a limited-reward-limited-risk strategy. The payoff at the shorter-term expiration is

    $$ \begin{array}{rcll} C^{\textrm{short-term}}_T & = & (S_T - K)^{+}\\ P_T & = & (C^{\textrm{long-term}}_T - C^{\textrm{short-term}}_T + C^{\textrm{short-term}}_0 - C^{\textrm{long-term}}_0)\times m - fee\\ \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{\textrm{short-term}}_T & = & \textrm{Shorter term call value at time T}\\ & C^{\textrm{long-term}}_T & = & \textrm{Longer term call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{\textrm{short-term}}_0 & = & \textrm{Shorter term call value at position opening (credit received)}\\ & C^{\textrm{long-term}}_0 & = & \textrm{Longer term call value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of shorter term call expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of long call calendar spread

    The maximum profit is undetermined because it depends on the underlying volatility. It occurs when $S_T = S_0$ and the spread of the calls are at their maximum.

    The maximum loss is the net debit paid, $C^{\textrm{short-term}}_0 - C^{\textrm{long-term}}_0$. It occurs when the underlying price moves very deep ITM or OTM so the values of both calls are close to zero.

    If the Option is American Option, there is a risk of early assignment on the contract you sell. If the buyer exercises the call you sell, you could lose all the debit you received if you don't close the long call and the underlying price drops below the long call strike price.

    Example

    The following table shows the price details of the assets in the long call calendar spread:

    Asset Price ($) Strike ($)
    Longer-term call at the start of the trade 4.40 835.00
    Shorter-term call at the start of the trade 36.80 767.50
    Longer-term call at time $T$ 31.35 835.00
    Underlying Equity at time $T$ 829.08 -

    Therefore, the payoff at time $T$ (the expiration of the short-term call) is

    $$ \begin{array}{rcll} C^{\textrm{short-term}}_T & = & (S_T - K)^{+}\\ & = & (828.07-800.00)^{+}\\ & = & 28.07\\ P_T & = & (C^{\textrm{long-term}}_T - C^{\textrm{short-term}}_T + C^{\textrm{short-term}}_0 - C^{\textrm{long-term}}_0)\times m - fee\\ & = & (31.35-28.07+11.30-20.00)\times100-1.00\times2\\ & = & -544 \end{array} $$

    So, the strategy loses $544.

    The following algorithm implements a long call calendar spread Option strategy:

    Demonstration Algorithm
    IndexOptionCallCalendarSpreadAlgorithm.py Python LongAndShortCallCalendarSpreadStrategiesAlgorithm.py Python IndexOptionCallCalendarSpreadAlgorithm.cs C# LongAndShortCallCalendarSpreadStrategiesAlgorithm.cs C#

     

    Option Strategies

    Short Call Calendar Spread

    Introduction

    Call calendar spread , also known as call horizontal spread , is a combination of a longer-term (far-leg/front-month) call and a shorter-term (near-leg/back-month) call, where all calls have the same underlying stock and the same strike price. The short call calendar spread consists of selling a longer-term call and buying a shorter-term call. The strategy profits from from an increase in the underlying price.

    Implementation

    Follow these steps to implement the short call calendar spread strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 2, 19);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-1, 1).Expiration(0, 62));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 2, 19)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-1, 1).expiration(0, 62))
    3. In the OnData on_data method, select the strike price and expiration dates of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Get the ATM strike
          var atmStrike = chain.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First().Strike;
      
          // Select the ATM call Option contracts
          var calls = chain.Where(x => x.Strike == atmStrike && x.Right == OptionRight.Call);
          if (calls.Count() == 0) return;
      
          // Select the near and far expiry contracts
          var expiries = calls.Select(x => x.Expiry).ToList();
          var nearExpiry = expiries.Min();
          var farExpiry = expiries.Max();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Get the ATM strike
          atm_strike = sorted(chain, key=lambda x: abs(x.strike - chain.underlying.price))[0].strike
      
          # Select the ATM call Option contracts
          calls = [i for i in chain if i.strike == atm_strike and i.right == OptionRight.CALL]
          if len(calls) == 0:
              return
      
          # Select the near and far expiry dates
          expiries = sorted([x.expiry for x in calls])
          near_expiry = expiries[0]
          far_expiry = expiries[-1]
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.ShortCallCalendarSpread OptionStrategies.short_call_calendar_spread method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.ShortCallCalendarSpread(_symbol, atmStrike, nearExpiry, farExpiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.short_call_calendar_spread(self._symbol, atm_strike, near_expiry, far_expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var nearExpiryCall = calls.Single(x => x.Expiry == nearExpiry);
      var farExpiryCall = calls.Single(x => x.Expiry == farExpiry);
      
      var legs = new List<Leg>()
          {
              Leg.Create(nearExpiryCall.Symbol, 1),
              Leg.Create(farExpiryCall.Symbol, -1)
          };
      ComboMarketOrder(legs, 1);
      near_expiry_call = [x for x in calls if x.expiry == near_expiry][0]
      far_expiry_call = [x for x in calls if x.expiry == far_expiry][0]
      
      legs = [
          Leg.create(near_expiry_call.symbol, 1),
          Leg.create(far_expiry_call.symbol, -1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The short call calendar spread is a limited-reward-limited-risk strategy. The payoff at the shorter-term expiration is

    $$ \begin{array}{rcll} C^{\textrm{short-term}}_T & = & (S_T - K)^{+}\\ P_T & = & (C^{\textrm{short-term}}_T - C^{\textrm{long-term}}_T + C^{\textrm{long-term}}_0 - C^{\textrm{short-term}}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{\textrm{short-term}}_T & = & \textrm{Shorter term call value at time T}\\ & C^{\textrm{long-term}}_T & = & \textrm{Longer term call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{\textrm{short-term}}_0 & = & \textrm{Shorter term call value at position opening (debit paid)}\\ & C^{\textrm{long-term}}_0 & = & \textrm{Longer term call value at position opening (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of shorter term call expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of short call calendar spread

    The maximum profit is the net credit received, $C^{\textrm{long-term}}_0 - C^{\textrm{short-term}}_0$. It occurs when the underlying price moves very deep ITM or OTM so the values of both calls are close to zero.

    The maximum loss is undetermined because it depends on the underlying volatility. It occurs when $S_T = S_0$ and the spread of the 2 calls are at their maximum.

    If the Option is American Option, there is a risk of early assignment on the contract you sell. If you don't close the call positions together, the naked short call will have unlimited drawdown risk after the long call expires.

    Example

    The following table shows the price details of the assets in the short call calendar spread:

    Asset Price ($) Strike ($)
    Longer-term call at the start of the trade 4.40 835.00
    Shorter-term call at the start of the trade 36.80 767.50
    Longer-term call at time $T$ 31.35 835.00
    Underlying Equity at time $T$ 829.08 -

    Therefore, the payoff at time $T$ (the expiration of the short-term call) is

    $$ \begin{array}{rcll} C^{\textrm{short-term}}_T & = & (S_T - K)^{+}\\ & = & (828.07-800.00)^{+}\\ & = & 28.07\\ P_T & = & (-C^{\textrm{long-term}}_T + C^{\textrm{short-term}}_T - C^{\textrm{short-term}}_0 + C^{\textrm{long-term}}_0)\times m - fee\\ & = & (-31.35+28.07-11.30+20.00)\times100-1.00\times2\\ & = & 540 \end{array} $$

    So, the strategy gains $540.

    The following algorithm implements a short call calendar spread Option strategy:

    Demonstration Algorithm
    LongAndShortCallCalendarSpreadStrategiesAlgorithm.py Python LongAndShortCallCalendarSpreadStrategiesAlgorithm.cs C#

     

    Option Strategies

    Long Put Calendar Spread

    Introduction

    Put calendar spread , also known as put horizontal spread , is a combination of a longer-term (far-leg/front-month) put and a shorter-term (near-leg/back-month) put, where both puts have the same underlying stock and the same strike price. The long put calendar spread consists of buying a longer-term put and selling a shorter-term put. This strategy profits from a decrease in price movement. The strategy also profits from the time decay value because the theta $\theta$ (the Option price decay by 1 day closer to maturity) of the shorter-term put is larger than the longer-term put.

    Implementation

    Follow these steps to implement the long put calendar spread strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 2, 19);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-1, 1).Expiration(0, 62));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 2, 19)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-1, 1).expiration(0, 62))
    3. In the OnData on_data method, select the strike price and expiration dates of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Get the ATM strike
          var atmStrike = chain.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First().Strike;
      
          // Select the ATM put Option contracts
          var puts = chain.Where(x => x.Strike == atmStrike && x.Right == OptionRight.Put);
          if (puts.Count() == 0) return;
      
          // Select the near and far expiry contracts
          var expiries = puts.Select(x => x.Expiry).ToList();
          var nearExpiry = expiries.Min();
          var farExpiry = expiries.Max();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Get the ATM strike
          atm_strike = sorted(chain, key=lambda x: abs(x.strike - chain.underlying.price))[0].strike
      
          # Select the ATM put Option contracts
          puts = [i for i in chain if i.strike == atm_strike and i.right == OptionRight.PUT]
          if len(puts) == 0:
              return
      
          # Select the near and far expiry dates
          expiries = sorted([x.expiry for x in puts])
          near_expiry = expiries[0]
          far_expiry = expiries[-1]
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.PutCalendarSpread OptionStrategies.put_calendar_spread method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.PutCalendarSpread(_symbol, atmStrike, nearExpiry, farExpiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.put_calendar_spread(self._symbol, atm_strike, near_expiry, far_expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var nearExpiryPut = puts.Single(x => x.Expiry == nearExpiry);
      var farExpiryPut = puts.Single(x => x.Expiry == farExpiry);
      
      var legs = new List<Leg>()
          {
              Leg.Create(nearExpiryPut.Symbol, -1),
              Leg.Create(farExpiryPut.Symbol, 1)
          };
      ComboMarketOrder(legs, 1);
      near_expiry_put = [x for x in puts if x.expiry == near_expiry][0]
      far_expiry_put = [x for x in puts if x.expiry == far_expiry][0]
      
      legs = [
          Leg.create(near_expiry_put.symbol, -1),
          Leg.create(far_expiry_put.symbol, 1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The long put calendar spread is a limited-reward-limited-risk strategy. The payoff is taken at the shorter-term expiration. The payoff is

    $$ \begin{array}{rcll} P^{\textrm{short-term}}_T & = & (K - S_T)^{+}\\ P_T & = & (P^{\textrm{long-term}}_T - P^{\textrm{short-term}}_T + P^{\textrm{short-term}}_0 - P^{\textrm{long-term}}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & P^{\textrm{short-term}}_T & = & \textrm{Shorter term put value at time T}\\ & P^{\textrm{long-term}}_T & = & \textrm{Longer term put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & P^{\textrm{short-term}}_0 & = & \textrm{Shorter term put value at position opening (credit received)}\\ & P^{\textrm{long-term}}_0 & = & \textrm{Longer term put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of shorter term put expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of long put calendar spread

    The maximum profit is undetermined because it depends on the underlying volatility.  It occurs when $S_T = S_0$ and the spread of the puts are at their maximum.

    The maximum loss is the net debit paid, $P^{\textrm{short-term}}_0 - P^{\textrm{long-term}}_0$. It occurs when the underlying price moves very deep ITM or OTM so the values of both puts are close to zero.

    If the Option is American Option, there is a risk of early assignment on the contract you sell. Naked long puts pose risk of losing all the debit paid if you don't close the position with short put together and the price drops below its strike.

    Example

    The following table shows the price details of the assets in the long put calendar spread algorithm:

    Asset Price ($) Strike ($)
    Shorter-term put at position opening 11.30 800.00
    Longer-term put at position opening 19.30 800.00
    Longer-term put at shorter-term expiration
    3.50 800.00
    Underlying Equity at shorter-term expiration 828.07 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} P^{\textrm{short-term}}_T & = & (K - S_T)^{+}\\ & = & (800.00-828.07)^{+}\\ & = & 0\\ P_T & = & (P^{\textrm{long-term}}_T - P^{\textrm{short-term}}_T + P^{\textrm{short-term}}_0 - P^{\textrm{long-term}}_0)\times m - fee\\ & = & (3.50-0+11.30-19.30)\times100-1.00\times2\\ & = & -452\\ \end{array} $$

    So, the strategy loses $452.

    The following algorithm implements a long put calendar spread Option strategy:

    Demonstration Algorithm
    IndexOptionPutCalendarSpreadAlgorithm.py Python LongAndShortPutCalendarSpreadStrategiesAlgorithm.py Python IndexOptionPutCalendarSpreadAlgorithm.cs C# LongAndShortPutCalendarSpreadStrategiesAlgorithm.cs C#

     

    Option Strategies

    Short Put Calendar Spread

    Introduction

    Put calendar spread , also known as put horizontal spread , is a combination of a longer-term (far-leg/front-month) put and a shorter-term (near-leg/back-month) put, where both puts have the same underlying stock and the same strike price. The short put calendar spread consists of selling a longer-term put and buying a shorter-term put. This strategy profits from an increase in price movement.

    Implementation

    Follow these steps to implement the short put calendar spread strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 2, 19);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-1, 1).Expiration(0, 62));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 2, 19)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-1, 1).expiration(0, 62))
    3. In the OnData on_data method, select the strike price and expiration dates of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Get the ATM strike
          var atmStrike = chain.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First().Strike;
      
          // Select the ATM put Option contracts
          var puts = chain.Where(x => x.Strike == atmStrike && x.Right == OptionRight.Put);
          if (puts.Count() == 0) return;
      
          // Select the near and far expiry contracts
          var expiries = puts.Select(x => x.Expiry).ToList();
          var nearExpiry = expiries.Min();
          var farExpiry = expiries.Max();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Get the ATM strike
          atm_strike = sorted(chain, key=lambda x: abs(x.strike - chain.underlying.price))[0].strike
      
          # Select the ATM put Option contracts
          puts = [i for i in chain if i.strike == atm_strike and i.right == OptionRight.PUT]
          if len(puts) == 0:
              return
      
          # Select the near and far expiry dates
          expiries = sorted([x.expiry for x in puts])
          near_expiry = expiries[0]
          far_expiry = expiries[-1]
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.ShortPutCalendarSpread OptionStrategies.short_put_calendar_spread method with the details of each leg and then pass the result to the Buy buy method.

      var optionStrategy = OptionStrategies.ShortPutCalendarSpread(_symbol, atmStrike, nearExpiry, farExpiry);
      Buy(optionStrategy, 1);
      option_strategy = OptionStrategies.short_put_calendar_spread(self._symbol, atm_strike, near_expiry, far_expiry)
      self.buy(option_strategy, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var nearExpiryPut = puts.Single(x => x.Expiry == nearExpiry);
      var farExpiryPut = puts.Single(x => x.Expiry == farExpiry);
      
      var legs = new List<Leg>()
          {
              Leg.Create(nearExpiryPut.Symbol, 1),
              Leg.Create(farExpiryPut.Symbol, -1)
          };
      ComboMarketOrder(legs, 1);
      near_expiry_put = [x for x in puts if x.expiry == near_expiry][0]
      far_expiry_put = [x for x in puts if x.expiry == far_expiry][0]
      
      legs = [
          Leg.create(near_expiry_put.symbol, 1),
          Leg.create(far_expiry_put.symbol, -1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The short put calendar spread is a limited-reward-limited-risk strategy. The payoff is taken at the shorter-term expiration. The payoff is

    $$ \begin{array}{rcll} P^{\textrm{short-term}}_T & = & (K - S_T)^{+}\\ P_T & = & (P^{\textrm{short-term}}_T - P^{\textrm{long-term}}_T + P^{\textrm{long-term}}_0 - P^{\textrm{short-term}}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & P^{\textrm{short-term}}_T & = & \textrm{Shorter term put value at time T}\\ & P^{\textrm{long-term}}_T & = & \textrm{Longer term put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & P^{\textrm{short-term}}_0 & = & \textrm{Shorter term put value at position opening (debit paid)}\\ & P^{\textrm{long-term}}_0 & = & \textrm{Longer term put value at position opening (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of shorter term put expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of short put calendar spread

    The maximum profit is the net credit received, $P^{\textrm{long-term}}_0 - P^{\textrm{short-term}}_0$. It occurs when the underlying price moves very deep ITM or OTM so the values of both puts are close to zero.

    The maximum loss is undetermined because it depends on the underlying volatility. It occurs when $S_T = S_0$ and the spread of the 2 puts are at their maximum.

    If the Option is American Option, there is a risk of early assignment on the contract you sell. Additionally, if you don't close the put positions together, the naked short put will have unlimited drawdown risk after the long put expires.

    Example

    The following table shows the price details of the assets in the short put calendar spread algorithm:

    Asset Price ($) Strike ($)
    Shorter-term put at position opening 11.30 800.00
    Longer-term put at position opening 19.30 800.00
    Longer-term put at shorter-term expiration
    3.50 800.00
    Underlying Equity at shorter-term expiration 828.07 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} P^{\textrm{short-term}}_T & = & (K - S_T)^{+}\\ & = & (800.00-828.07)^{+}\\ & = & 0\\ P_T & = & (-P^{\textrm{long-term}}_T + P^{\textrm{short-term}}_T - P^{\textrm{short-term}}_0 + P^{\textrm{long-term}}_0)\times m - fee\\ & = & (-3.50+0-11.30+19.30)\times100-1.00\times2\\ & = & 448\\ \end{array} $$

    So, the strategy gains $448.

    The following algorithm implements a short put calendar spread Option strategy:

    Demonstration Algorithm
    LongAndShortPutCalendarSpreadStrategiesAlgorithm.py Python LongAndShortPutCalendarSpreadStrategiesAlgorithm.cs C#

     

    Option Strategies

    Covered Call

    Introduction

    A Covered Call consists of a long position in a stock and a short position in call Options for the same amount of stock. Covered calls aim to profit from the Option premium by selling calls written on the stock you already own. At any time for American Options or at expiration for European Options, if the stock moves below the strike price, you keep the premium and still maintain the underlying Equity position. If the underlying price moves above the strike, the Option buyer can exercise the Options contract , which means you sell your stock at the strike price and keep the premium. Another risk of a covered call comes from the long stock position, which can drop in value.

    Implementation

    Follow these steps to implement the covered call strategy:

    1. In the Initialize initialize method, set the start date, end date, starting cash, and Options universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2014, 1, 1);
          SetEndDate(2014, 3, 1);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("IBM");
          _symbol = option.Symbol;
          option.SetFilter(-3, 3, 0, 31);
      }
      def initialize(self) -> None:
          self.set_start_date(2014, 1, 1)
          self.set_end_date(2014, 3, 1)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("IBM")
          self._symbol = option.symbol
          option.set_filter(-3, 3, 0, 31)
    3. In the OnData on_data method, select the Option contract.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Find ATM call with the farthest expiry
          var expiry = chain.Max(x => x.Expiry);
          var atmCall = chain
              .Where(x => x.Right == OptionRight.Call && x.Expiry == expiry)
              .OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price))
              .FirstOrDefault();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chains.get(self._symbol)
          if not chain:
              return
      
          # Find ATM call with the farthest expiry
          expiry = max([x.expiry for x in chain])
          call_contracts = sorted([x for x in chain
              if x.right == OptionRight.CALL and x.expiry == expiry],
              key=lambda x: abs(chain.underlying.price - x.strike))
      
          if not call_contracts:
              return
      
          atm_call = call_contracts[0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.CoveredCall OptionStrategies.covered_call method with the details of each leg and then pass the result to the Buy buy method.

      var coveredCall = OptionStrategies.CoveredCall(_symbol, atmCall.Strike, expiry);
      Buy(coveredCall, 1);
      covered_call = OptionStrategies.covered_call(self._symbol, atm_call.strike, expiry)
      self.buy(covered_call, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(atmCall.Symbol, -1),
              Leg.Create(chain.Underlying.Symbol, chain.Underlying.SymbolProperties.ContractMultiplier)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(atm_call.symbol, -1),
          Leg.create(chain.underlying.symbol, chain.underlying.symbol_properties.contract_multiplier)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} C^{K}_T & = & (S_T - K)^{+}\\ P_T & = & (S_T - S_0 + C^{K}_0 - C^{K}_T)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{K}_T & = & \textrm{Call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Call strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & S_0 & = & \textrm{Underlying asset price when the trade opened}\\ & C^{K}_0 & = & \textrm{Call price when the trade opened (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    covered call strategy payoff

    The maximum profit is $K - S_T + C^{K}_0$, which occurs when the underlying price is at or above the strike price of the call at expiration.

    The maximum loss is $S_0 - C^{K}_0$, which ocurrs when the underlying price drops.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Call 3.35 185.00
    Underlying Equity at start of the trade 187.07 -
    Underlying Equity at expiration 190.01 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{K}_T & = & (S_T - K)^{+}\\ & = & (190.01 - 185)^{+}\\ & = & 5.01\\ P_T & = & (S_T - S_0 + C^{K}_0 - C^{K}_T)\times m - fee\\ & = & (190.01 - 187.07 + 3.35 - 5.01)\times m - fee\\ & = & 1.28 \times 100 - 2\\ & = & 126 \end{array} $$

    So, the strategy gains $126.

    The following algorithm implements a covered call strategy:

     

    Option Strategies

    Covered Put

    Introduction

    A Covered Put consists of a short position in a stock and a short position in put Options for the same amount of stock. Covered puts aim to profit from the Option premium by selling puts written on the stock you already shorted. At any time for American Options or at expiration for European Options, if the stock moves below the strike price, you keep the premium and still maintain the underlying Equity position. If the underlying price moves above the strike, the Option buyer can exercise the Options contract , which mean you buy the stock at the strike price but you will still keep the premium. Another risk of a covered put comes from the short stock position, which can drop in value.

    Implementation

    Follow these steps to implement the covered put strategy:

    1. In the Initialize initialize method, set the start date, end date, starting cash, and Options universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2014, 1, 1);
          SetEndDate(2014, 3, 1);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("IBM");
          _symbol = option.Symbol;
          option.SetFilter(-3, 3, 0, 31);
      }
      def initialize(self) -> None:
          self.set_start_date(2014, 1, 1)
          self.set_end_date(2014, 3, 1)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("IBM")
          self._symbol = option.symbol
          option.set_filter(-3, 3, 0, 31)
    3. In the OnData on_data method, select the Option contract.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Find ATM put with the farthest expiry
          var expiry = chain.Max(x => x.Expiry);
          var atmput = chain
              .Where(x => x.Right == OptionRight.Put && x.Expiry == expiry)
              .OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price))
              .FirstOrDefault();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chains.get(self._symbol)
          if not chain:
              return
      
          # Find ATM put with the farthest expiry
          expiry = max([x.expiry for x in chain])
          put_contracts = sorted([x for x in chain
              if x.right == OptionRight.PUT and x.expiry == expiry],
              key=lambda x: abs(chain.underlying.price - x.strike))
      
          if not put_contracts:
              return
      
          atm_put = put_contracts[0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.CoveredPut OptionStrategies.covered_put method with the details of each leg and then pass the result to the Buy buy method.

      var coveredPut = OptionStrategies.CoveredPut(_symbol, atmput.Strike, expiry);
      Buy(coveredPut, 1);
      covered_put = OptionStrategies.covered_put(self._symbol, atm_put.strike, expiry)
      self.buy(covered_put, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(atmPut.Symbol, -1),
              Leg.Create(chain.Underlying.Symbol, -chain.Underlying.SymbolProperties.ContractMultiplier)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(atm_put.symbol, -1),
          Leg.create(chain.underlying.symbol, -chain.underlying.symbol_properties.contract_multiplier)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} P^{K}_T & = & (K - S_T)^{+}\\ P_T & = & (S_0 - S_T + P^{K}_0 - P^{K}_T)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & P^{K}_T & = & \textrm{Put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & S_0 & = & \textrm{Underlying asset price when the trade opened}\\ & P^{K}_0 & = & \textrm{Put price when the trade opened (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of covered put

    The maximum profit is $S_T - K + P^{K}_0$. It occurs when the underlying price is at or below the strike price of the put at expiration.

    If the underlying price increase, the maximum loss is unlimited.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Put 1.37 185.00
    Underlying Equity at start of the trade 186.94 -
    Underlying Equity at expiration 190.01 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} P^{K}_T & = & (K - S_T)^{+}\\ & = & (185 - 190.01)^{+}\\ & = & 0\\ P_T & = & (S_0 - S_T + P^{K}_0 - P^{K}_T)\times m - fee\\ & = & (186.94 - 190.01 + 1.37 - 0)\times m - fee\\ & = & -1.70 \times 100 - 2\\ & = & -172 \end{array} $$

    So, the strategy loses $172.

    The following algorithm implements a covered put strategy:

     

    Option Strategies

    Iron Butterfly

    Introduction

    Warning: There is currently no OptionStrategies method for Iron Butterfly orders, so this tutorial manually orders the individual legs in the strategy. If you manually place multi-leg orders one at a time while there is no liquidity at a strike price, you can get stuck in an unhedged position.

    The Iron Butterfly is an option strategy which involves four Option contracts. All the contracts have the same underlying stock and expiration, but the order of strike prices for the four contracts is $A>B>C$. The following table describes the strike price of each contract:

    Position Strike
    1 OTM call $A$
    1 ATM call $B$
    1 ATM put $B$
    1 OTM put $C=B-(A-B)$

    The iron butterfly can be long or short.

    Long Iron Butterfly

    The long iron butterfly consists of selling an OTM call, selling an OTM put, buying an ATM call, and buying an ATM put. This strategy profits from a decrease in price movement (implied volatility).

    Short Call Butterfly

    The short call butterfly consists of buying an OTM call, buying an OTM put, selling an ATM call, and selling an ATM put. This strategy profits from an increase in price movement (implied volatility) and from time decay value since ATM options decay sharper.

    Implementation

    Follow these steps to implement the short iron butterfly strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 5, 10);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(-10, 10, 0, 30);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 5, 10)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(-10, 10, 0, 30);
    3. In the OnData on_data method, select the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select expiry
          var expiry = chain.Max(x => x.Expiry);
      
          // Separate the call and put contracts
          var calls = chain.Where(x => x.Right == OptionRight.Call  && x.Expiry == expiry);
          var puts = chain.Where(x => x.Right == OptionRight.Put && x.Expiry == expiry);
          if (calls.Count() == 0 || puts.Count() == 0) return;
      
          // Get the ATM and OTM strike prices
          var atmStrike = calls.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First().Strike;
          var otmCallStrike = calls.Max(x => x.Strike);
          var otmPutStrike = puts.Min(x => x.Strike);
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Select expiry
          expiry = max([x.expiry for x in chain])
      
          # Separate the call and put contracts
          calls = [i for i in chain if i.right == OptionRight.CALL and i.expiry == expiry]
          puts = [i for i in chain if i.right == OptionRight.PUT and i.expiry == expiry]
          if not calls or not puts:
              return
      
          # Get the ATM and OTM strike prices
          atm_strike = sorted(calls, key = lambda x: abs(chain.underlying.price - x.strike))[0].strike
          otm_call_strike = max([x.strike for x in calls])
          otm_put_strike = min([x.strike for x in puts])
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.IronButterfly OptionStrategies.iron_butterfly method with the details of each leg and then pass the result to the Buy buy method.

      var ironButterfly = OptionStrategies.IronButterfly(_symbol, otmPutStrike, atmStrike, otmCallStrike, expiry);
      Buy(ironButterfly, 2);
      iron_butterfly = OptionStrategies.iron_butterfly(self._symbol, otm_put_strike, atm_strike, otm_call_strike, expiry)
      self.buy(iron_butterfly, 2)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      // Select the contracts
      var atmCall = calls.Single(x => x.Strike == atmStrike);
      var atmPut = puts.Single(x => x.Strike == atmStrike);
      var otmCall = calls.Single(x => x.Strike == otmCallStrike);
      var otmPut = puts.Single(x => x.Strike == otmPutStrike);
      
      var legs = new List<Leg>()
          {
              Leg.Create(atmCall.Symbol, 1),
              Leg.Create(atmPut.Symbol, 1),
              Leg.Create(otmCall.Symbol, -1),
              Leg.Create(otmPut.Symbol, -1)
          };
      ComboMarketOrder(legs, 1);
      # Select the contracts
      atm_call = [x for x in calls if x.strike == atm_strike][0]
      atm_put = [x for x in puts if x.strike == atm_strike][0]
      otm_call = [x for x in calls if x.strike == otm_call_strike][0]
      otm_put = [x for x in puts if x.strike == otm_put_strike][0]
      
      legs = [
          Leg.create(atm_call.symbol, 1),
          Leg.create(atm_put.symbol, 1),
          Leg.create(otm_call.symbol, -1),
          Leg.create(otm_put.symbol, -1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The iron butterfly can be long or short.

    Long Iron Butterfly

    The long iron butterfly is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^C_{OTM})^{+}\\ C^{ATM}_T & = & (S_T - K^C_{ATM})^{+}\\ P^{OTM}_T & = & (K^P_{OTM} - S_T)^{+}\\ P^{ATM}_T & = & (K^P_{ATM} - S_T)^{+}\\ P_T & = & (C^{ATM}_T + P^{ATM}_T - C^{OTM}_T - P^{OTM}_T - C^{ATM}_0 - P^{ATM}_0 + C^{OTM}_0 + P^{OTM}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{OTM}_T & = & \textrm{OTM call value at time T}\\ & C^{ATM}_T & = & \textrm{ATM call value at time T}\\ & P^{OTM}_T & = & \textrm{OTM put value at time T}\\ & P^{ATM}_T & = & \textrm{ATM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^C_{OTM} & = & \textrm{OTM call strike price}\\ & K^C_{ATM} & = & \textrm{ATM call strike price}\\ & K^P_{OTM} & = & \textrm{OTM put strike price}\\ & K^P_{ATM} & = & \textrm{ATM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{OTM}_0 & = & \textrm{OTM call value at position opening (credit received)}\\ & C^{ATM}_0 & = & \textrm{ATM call value at position opening (debit paid)}\\ & P^{OTM}_0 & = & \textrm{OTM put value at position opening (credit received)}\\ & P^{ATM}_0 & = & \textrm{ATM put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of long iron butterfly

    The maximum profit is $K^C_{OTM} - K^C_{ATM} - C^{ATM}_0 - P^{ATM}_0 + C^{OTM}_0 + P^{OTM}_0$. It occurs when the underlying price is below the OTM put strike price or above the OTM call strike price at expiration.

    The maximum loss is the net debit paid, $C^{OTM}_0 + P^{OTM}_0 - C^{ATM}_0 - P^{ATM}_0$. It occurs when the underlying price stays the same as when you opened the trade.

    If the Option is American Option, there is a risk of early assignment on the sold contracts.

    Short Call Butterfly

    The short call butterfly is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^C_{OTM})^{+}\\ C^{ATM}_T & = & (S_T - K^C_{ATM})^{+}\\ P^{OTM}_T & = & (K^P_{OTM} - S_T)^{+}\\ P^{ATM}_T & = & (K^P_{ATM} - S_T)^{+}\\ P_T & = & (C^{OTM}_T + P^{OTM}_T - C^{ATM}_T - P^{ATM}_T - C^{OTM}_0 - P^{OTM}_0 + C^{ATM}_0 + P^{ATM}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{OTM}_T & = & \textrm{OTM call value at time T}\\ & C^{ATM}_T & = & \textrm{ATM call value at time T}\\ & P^{OTM}_T & = & \textrm{OTM put value at time T}\\ & P^{ATM}_T & = & \textrm{ATM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^C_{OTM} & = & \textrm{OTM call strike price}\\ & K^C_{ATM} & = & \textrm{ATM call strike price}\\ & K^P_{OTM} & = & \textrm{OTM put strike price}\\ & K^P_{ATM} & = & \textrm{ATM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{OTM}_0 & = & \textrm{OTM call value at position opening (debit paid)}\\ & C^{ATM}_0 & = & \textrm{ATM call value at position opening (credit received)}\\ & P^{OTM}_0 & = & \textrm{OTM put value at position opening (debit paid)}\\ & P^{ATM}_0 & = & \textrm{ATM put value at position opening (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of short iron butterfly

    The maximum profit is the net credit received, $C^{ATM}_0 + P^{ATM}_0 - C^{OTM}_0 - P^{OTM}_0$. It occurs when the underlying price stays the same as when you opened the trade.

    The maximum loss is $K^C_{OTM} - K^C_{ATM} - C^{ATM}_0 - P^{ATM}_0 + C^{OTM}_0 + P^{OTM}_0$. It occurs when the underlying price is below the OTM put strike price or above the OTM call strike price at expiration.

    If the Option is American Option, there is a risk of early assignment on the sold contracts.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    OTM call 1.85 857.50
    OTM put 2.75 810.00
    ATM call 8.10 832.00
    ATM put 7.40 832.00
    Underlying Equity at expiration 851.20 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^C_{OTM})^{+}\\ & = & (851.20-857.50)^{+}\\ & = & 0\\ C^{ATM}_T & = & (S_T - K^C_{ATM})^{+}\\ & = & (851.20-832.00)^{+}\\ & = & 19.20\\ P^{OTM}_T & = & (K^P_{OTM} - S_T)^{+}\\ & = & (832.00-851.20)^{+}\\ & = & 0\\ P^{ATM}_T & = & (K^P_{ATM} - S_T)^{+}\\ & = & (810.00-851.20)^{+}\\ & = & 0\\ P_T & = & (C^{OTM}_T + P^{OTM}_T - C^{ATM}_T - P^{ATM}_T - C^{OTM}_0 - P^{OTM}_0 + C^{ATM}_0 + P^{ATM}_0)\times m - fee\\ & = & (0+0-19.20-0+8.10+7.40-1.85-2.75)\times100-1\times4\\ & = & -834 \end{array} $$

    So, the strategy losses $834.

    The following algorithm implements a short iron butterfly Option strategy:

     

    Option Strategies

    Iron Condor

    Introduction

    The Iron Condor is an Option strategy that consists of four contracts. All the contracts have the same underlying Equity and expiration, but the order of strike prices is $A>B>C>D$. The following table describes the strike prices of each contract:

    Position Strike
    1 far-OTM call $A$
    1 near-OTM call $B, where B > underlying\ price$
    1 near-OTM put $C, where C < underlying\ price$
    1 far-OTM put $D, where C-D = A-B$

    The iron condor can be long or short.

    Long Iron Condor

    The long iron condor consists of selling a far OTM call, selling a far OTM put, buying a near OTM call, and buying a near OTM put. This strategy profits from a increase in price movement (implied volatility).

    Short Iron Condor

    The short iron condor consists of buying a far OTM call, buying a far OTM put, selling a near ATM call, and selling a near ATM put. This strategy profits from an decrease in price movement (implied volatility) and time decay since ATM options decay sharper.

    Implementation

    Follow these steps to implement the long iron condor strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 2, 1);
          SetEndDate(2017, 3, 1);
          SetCash(500000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG");
          _symbol = option.Symbol;
          option.SetFilter(universe => universe.IncludeWeeklys().Strikes(-15, 15).Expiration(0, 40));
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 2, 1)
          self.set_end_date(2017, 3, 1)
          self.set_cash(500000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG")
          self._symbol = option.symbol
          option.set_filter(lambda universe: universe.include_weeklys().strikes(-15, 15).expiration(0, 40))
    3. In the OnData on_data method, select the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio[_symbol.Underlying].Invested)
          {
              Liquidate();
          }
      
          if (Portfolio.Invested || !IsMarketOpen(_symbol) ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Find put and call contracts with the farthest expiry
          var expiry = chain.Max(x => x.Expiry);
          var contracts = chain.Where(x => x.Expiry == expiry).OrderBy(x => x.Strike);
      
          var putContracts = contracts.Where(x => x.Right == OptionRight.Put).ToArray();
          var callContracts = contracts.Where(x => x.Right == OptionRight.Call).ToArray();
      
          if (putContracts.Length < 10 || putContracts.Length < 10) return;
      
          // Select the strategy legs
          var farPut = putContracts[0];
          var nearPut = putContracts[10];
          var nearCall = callContracts[^10];
          var farCall = callContracts[^1];
      def on_data(self, slice: Slice) -> None:
          if self.portfolio[self._symbol.underlying].invested:
              self.liquidate()
      
          if self.portfolio.invested or not self.is_market_open(self._symbol):
              return
      
          chain = slice.option_chains.get(self._symbol)
          if not chain:
              return
      
          # Find put and call contracts with the farthest expiry       
          expiry = max([x.expiry for x in chain])
          chain = sorted([x for x in chain if x.expiry == expiry], key = lambda x: x.strike)
      
          put_contracts = [x for x in chain if x.right == OptionRight.PUT]
          call_contracts = [x for x in chain if x.right == OptionRight.CALL]
      
          if len(call_contracts) < 10 or len(put_contracts) < 10:
              return
      
          # Select the strategy legs
          far_put = put_contracts[0]
          near_put = put_contracts[10]
          near_call = call_contracts[-10]
          far_call = call_contracts[-1]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.IronCondor OptionStrategies.iron_condor method with the details of each leg and then pass the result to the Buy buy method.

      var ironCondor = OptionStrategies.IronCondor(
          _symbol, 
          farPut.Strike,
          nearPut.Strike,
          nearCall.Strike,
          nearCall.Strike,
          expiry);
      
      Buy(ironCondor, 2);
      iron_condor = OptionStrategies.iron_condor(
          self._symbol, 
          far_put.strike,
          near_put.strike,
          near_call.strike,
          far_call.strike,
          expiry)
      
      self.buy(iron_condor, 2)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(farPut.Symbol, -1),
              Leg.Create(nearPut.Symbol, 1),
              Leg.Create(farCall.Symbol, -1),
              Leg.Create(nearCall.Symbol, 1)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(far_put.symbol, -1),
          Leg.create(near_put.symbol, 1),
          Leg.create(far_call.symbol, -1),
          Leg.create(near_call.symbol, 1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The iron condor can be long or short.

    Long Iron Condor

    This is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} C^{far}_T & = & (S_T - K^C_{far})^{+}\\ C^{near}_T & = & (S_T - K^C_{near})^{+}\\ P^{far}_T & = & (K^P_{far} - S_T)^{+}\\ P^{near}_T & = & (K^P_{near} - S_T)^{+}\\ P_T & = & (C^{near}_T + P^{near}_T - C^{far}_T - P^{far}_T - C^{near}_0 - P^{near}_0 + C^{far}_0 + P^{far}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{far}_T & = & \textrm{Far OTM call value at time T}\\ & C^{near}_T & = & \textrm{Near OTM call value at time T}\\ & P^{far}_T & = & \textrm{Far OTM put value at time T}\\ & P^{near}_T & = & \textrm{Near ATM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^C_{far} & = & \textrm{Far OTM call strike price}\\ & K^C_{near} & = & \textrm{Near OTM call strike price}\\ & K^P_{far} & = & \textrm{Far OTM put strike price}\\ & K^P_{near} & = & \textrm{Near OTM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{far}_0 & = & \textrm{Far OTM call value at position opening (credit received)}\\ & C^{near}_0 & = & \textrm{Near OTM call value at position opening (debit paid)}\\ & P^{far}_0 & = & \textrm{Far OTM put value at position opening (credit received)}\\ & P^{near}_0 & = & \textrm{Near OTM put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of long iron condor

    The maximum profit is $K^C_{far} - K^C_{near} - C^{near}_0 - P^{near}_0 + C^{far}_0 + P^{far}_0$, where $K^P_{OTM} > S_T$ or $S_T > K^C_{OTM}$.

    The maximum loss is the net debit paid: $C^{far}_0 + P^{far}_0 - C^{near}_0 - P^{near}_0$, where $K^P_{OTM} < S_T < K^C_{OTM}$.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Short Iron Condor

    This is a limited-reward-limited-risk strategy. The payoff is

    $$ \begin{array}{rcll} C^{far}_T & = & (S_T - K^C_{far})^{+}\\ C^{near}_T & = & (S_T - K^C_{near})^{+}\\ P^{far}_T & = & (K^P_{far} - S_T)^{+}\\ P^{near}_T & = & (K^P_{near} - S_T)^{+}\\ P_T & = & (C^{far}_T + P^{far}_T - C^{near}_T - P^{near}_T - C^{far}_0 - P^{far}_0 + C^{near}_0 + P^{near}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{far}_T & = & \textrm{Far OTM call value at time T}\\ & C^{near}_T & = & \textrm{Near OTM call value at time T}\\ & P^{far}_T & = & \textrm{Far OTM put value at time T}\\ & P^{near}_T & = & \textrm{Near ATM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^C_{far} & = & \textrm{Far OTM call strike price}\\ & K^C_{near} & = & \textrm{Near OTM call strike price}\\ & K^P_{far} & = & \textrm{Far OTM put strike price}\\ & K^P_{near} & = & \textrm{Near OTM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{far}_0 & = & \textrm{Far OTM call value at position opening (credit received)}\\ & C^{near}_0 & = & \textrm{Near OTM call value at position opening (debit paid)}\\ & P^{far}_0 & = & \textrm{Far OTM put value at position opening (credit received)}\\ & P^{near}_0 & = & \textrm{Near OTM put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of short iron condor

    The maximum profit is the net credit received after commission when opening the trade, where $K^P_{OTM} < S_T < K^C_{OTM}$.

    The maximum loss is $K^C_{far} - K^C_{near} + C^{near}_0 + P^{near}_0 - C^{far}_0 - P^{far}_0$, where $K^P_{OTM} > S_T$ or $S_T > K^C_{OTM}$.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Far-OTM call 1.85 857.50
    Far-OTM put 2.75 810.00
    Near-OTM call 1.35 855.00
    Near-OTM put 2.15 815.00
    Underlying Equity at expiration 851.20 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{far}_T & = & (S_T - K^C_{far})^{+}\\ & = & (851.20-857.50)^{+}\\ & = & 0\\ C^{near}_T & = & (S_T - K^C_{near})^{+}\\ & = & (851.20-855.00)^{+}\\ & = & 0\\ P^{far}_T & = & (K^P_{far} - S_T)^{+}\\ & = & (815.00-851.20)^{+}\\ & = & 0\\ P^{near}_T & = & (K^P_{near} - S_T)^{+}\\ & = & (810.00-851.20)^{+}\\ & = & 0\\ P_T & = & (C^{near}_T + P^{near}_T - C^{far}_T - P^{far}_T - C^{near}_0 - P^{near}_0 + C^{far}_0 + P^{far}_0)\times m - fee\\ & = & (0+0-0-0+1.35+2.15-1.85-2.75)\times100-1\times4\\ & = & -114 \end{array} $$

    So, the strategy loses $114.

    The following algorithm implements a long iron condor Option strategy:

    Demonstration Algorithm
    IndexOptionIronCondorAlgorithm.py Python IndexOptionIronCondorAlgorithm.cs C#

     

    Option Strategies

    Naked Call

    Introduction

    A Naked Call , also known as an uncovered call , consists of selling call Options without owning the underlying asset. It's called "naked" because you don't have any cover or protection in the form of owning the underlying asset, which exposes you to potentially unlimited risk. Naked calls aim to profit from the Option premium by selling calls. At any time for American Options or at expiration for European Options, if the stock moves below the strike price, you keep the premium. If the underlying price moves above the strike, the Option buyer can exercise the Options contract , which means you need buy the underlying at market price to fulfill your obligation to sell it at the strike price and keep the premium.

    Implementation

    Follow these steps to implement the naked call strategy:

    1. In the Initialize initialize method, set the start date, end date, starting cash, and Options universe .
    2. private Symbol _call, _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2014, 1, 1);
          SetEndDate(2014, 3, 1);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("IBM");
          _symbol = option.Symbol;
          option.SetFilter(-3, 3, 0, 31);
      }
      def initialize(self) -> None:
          self.set_start_date(2014, 1, 1)
          self.set_end_date(2014, 3, 1)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("IBM")
          self._symbol = option.symbol
          option.set_filter(-3, 3, 0, 31)
    3. In the OnData on_data method, select the Option contract.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain)) return;
      
          // Find ATM call with the farthest expiry
          var expiry = chain.Max(x => x.Expiry);
          var atmCall = chain
              .Where(x => x.Right == OptionRight.Call && x.Expiry == expiry)
              .OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price))
              .FirstOrDefault();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chains.get(self._symbol)
          if not chain:
              return
      
          # Find ATM call with the farthest expiry
          expiry = max([x.expiry for x in chain])
          call_contracts = sorted([x for x in chain
              if x.right == OptionRight.CALL and x.expiry == expiry],
              key=lambda x: abs(chain.underlying.price - x.strike))
      
          if not call_contracts:
              return
      
          atm_call = call_contracts[0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.NakedCall OptionStrategies.naked_call method with the details of each leg and then pass the result to the Buy buy method.

      var nakedCall = OptionStrategies.NakedCall(_symbol, atmCall.Strike, expiry);
      Buy(nakedCall, 1);
      naked_call = OptionStrategies.naked_call(self._symbol, atm_call.strike, expiry)
      self.buy(naked_call, 1)

      Approach B: Call the Market Order market_order or Limit Order limit_order method.

      MarketOrder(atmCall.Symbol, -1);
      self.market_order(atm_call.symbol, -1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} C^{K}_T & = & (S_T - K)^{+}\\ P_T & = & (C^{K}_0 - C^{K}_T)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{K}_T & = & \textrm{Call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Call strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{K}_0 & = & \textrm{Call price when the trade opened (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of naked call

    The maximum profit is $C^{K}_0$, which occurs when the underlying price is at or below the strike price of the call at expiration.

    The maximum loss is unlimited because there is no limit to how high the underlying asset's price can rise.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Call 3.35 185.00
    Underlying Equity at expiration 190.01 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{K}_T & = & (S_T - K)^{+}\\ & = & (190.01 - 185)^{+}\\ & = & 5.01\\ P_T & = & (C^{K}_0 - C^{K}_T)\times m - fee\\ & = & (3.35 - 5.01)\times m - fee\\ & = & -1.66 \times 100 - 2\\ & = & -167 \end{array} $$

    So, the strategy loses $167.

    The following algorithm implements a naked call strategy:

     

    Option Strategies

    Naked Put

    Introduction

    A Naked Put , also known as an uncovered put , consists of selling put Options without having a corresponding short position in the underlying security. It's called "naked" because you don't have any cover or protection in the form of a short position in the underlying asset, which exposes you to potentially unlimited risk. Naked puts aim to profit from the Option premium by selling puts. At any time for American Options or at expiration for European Options, if the stock moves above the strike price, you keep the premium. If the underlying price moves below the strike, the Option buyer can exercise the Options contract , which means you need sell the underlying at market price to fulfill your obligation to buy it at the strike price and keep the premium.

    Implementation

    Follow these steps to implement the naked put strategy:

    1. In the Initialize initialize method, set the start date, end date, starting cash, and Options universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2014, 1, 1);
          SetEndDate(2014, 3, 1);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("IBM");
          _symbol = option.Symbol;
          option.SetFilter(-3, 3, 0, 31);
      }
      def initialize(self) -> None:
          self.set_start_date(2014, 1, 1)
          self.set_end_date(2014, 3, 1)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("IBM")
          self._symbol = option.symbol
          option.set_filter(-3, 3, 0, 31)
    3. In the OnData on_data method, select the Option contract.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain)) return;
      
          // Find ATM put with the farthest expiry
          var expiry = chain.Max(x => x.Expiry);
          var atmPut = chain
              .Where(x => x.Right == OptionRight.Put && x.Expiry == expiry)
              .OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price))
              .FirstOrDefault();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chains.get(self._symbol)
          if not chain:
              return
      
          # Find ATM put with the farthest expiry
          expiry = max([x.expiry for x in chain])
          put_contracts = sorted([x for x in chain
              if x.right == OptionRight.PUT and x.expiry == expiry],
              key=lambda x: abs(chain.underlying.price - x.strike))
      
          if not put_contracts:
              return
      
          atm_put = put_contracts[0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.NakedPut OptionStrategies.naked_put method with the details of each leg and then pass the result to the Buy buy method.

      var nakedPut = OptionStrategies.NakedPut(_symbol, atmPut.Strike, expiry);
      Buy(nakedPut, 1);
      naked_put = OptionStrategies.naked_put(self._symbol, atm_put.strike, expiry)
      self.buy(naked_put, 1)

      Approach B: Call the Market Order market_order or Limit Order limit_order method.

      MarketOrder(atmPut.Symbol, -1);
      self.market_order(atm_put.symbol, -1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} P^{K}_T & = & (K - S_T)^{+}\\ P_T & = & (P^{K}_0 - P^{K}_T)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & P^{K}_T & = & \textrm{Put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & P^{K}_0 & = & \textrm{Put price when the trade opened (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of naked put

    The maximum profit is $P^{K}_0$, which occurs when the underlying price is at or above the strike price of the put at expiration.

    The maximum loss is $K - P^{K}_0$, which ocurrs when the underlying price drops to zero.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Put 1.37 185.00
    Underlying Equity at expiration 190.01 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} P^{K}_T & = & (K - S_T)^{+}\\ & = & (185 - 190.01)^{+}\\ & = & 0.0\\ P_T & = & (P^{K}_0 - P^{K}_T)\times m - fee\\ & = & (1.37 - 0.0)\times m - fee\\ & = & 1.37 \times 100 - 1\\ & = & 136 \end{array} $$

    So, the strategy gains $136.

    The following algorithm implements a naked put strategy:

     

    Option Strategies

    Protective Call

    Introduction

    A Protective Call consists of a short position in a stock and a long position in a call Option for the same amount of stock. Protective calls aim to hedge the short position of a stock with a long ATM or slightly OTM call Option. At any time for American Options or at expiration for European Options, if the stock moves below the strike price, the Option contract becomes worthless but the short position acquires an unrealized gain. If the underlying price moves above the strike, you can exercise the Options contract and receive the underlying Equity, which closes your short position.

    Implementation

    Follow these steps to implement the protective call strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Options universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2014, 1, 1);
          SetEndDate(2014, 3, 1);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("IBM");
          _symbol = option.Symbol;
          option.SetFilter(-3, 3, 0, 31);
      }
      def initialize(self) -> None:
          self.set_start_date(2014, 1, 1)
          self.set_end_date(2014, 3, 1)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("IBM")
          self._symbol = option.symbol
          option.set_filter(-3, 3, 0, 31)
    3. In the OnData on_data method, select the Option contract.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain)) return;
      
          // Find ATM call with the farthest expiry
          var expiry = chain.Max(x => x.Expiry);
          var atmCall = chain
              .Where(x => x.Right == OptionRight.Call && x.Expiry == expiry)
              .OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price))
              .FirstOrDefault();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chains.get(self._symbol)
          if not chain:
              return
      
          # Find ATM call with the farthest expiry
          expiry = max([x.expiry for x in chain])
          call_contracts = sorted([x for x in chain
              if x.right == OptionRight.CALL and x.expiry == expiry],
              key=lambda x: abs(chain.underlying.price - x.strike))
      
          if not call_contracts:
              return
      
          atm_call = call_contracts[0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.ProtectiveCall OptionStrategies.protective_call method with the details of each leg and then pass the result to the Buy buy method.

      var protectiveCall = OptionStrategies.ProtectiveCall(_symbol, atmCall.Strike, expiry);
      Buy(protectiveCall, 1);
      protective_call = OptionStrategies.protective_call(self._symbol, atm_call.strike, expiry)
      self.buy(protective_call, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(atmCall.Symbol, 1),
              Leg.Create(chain.Underlying.Symbol, -chain.Underlying.SymbolProperties.ContractMultiplier)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(atm_call.symbol, 1),
          Leg.create(chain.underlying.symbol, -chain.underlying.symbol_properties.contract_multiplier)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} C^{K}_T & = & (S_T - K)^{+}\\ P_T & = & (S_0 - S_T + C^{K}_T - C^{K}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{K}_T & = & \textrm{Call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Call strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & S_0 & = & \textrm{Underlying asset price when the trade opened}\\ & C^{K}_0 & = & \textrm{Call price when the trade opened (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of protective call

    The maximum profit is $S_0 - C^{K}_0$, which occurs when the underlying price is $0$.

    The maximum loss is $S_0 - K - C^{K}_0$, which occurs when the underlying price is above the strike price.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Call 3.50 185.00
    Underlying Equity at start of the trade 186.94 -
    Underlying Equity at expiration 190.01 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{K}_T & = & (S_T - K)^{+}\\ & = & (190.01 - 185)^{+}\\ & = & 5.01\\ P_T & = & (S_0 - S_T + C^{K}_T - C^{K}_0)\times m - fee\\ & = & (186.94 - 190.01 + 5.01 - 3.50)\times m - fee\\ & = & -1.56 \times 100 - 2\\ & = & -158 \end{array} $$

    So, the strategy loses $158.

    The following algorithm implements a protective call Option strategy:

     

    Option Strategies

    Protective Put

    Introduction

    A Protective Put consists of buying a long position in a stock and a long position in put Options for the same amount of stock. Protective puts aim to hedge the long position of a stock with a long ATM or slightly OTM put Option. At any time for American Options or at expiration for European Options, if the stock moves above the strike price, the Option contract becomes worthless but the long stock position acquires an unrealized gain. If the underlying price moves below the strike, you can exercise the Options contract , which sells your underlying position at the put Option strike price.

    Implementation

    Follow these steps to implement the protective put strategy:

    1. In the Initialize initialize method, set the start date, end date, starting cash, and Options universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2014, 1, 1);
          SetEndDate(2014, 3, 1);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("IBM");
          _symbol = option.Symbol;
          option.SetFilter(-3, 3, 0, 31);
      }
      def initialize(self) -> None:
          self.set_start_date(2014, 1, 1)
          self.set_end_date(2014, 3, 1)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("IBM")
          self._symbol = option.symbol
          option.set_filter(-3, 3, 0, 31)
    3. In the OnData on_data method, select the Option contract.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Find ATM put with the farthest expiry
          var expiry = chain.Max(x => x.Expiry);
          var atmPut = chain
              .Where(x => x.Right == OptionRight.Put && x.Expiry == expiry)
              .OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price))
              .FirstOrDefault();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chains.get(self._symbol)
          if not chain:
              return
      
          # Find ATM put with the farthest expiry
          expiry = max([x.expiry for x in chain])
          put_contracts = sorted([x for x in chain
              if x.right == OptionRight.PUT and x.expiry == expiry],
              key=lambda x: abs(chain.underlying.price - x.strike))
      
          if not put_contracts:
              return
      
          atm_put = put_contracts[0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.ProtectivePut OptionStrategies.protective_put method with the details of each leg and then pass the result to the Buy buy method.

      var protectivePut = OptionStrategies.ProtectivePut(_symbol, atmPut.Strike, expiry);
      Buy(protectivePut, 1);
      protective_put = OptionStrategies.protective_put(self._symbol, atm_put.strike, expiry)
      self.buy(protective_put, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(atmPut.Symbol, 1),
              Leg.Create(chain.Underlying.Symbol, chain.Underlying.SymbolProperties.ContractMultiplier)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(atm_put.symbol, 1),
          Leg.create(chain.underlying.symbol, chain.underlying.symbol_properties.contract_multiplier)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} P^{K}_T & = & (K - S_T)^{+}\\ P_T & = & (S_T - S_0 + P^{K}_T - P^{K}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & P^{K}_T & = & \textrm{Put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & S_0 & = & \textrm{Underlying asset price when the trade opened}\\ & P^{K}_0 & = & \textrm{Put price when the trade opened (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of protective put

    The maximum profit is $S_T - S_0 - P^{K}_0$, which occurs when the underlying price is above the $S_0 + P^{K}_0$.

    The maximum loss is $P^{K}_0$, which occurs when the underlying price drops.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Put 1.53 185.00
    Underlying Equity at start of the trade 187.07 -
    Underlying Equity at expiration 190.01 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} P^{K}_T & = & (K - S_T)^{+}\\ & = & (185 - 190.1)^{+}\\ & = & 0\\ P_T & = & (S_T - S_0 + P^{K}_T - P^{K}_0)\times m - fee\\ & = & (190.01 - 187.07 + 0 - 1.53)\times m - fee\\ & = & 1.41 \times 100 - 2\\ & = & 139 \end{array} $$

    So, the strategy gains $139.

    The following algorithm implements a protective put Option strategy:

     

    Option Strategies

    Protective Collar

    Introduction

    A Protective Collar is an Options strategy that consists of a covered call and a long put ( protective put ) with a lower strike price than the short call contract. In contrast to the covered call, the protective put component limits the drawdown of the strategy when the underlying price decreases too much.

    Implementation

    Follow these steps to implement the protective collar strategy:

    1. In the Initialize initialize method, set the start date, set the end date, subscribe to the underlying Equity , and create an Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 4, 30);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(-10, 10, 0, 30);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 4, 30)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(-10, 10, 0, 30)
    3. In the OnData on_data method, select the Option contracts.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested) return;
      
          // Get the OptionChain
          if (!slice.OptionChains.TryGetValue(_symbol, out var chain)) return;
      
          // Select an expiry date
          var expiry = chain.Max(x => x.Expiry);
      
          // Select the call and put contracts that expire on the selected date
          var calls = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Call);
          var puts = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Put);
          if (calls.Count() == 0 || puts.Count() == 0) return;
      
          // Select the OTM contracts
          var call = calls.OrderBy(x => x.Strike).Last();
          var put = puts.OrderBy(x => x.Strike).First();
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Select an expiry date
          expiry = max([x.expiry for x in chain])
      
          # Select the call and put contracts that expire on the selected date
          calls = [x for x in chain if x.right == OptionRight.CALL and x.expiry == expiry]
          puts = [x for x in chain if x.right == OptionRight.PUT and x.expiry == expiry]
          if not calls or not puts:
              return
      
          # Select the OTM contracts
          call = sorted(calls, key = lambda x: x.strike)[-1]
          put = sorted(puts, key = lambda x: x.strike)[0]
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.ProtectiveCollar OptionStrategies.protective_collar method with the details of each leg and then pass the result to the Buy buy method.

      var protectiveCollar = OptionStrategies.ProtectiveCollar(_symbol, call.Strike, put.Strike, expiry);
      Buy(protectiveCollar, 1);
      protective_collar = OptionStrategies.protective_collar(self._symbol, call.strike, put.strike, expiry)
      self.buy(protective_collar, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(call.Symbol, -1),
              Leg.Create(put.Symbol, 1),
              Leg.Create(chain.Underlying.Symbol, chain.Underlying.SymbolProperties.ContractMultiplier)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(call.symbol, -1),
          Leg.create(put.symbol, 1),
          Leg.create(chain.underlying.symbol, chain.underlying.symbol_properties.contract_multiplier)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    This is a limited-profit-limited-loss strategy. The payoff is

    $$ \begin{array}{rcll} C_T & = & (S_T - K^{C})^{+}\\ P_T & = & (K^{P} - S_T)^{+}\\ Payoff_T & = & (S_T - S_0 - C_T + P_T + C_0 - P_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C_T & = & \textrm{Call value at time T}\\ & P_T & = & \textrm{Put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{C} & = & \textrm{Call strike price}\\ & K^{P} & = & \textrm{Put strike price}\\ & Payoff_T & = & \textrm{Payout total at time T}\\ & S_0 & = & \textrm{Underlying asset price when the trade opened}\\ & C_0 & = & \textrm{Call price when the trade opened (credit received)}\\ & P_0 & = & \textrm{Put price when the trade opened (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    protective collar strategy payoff

    The maximum profit is $K^{C} - S_T + C_0 - P_0$. It occurs when the underlying price is at or above the strike price of the call at expiration.

    The maximum profit is $S_T - K^{P} + C_0 - P_0$. It occurs when the underlying price is at or below the strike price of the put at expiration.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Call 2.85 845.00
    Put 6.00 822.50
    Underlying Equity at position opens 833.17 -
    Underlying Equity at expiration 843.25 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C_T & = & (S_T - K^{C})^{+}\\ & = & (843.365 - 845.00)^{+}\\ & = & 0\\ P_T & = & (K^{P} - S_T)^{+}\\ & = & (822.50 - 843.365)^{+}\\ & = & 0\\ Payoff_T & = & (S_T - S_0 - C_T + P_T + C_0 - P_0)\times m - fee\\ & = & (843.25 - 833.17 - 0 + 0 + 2.85 - 6.00)\times100-1.00\times3\\ & = & 690\\ \end{array} $$

    So, the strategy gains $690.

    The following algorithm implements a protective collar Option strategy:

     

    Option Strategies

    Long Straddle

    Introduction

    Long Straddle is an Options trading strategy that consists of buying an ATM call and an ATM put, where both contracts have the same underlying asset, strike price, and expiration date. This strategy aims to profit from volatile movements in the underlying stock, either positive or negative.

    Implementation

    Follow these steps to implement the long straddle strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 6, 30);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG");
          _symbol = option.Symbol;
          option.SetFilter(-1, 1, 30, 60);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 6, 30)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True 
          option = self.add_option("GOOG")
          self._symbol = option.symbol
          option.set_filter(-1, 1, 30, 60)
    3. In the OnData on_data method, select the expiration date and strike price of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested || 
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Find ATM options with the nearest expiry
          var expiry = chain.Min(contract => contract.Expiry);
          var strike = chain.OrderBy(contract => Math.Abs(contract.Strike - chain.Underlying.Price)).First().Strike;
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Find ATM options with the nearest expiry
          expiry = min([x.expiry for x in chain])
          strike = sorted(chain, key=lambda x: abs(x.strike - chain.underlying.price))[0].strike
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.Straddle OptionStrategies.straddle method with the details of each leg and then pass the result to the Buy buy method.

      var longStraddle = OptionStrategies.Straddle(_symbol, strike, expiry);
      Buy(longStraddle, 1);
      long_straddle = OptionStrategies.straddle(self._symbol, strike, expiry)
      self.buy(long_straddle, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var contracts = chain.Where(contract => contract.Expiry == expiry && contract.Strike == strike);
      if (contracts.Length < 2) return;
      
      var atmCall = contracts.Single(x => x.Right == OptionRight.Call);
      var atmPut = contracts.Single(x => x.Right == OptionRight.Put);
      
      var legs = new List<Leg>()
          {
              Leg.Create(atmCall.Symbol, 1),
              Leg.Create(atmPut.Symbol, 1)
          };
      ComboMarketOrder(legs, 1);
      contracts = [x for x in chain if x.expiry == expiry and x.strike == strike]
      if len(contracts) < 2:
          return
          
      atm_call = [x for x in contracts if x.right == OptionRight.CALL][0]
      atm_put = [x for x in contracts if x.right == OptionRight.PUT][0]
      
      legs = [
          Leg.create(atm_call.symbol, 1),
          Leg.create(atm_put.symbol, 1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} C^{ATM}_T & = & (S_T - K^{C})^{+}\\ P^{ATM}_T & = & (K^{P} - S_T)^{+}\\ P_T & = & (C^{ATM}_T + P^{ATM}_T - C^{ATM}_0 - P^{ATM}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{ATM}_T & = & \textrm{ATM call value at time T}\\ & P^{ATM}_T & = & \textrm{ATM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{C} & = & \textrm{ATM call strike price}\\ & K^{P} & = & \textrm{ATM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{ATM}_0 & = & \textrm{ATM call value at position opening (debit paid)}\\ & P^{ATM}_0 & = & \textrm{ATM put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of long straddle

    The maximum profit is unlimited if the underlying price rises to infinity or substantial, $K^{P} - C^{OTM}_0 - P^{OTM}_0$, if it drops to zero at expiration.

    The maximum loss is the net debit paid, $C^{ATM}_0 + P^{ATM}_0$. It occurs when the underlying price is the same at expiration as it was when you opened the trade. In this case, both Options expire worthless.

    Example

    The following table shows the price details of the assets in the algorithm at Option expiration (2017-05-20):

    Asset Price ($) Strike ($)
    Call 22.30 835.00
    Put 23.90 835.00
    Underlying Equity at expiration 934.01 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{ATM}_T & = & (S_T - K^{C})^{+}\\ & = & (934.01-835.00)^{+}\\ & = & 98.99\\ P^{ATM}_T & = & (K^{P} - S_T)^{+}\\ & = & (835.00-934.01)^{+}\\ & = & 0\\ P_T & = & (C^{ATM}_T + P^{ATM}_T - C^{ATM}_0 - P^{ATM}_0)\times m - fee\\ & = & (98.99+0-22.3-23.9)\times100-1.00\times2\\ & = & 5277 \end{array} $$

    So, the strategy gains $5,277.

    The following algorithm implements a long straddle strategy:

     

    Option Strategies

    Short Straddle

    Introduction

    A Short Straddle consists of selling a call and a put, where both contracts have the same underlying asset, strike price (normally at-the-money), and expiration date. If you enter a short straddle, you bet that the underlying asset will remain relatively stable and not experience significant price movements before the Option expires.

    Implementation

    Follow these steps to implement the short straddle strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 6, 30);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG");
          _symbol = option.Symbol;
          option.SetFilter(-1, 1, 30, 60);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 6, 30)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True   
          option = self.add_option("GOOG")
          self._symbol = option.symbol
          option.set_filter(-1, 1, 30, 60)
    3. In the OnData on_data method, select the expiration date and strike price of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested || 
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Find ATM options with the nearest expiry
          var expiry = chain.Min(contract => contract.Expiry);
          var strike = chain.OrderBy(contract => Math.Abs(contract.Strike - chain.Underlying.Price)).First().Strike;
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Find ATM options with the nearest expiry
          expiry = min([x.expiry for x in chain])
          strike = sorted(chain, key=lambda x: abs(x.strike - chain.underlying.price))[0].strike
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.ShortStraddle OptionStrategies.short_straddle method with the details of each leg and then pass the result to the Buy buy method.

      var shortStraddle = OptionStrategies.ShortStraddle(_symbol, contracts[0].Strike, expiry);
      Buy(shortStraddle, 1);
      short_straddle = OptionStrategies.short_straddle(self._symbol, contracts[0].strike, expiry)
      self.buy(short_straddle, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var contracts = chain.Where(contract => contract.Expiry == expiry && contract.Strike == strike);
      if (contracts.Length < 2) return;
      
      var atmCall = contracts.Single(x => x.Right == OptionRight.Call);
      var atmPut = contracts.Single(x => x.Right == OptionRight.Put);
      
      var legs = new List<Leg>()
          {
              Leg.Create(atmCall.Symbol, -1),
              Leg.Create(atmPut.Symbol, -1)
          };
      ComboMarketOrder(legs, 1);
      contracts = [x for x in chain if x.expiry == expiry and x.strike == strike]
      if len(contracts) < 2:
          return
      
      atm_call = [x for x in contracts if x.right == OptionRight.CALL][0]
      atm_put = [x for x in contracts if x.right == OptionRight.PUT][0]
      
      legs = [
          Leg.create(atm_call.symbol, -1),
          Leg.create(atm_put.symbol, -1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} C^{ATM}_T & = & (S_T - K^{C})^{+}\\ P^{ATM}_T & = & (K^{P} - S_T)^{+}\\ P_T & = & (-C^{ATM}_T - P^{ATM}_T + C^{ATM}_0 + P^{ATM}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{ATM}_T & = & \textrm{ATM call value at time T}\\ & P^{ATM}_T & = & \textrm{ATM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{C} & = & \textrm{ATM call strike price}\\ & K^{P} & = & \textrm{ATM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{ATM}_0 & = & \textrm{ATM call value at position opening (debit paid)}\\ & P^{ATM}_0 & = & \textrm{ATM put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of short straddle

    The maximum profit is $C^{ATM}_0 + P^{ATM}_0$. It occurs when the price of the underlying asset remains exactly at the strike price upon expiration.

    The maximum loss is unlimited if the underlying price rises to infinity or drops to zero at expiration.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Example

    The following table shows the price details of the assets in the algorithm at Option expiration (2017-05-20):

    Asset Price ($) Strike ($)
    Call 19.6 835.00
    Put 21.4 835.00
    Underlying Equity at early (2017-05-15) call assignment 932.22 -
    Underlying Equity at expiration 934.01 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{ATM}_T & = & (S_T - K^{C})^{+}\\ & = & (934.01-835.00)^{+}\\ & = & 99.01\\ P^{ATM}_T & = & (K^{P} - S_T)^{+}\\ & = & (835.00-934.01)^{+}\\ & = & 0\\ P_T & = & (-C^{ATM}_T - P^{ATM}_T + C^{ATM}_0 + P^{ATM}_0)\times m - fee\\ & = & (-99.01-0+19.6+21.4)\times 100 - 2.00\\ & = & -5803 \end{array} $$

    So, the strategy loses $5,277. The early assigment doesn't influence the payoff.

    The following algorithm implements a short straddle strategy:

     

    Option Strategies

    Long Strangle

    Introduction

    Long Strangle is an Options trading strategy that consists of simultaneously buying an OTM put and an OTM call, where both contracts have the same underlying asset and expiration date. This strategy aims to profit from volatile movements in the underlying stock, either positive or negative.

    Compared to a long straddle , the net debit of a long strangle is lower since OTM Options are cheaper. Additionally, the losing range of a long straddle is wider and the strike spread is wider.

    Implementation

    Follow these steps to implement the long strangle strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 4, 30);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG");
          _symbol = option.Symbol;
          option.SetFilter(-5, 5, 0, 30);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 4, 30)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG")
          self._symbol = option.symbol
          option.set_filter(-5, 5, 0, 30)
    3. In the OnData on_data method, select the contracts of the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          { 
              return;
          }
      
          // Find options with the farthest expiry
          var expiry = chain.Max(contract => contract.Expiry);
          var contracts = chain.Where(contract => contract.Expiry == expiry).ToList();
      
          // Order the OTM calls by strike to find the nearest to ATM
          var callContracts = contracts
              .Where(contract => contract.Right == OptionRight.Call &&
                  contract.Strike > chain.Underlying.Price)
              .OrderBy(contract => contract.Strike).ToArray();
          if (callContracts.Length == 0) return;
      
          // Order the OTM puts by strike to find the nearest to ATM
          var putContracts = contracts
              .Where(contract => contract.Right == OptionRight.Put &&
                  contract.Strike < chain.Underlying.Price)
              .OrderByDescending(contract => contract.Strike).ToArray();
          if (putContracts.Length == 0) return;
      
          var call = callContracts[0];
          var put = putContracts[0];
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chain.get(self._symbol)
          if not chain:
              return
      
          # Find options with the farthest expiry
          expiry = max([x.expiry for x in chain])
          contracts = [contract for contract in chain if contract.expiry == expiry]
           
          # Order the OTM calls by strike to find the nearest to ATM
          call_contracts = sorted([contract for contract in contracts
              if contract.right == OptionRight.CALL and
                  contract.strike > chain.underlying.price],
              key=lambda x: x.Strike)
          if not call_contracts:
              return
              
          # Order the OTM puts by strike to find the nearest to ATM
          put_contracts = sorted([contract for contract in contracts
              if contract.right == OptionRight.PUT and
                 contract.strike < chain.underlying.price],
              key=lambda x: x.Strike, reverse=True)
          if not put_contracts:
              return
      
          call = call_contracts[0]
          put = put_contracts[0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.Strangle OptionStrategies.strangle method with the details of each leg and then pass the result to the Buy buy method.

      var longStrangle = OptionStrategies.Strangle(_symbol, call.Strike, put.Strike, expiry);
      Buy(longStrangle, 1);
      long_strangle = OptionStrategies.strangle(self._symbol, call.strike, put.strike, expiry)
      self.buy(long_strangle, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(call.Symbol, 1),
              Leg.Create(put.Symbol, 1)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(call.symbol, 1),
          Leg.create(put.symbol, 1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{C})^{+}\\ P^{OTM}_T & = & (K^{P} - S_T)^{+}\\ P_T & = & (C^{OTM}_T + P^{OTM}_T - C^{OTM}_0 - P^{OTM}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{OTM}_T & = & \textrm{OTM call value at time T}\\ & P^{OTM}_T & = & \textrm{OTM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{C} & = & \textrm{OTM call strike price}\\ & K^{P} & = & \textrm{OTM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{OTM}_0 & = & \textrm{OTM call value at position opening (debit paid)}\\ & P^{OTM}_0 & = & \textrm{OTM put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    long strangle strategy payoff

    The maximum profit is unlimited if the underlying price rises to infinity at expiration.

    The maximum loss is the net debit paid, $C^{OTM}_0 + P^{OTM}_0$. It occurs when the underlying price at expiration is the same as when you opened the trade. In this case, both Options expire worthless.

    Example

    The following table shows the price details of the assets in the algorithm at Option expiration (04/22/2017):

    Asset Price ($) Strike ($)
    Call 8.80 835.00
    Put 9.50 832.50
    Underlying Equity at expiration 843.19 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{C})^{+}\\ & = & (843.19-835.00)^{+}\\ & = & 8.19\\ P^{OTM}_T & = & (K^{P} - S_T)^{+}\\ & = & (832.50-843.19)^{+}\\ & = & 0\\ P_T & = & (C^{OTM}_T + P^{OTM}_T - C^{OTM}_0 - P^{OTM}_0)\times m - fee\\ & = & (8.19+0-8.80-9.50)\times100-2.00\times2\\ & = & -1013 \end{array} $$

    So, the strategy loses $1,013.

    The following algorithm implements a long straddle strategy:

     

    Option Strategies

    Short Strangle

    Introduction

    Short Strangle is an Options trading strategy that consists of simultaneously selling an OTM put and an OTM call, where both contracts have the same underlying asset and expiration date. By doing so, the trader is essentially betting that the underlying asset will remain relatively stable and not experience significant price movements before the Options' expiration.

    Compared to a short straddle , the net debit of a short strangle is lower since OTM Options are cheaper. Additionally, the winning range of a short straddle is wider and the strike spread is wider.

    Implementation

    Follow these steps to implement the short strangle strategy:

    1. In the Initialize initialize method, set the start date, end date, cash, and Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 4, 30);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG");
          _symbol = option.Symbol;
          option.SetFilter(-5, 5, 0, 30);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 4, 30)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG")
          self._symbol = option.symbol
          option.set_filter(-5, 5, 0, 30)
    3. In the OnData on_data method, select the contracts of the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested ||
              !slice.OptionChains.TryGetValue(_symbol, out var chain))
          { 
              return;
          }
      
          // Find options with the farthest expiry
          var expiry = chain.Max(contract => contract.Expiry);
          var contracts = chain.Where(contract => contract.Expiry == expiry).ToList();
      
          // Order the OTM calls by strike to find the nearest to ATM
          var callContracts = contracts
              .Where(contract => contract.Right == OptionRight.Call &&
                  contract.Strike > chain.Underlying.Price)
              .OrderBy(contract => contract.Strike).ToArray();
          if (callContracts.Length == 0) return;
      
          // Order the OTM puts by strike to find the nearest to ATM
          var putContracts = contracts
              .Where(contract => contract.Right == OptionRight.Put &&
                  contract.Strike < chain.Underlying.Price)
              .OrderByDescending(contract => contract.Strike).ToArray();
          if (putContracts.Length == 0) return;
      
          var call = callContracts[0];
          var put = putContracts[0];
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          chain = slice.option_chains.get(self._symbol)
          if not chain:
              return
      
          # Find options with the farthest expiry
          expiry = max([x.expiry for x in chain])
          contracts = [contract for contract in chain if contract.expiry == expiry]
           
          # Order the OTM calls by strike to find the nearest to ATM
          call_contracts = sorted([contract for contract in contracts
              if contract.right == OptionRight.CALL and
                  contract.strike > chain.underlying.price],
              key=lambda x: x.strike)
          if not call_contracts:
              return
              
          # Order the OTM puts by strike to find the nearest to ATM
          put_contracts = sorted([contract for contract in contracts
              if contract.right == OptionRight.PUT and
                 contract.strike < chain.underlying.price],
              key=lambda x: x.strike, reverse=True)
          if not put_contracts:
              return
      
          call = call_contracts[0]
          put = put_contracts[0]
    5. In the OnData on_data method, place the orders.
    6. Approach A: Call the OptionStrategies.ShortStrangle OptionStrategies.short_strangle method with the details of each leg and then pass the result to the Buy buy method.

      var shortStrangle = OptionStrategies.ShortStrangle(_symbol, call.Strike, put.Strike, expiry);
      Buy(shortStrangle, 1);
      short_strangle = OptionStrategies.short_strangle(self._symbol, call.strike, put.strike, expiry)
      self.buy(short_strangle, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      var legs = new List<Leg>()
          {
              Leg.Create(call.Symbol, -1),
              Leg.Create(put.Symbol, -1)
          };
      ComboMarketOrder(legs, 1);
      legs = [
          Leg.create(call.symbol, -1),
          Leg.create(put.symbol, -1)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    The payoff of the strategy is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{C})^{+}\\ P^{OTM}_T & = & (K^{P} - S_T)^{+}\\ P_T & = & (-C^{OTM}_T - P^{OTM}_T + C^{OTM}_0 + P^{OTM}_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{OTM}_T & = & \textrm{OTM call value at time T}\\ & P^{OTM}_T & = & \textrm{OTM put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{C} & = & \textrm{OTM call strike price}\\ & K^{P} & = & \textrm{OTM put strike price}\\ & P_T & = & \textrm{Payout total at time T}\\ & C^{OTM}_0 & = & \textrm{OTM call value at position opening (debit paid)}\\ & P^{OTM}_0 & = & \textrm{OTM put value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    Strategy payoff decomposition and analysis of short strangle

    The maximum profit $C^{OTM}_0 + P^{OTM}_0$. It occurs when the underlying price at expiration remains within the range of the strike prices. In this case, both Options expire worthless.

    The maximum loss is unlimited if the underlying price rises to infinity or substantial, $C^{OTM}_0 + P^{OTM}_0 - K^{P}$, if it drops to zero at expiration.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Example

    The following table shows the price details of the assets in the algorithm at Option expiration (2017-04-22):

    Asset Price ($) Strike ($)
    Call 8.00 835.00
    Put 7.40 832.50
    Underlying Equity at expiration 843.19 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} C^{OTM}_T & = & (S_T - K^{C})^{+}\\ & = & (843.19-835.00)^{+}\\ & = & 8.19\\ P^{OTM}_T & = & (K^{P} - S_T)^{+}\\ & = & (832.50-843.19)^{+}\\ & = & 0\\ P_T & = & (-C^{OTM}_T - P^{OTM}_T + C^{OTM}_0 + P^{OTM}_0)\times m - fee\\ & = & (-8.19-0+8.00+7.40)\times100-2.00\times2\\ & = & 719 \end{array} $$

    So, the strategy gains $719.

    The following algorithm implements a short straddle strategy:

     

    Option Strategies

    Conversion

    Introduction

    A Conversion is a special case of a protective collar . It consist of holding one lot of the underlying security, shorting a call, and longing a put with lower strike price. However, the strategy now serves as an delta-neutral arbitration from Option mispricing instead of a hedge strategy. Note that it only attains a true profit when the risk-free return is greater than the risk-free interest rate .

    Implementation

    Follow these steps to implement the conversion strategy:

    1. In the Initialize initialize method, set the start date, set the end date, subscribe to the underlying Equity , and create an Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 4, 30);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(-10, 10, 0, 30);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 4, 30)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(-10, 10, 0, 30)
    3. In the OnData on_data method, select the strike and expiry of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested) return;
      
          // Get the OptionChain
          if (!slice.OptionChains.TryGetValue(_symbol, out var chain)) return;
      
          // Select an expiry date and ATM strike price
          var expiry = chain.Max(x => x.Expiry);
          var strike = chain.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First().Strike;
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Select an expiry date and ATM strike price
          expiry = max([x.expiry for x in chain])
          strike = sorted(chain, key = lambda x: abs(x.strike - chain.underlying.price))[0].strike
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.Conversion OptionStrategies.conversion method with the details of each leg and then pass the result to the Buy buy method.

      var conversion = OptionStrategies.Conversion(_symbol, strike, expiry);
      Buy(conversion, 1);
      conversion = OptionStrategies.conversion(self._symbol, strike, expiry)
      self.buy(conversion, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      // Select the call and put contracts
      var call = chain.Single(x => x.Expiry == expiry && x.Strike == strike && x.Right == OptionRight.Call);
      var put = chain.Single(x => x.Expiry == expiry && x.Strike == strike && x.Right == OptionRight.Put);
      
      var legs = new List<Leg>()
          {
              Leg.Create(call.Symbol, -1),
              Leg.Create(put.Symbol, 1),
              Leg.Create(chain.Underlying.Symbol, chain.Underlying.SymbolProperties.ContractMultiplier)
          };
      ComboMarketOrder(legs, 1);
      # Select the call and put contracts
      call = [x for x in chain if x.right == OptionRight.CALL and x.expiry == expiry and x.strike == strike][0]
      put = [x for x in chain if x.right == OptionRight.PUT and x.expiry == expiry and x.strike == strike][0]
      
      legs = [
          Leg.create(call.symbol, -1),
          Leg.create(put.symbol, 1),
          Leg.create(chain.underlying.symbol, chain.underlying.symbol_properties.contract_multiplier)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    This is a fixed payoff, delta-neutral strategy. The payoff is

    $$ \begin{array}{rcll} C_T & = & (S_T - K)^{+}\\ P_T & = & (K - S_T)^{+}\\ Payoff_T & = & (S_T - S_0 - C_T + P_T + C_0 - P_0)\times m - fee\\ & = & (K - S_0 + C_0 - P_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C_T & = & \textrm{Call value at time T}\\ & P_T & = & \textrm{Put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Strike price}\\ & Payoff_T & = & \textrm{Payout total at time T}\\ & S_0 & = & \textrm{Underlying asset price when the trade opened}\\ & C_0 & = & \textrm{Call price when the trade opened (credit received)}\\ & P_0 & = & \textrm{Put price when the trade opened (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    conversion strategy payoff

    The payoff is only dependent on the strike price and the initial asset prices.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Call 8.10 832.50
    Put 9.50 832.50
    Underlying Equity at position opens 833.17 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} Payoff_T & = & (K - S_0 + C_0 - P_0)\times m - fee\\ & = & (832.50 - 833.17 + 8.10 - 9.50)\times100-1.00\times3\\ & = & -210.00\\ \end{array} $$

    So, the strategy loses $210.

    The following algorithm implements a conversion Option strategy:

     

    Option Strategies

    Reverse Conversion

    Introduction

    A Reverse Conversion , or Reversal , is the inverse of a conversion and also a special case of a protective collar . It consist of shorting one lot of the underlying security, buying a call, and selling a put with lower strike price. However, the strategy now serves as an delta-neutral arbitration from Option mispricing instead of a hedge strategy. Note that it only attains a true profit when the risk-free return is greater than the risk-free interest rate .

    Implementation

    Follow these steps to implement the reverse conversion strategy:

    1. In the Initialize initialize method, set the start date, set the end date, subscribe to the underlying Equity , and create an Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 4, 30);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(-10, 10, 0, 30);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 4, 30)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(-10, 10, 0, 30)
    3. In the OnData on_data method, select the strike and expiry of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested) return;
      
          // Get the OptionChain
          if (!slice.OptionChains.TryGetValue(_symbol, out var chain)) return;
      
          // Select an expiry date and ATM strike price
          var expiry = chain.Max(x => x.Expiry);
          var strike = chain.OrderBy(x => Math.Abs(x.Strike - chain.Underlying.Price)).First().Strike;
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Select an expiry date and ATM strike price
          expiry = max([x.expiry for x in chain])
          strike = sorted(chain, key = lambda x: abs(x.strike - chain.underlying.price))[0].strike
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.ReverseConversion OptionStrategies.reverse_conversion method with the details of each leg and then pass the result to the Buy buy method.

      var reverseConversion = OptionStrategies.ReverseConversion(_symbol, strike, expiry);
      Buy(reverseConversion, 1);
      reverse_conversion = OptionStrategies.reverse_conversion(self._symbol, strike, expiry)
      self.buy(reverse_conversion, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      // Select the call and put contracts
      var call = chain.Single(x => x.Expiry == expiry && x.Strike == strike && x.Right == OptionRight.Call);
      var put = chain.Single(x => x.Expiry == expiry && x.Strike == strike && x.Right == OptionRight.Put);
      
      var legs = new List<Leg>()
          {
              Leg.Create(call.Symbol, 1),
              Leg.Create(put.Symbol, -1),
              Leg.Create(chain.Underlying.Symbol, -chain.Underlying.SymbolProperties.ContractMultiplier)
          };
      ComboMarketOrder(legs, 1);
      # Select the call and put contracts
      call = [x for x in chain if x.right == OptionRight.CALL and x.expiry == expiry and x.strike == strike][0]
      put = [x for x in chain if x.right == OptionRight.PUT and x.expiry == expiry and x.strike == strike][0]
      
      legs = [
          Leg.create(call.symbol, 1),
          Leg.create(put.symbol, -1),
          Leg.create(chain.underlying.symbol, -chain.underlying.symbol_properties.contract_multiplier)
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    This is a fixed payoff, delta-neutral strategy. The payoff is

    $$ \begin{array}{rcll} C_T & = & (S_T - K)^{+}\\ P_T & = & (K - S_T)^{+}\\ Payoff_T & = & (S_0 - S_T + C_T - P_T - C_0 + P_0)\times m - fee\\ & = & (S_0 - K - C_0 + P_0)\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C_T & = & \textrm{Call value at time T}\\ & P_T & = & \textrm{Put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K & = & \textrm{Strike price}\\ & Payoff_T & = & \textrm{Payout total at time T}\\ & S_0 & = & \textrm{Underlying asset price when the trade opened}\\ & C_0 & = & \textrm{Call price when the trade opened (credit received)}\\ & P_0 & = & \textrm{Put price when the trade opened (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    reverse conversion strategy payoff

    The payoff is only dependent on the strike price and the initial asset prices.

    If the Option is American Option, there is a risk of early assignment on the contract you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    Call 10.30 832.50
    Put 7.40 832.50
    Underlying Equity at position opens 832.26 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} Payoff_T & = & (S_0 - K - C_0 + P_0)\times m - fee\\ & = & (832.26 - 832.50 - 10.30 + 7.40)\times100-1.00\times3\\ & = & -317.00\\ \end{array} $$

    So, the strategy loses $317.

    The following algorithm implements a reverse conversion Option strategy:

     

    Option Strategies

    Box Spread

    Introduction

    A Box Spread is the combination of a bull call spread and a bear put spread . It consist of buying an ITM call at strike $A$, selling an OTM put at strike $A$, buying an ITM put at strike $B < A$, and selling an OTM call at strike $B$, where all of the contracts have the same expiry date. This strategy serves as an delta-neutral arbitration from Option mispricing. Note that it only attains a true profit when the risk-free return is greater than the risk-free interest rate .

    Implementation

    Follow these steps to implement the box spread strategy:

    1. In the Initialize initialize method, set the start date, set the end date, subscribe to the underlying Equity , and create an Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 4, 30);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(-10, 10, 0, 30);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 4, 30)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(-10, 10, 0, 30)
    3. In the OnData on_data method, select the expiry and strikes of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested) return;
      
          // Get the OptionChain
          if (!slice.OptionChains.TryGetValue(_symbol, out var chain))
          {
              return;
          }
      
          // Select an expiry date and ITM & OTM strike prices
          var expiry = chain.Max(x => x.Expiry);
          var contracts = chain.Where(x => x.Expiry == expiry).ToList();
          var higherStrike = contracts.Max(x => x.Strike);
          var lowerStrike = contracts.Min(x => x.Strike);
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested:
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain:
              return
      
          # Select an expiry date and ITM & OTM strike prices
          expiry = max([x.expiry for x in chain])
          contracts = [x for x in chain if x.expiry == expiry]
          lower_strike = min([x.strike for x in contracts])
          higher_strike = max([x.strike for x in contracts])
    5. In the OnData on_data method, select the contracts and place the order.
    6. Approach A: Call the OptionStrategies.BoxSpread OptionStrategies.box_spread method with the details of each leg and then pass the result to the Buy buy method.

      var boxSpread = OptionStrategies.BoxSpread(_symbol, higherStrike, lowerStrike, expiry);
      Buy(boxSpread, 1);
      box_spread = OptionStrategies.box_spread(self._symbol, higher_strike, lower_strike, expiry)
      self.buy(box_spread, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      // Select the call and put contracts
      var itmCall = contracts.Single(x => x.Strike == lowerStrike && x.Right == OptionRight.Call);
      var otmCall = contracts.Single(x => x.Strike == higherStrike && x.Right == OptionRight.Call);
      var itmPut = contracts.Single(x => x.Strike == higherStrike && x.Right == OptionRight.Put);
      var otmPut = contracts.Single(x => x.Strike == lowerStrike && x.Right == OptionRight.Put);
      
      var legs = new List<Leg>()
      {
          Leg.Create(itmCall.Symbol, 1),
          Leg.Create(itmPut.Symbol, 1),
          Leg.Create(otmCall.Symbol, -1),
          Leg.Create(otmPut.Symbol, -1),
      };
      ComboMarketOrder(legs, 1);
      # Select the call and put contracts
      itm_call = next(filter(lambda x: x.right == OptionRight.CALL and x.strike == lower_strike, contracts))
      otm_call = next(filter(lambda x: x.right == OptionRight.CALL and x.strike == higher_strike, contracts))
      itm_put = next(filter(lambda x: x.right == OptionRight.PUT and x.strike == higher_strike, contracts))
      otm_put = next(filter(lambda x: x.right == OptionRight.PUT and x.strike == lower_strike, contracts))           
      
      legs = [
          Leg.create(itm_call.symbol, 1),
          Leg.create(itm_put.symbol, 1),
          Leg.create(otm_call.symbol, -1),
          Leg.create(otm_put.symbol, -1),
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    This is a fixed payoff, delta-neutral strategy. The payoff is

    $$ \begin{array}{rcll} C_T^{ITM} & = & (S_T - K_{-})^{+}\\ C_T^{OTM} & = & (S_T - K_{+})^{+}\\ P_T^{ITM} & = & (K_{+} - S_T)^{+}\\ P_T^{OTM} & = & (K_{-} - S_T)^{+}\\ Payoff_T & = & (C_T^{ITM} - C_0^{ITM} + P_T^{ITM} - P_0^{ITM} - C_T^{OTM} + C_0^{OTM} - P_T^{OTM} + P_0^{OTM})\times m - fee\\ & = & (K_{+} - K_{-} + C_0^{OTM} + P_0^{OTM} - C_0^{ITM} - P_0^{ITM})\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C_T^{ITM} & = & \textrm{ITM Call value at time T}\\ & C_T^{OTM} & = & \textrm{OTM Call value at time T}\\ & P_T^{ITM} & = & \textrm{ITM Put value at time T}\\ & P_T^{OTM} & = & \textrm{OTM Put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K_{+} & = & \textrm{Higher strike price}\\ & K_{-} & = & \textrm{Lower strike price}\\ & Payoff_T & = & \textrm{Payout total at time T}\\ & C_0^{ITM} & = & \textrm{ITM Call price when the trade opened (debit paid)}\\ & C_0^{OTM} & = & \textrm{OTM Call price when the trade opened (credit received)}\\ & P_0^{ITM} & = & \textrm{ITM Put price when the trade opened (debit paid)}\\ & P_0^{OTM} & = & \textrm{OTM Put price when the trade opened (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    box spread strategy payoff

    The payoff is only dependent on the strike price and the initial asset prices.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    ITM Call 27.30 810.00
    ITM Put 28.00 857.50
    OTM Call 1.05 857.50
    OTM Put 1.50 810.00
    Underlying Equity at expiration 843.25 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} Payoff_T & = & (K_{+} - K_{-} + C_0^{OTM} + P_0^{OTM} - C_0^{ITM} - P_0^{ITM})\times m - fee\\ & = & (857.50 - 810.00 + 1.05 + 1.50 - 27.30 - 28.00)\times100 - 1.00\times4\\ & = & -529.00\\ \end{array} $$

    So, the strategy loses $529.

    The following algorithm implements a box spread Option strategy:

     

    Option Strategies

    Short Box Spread

    Introduction

    A Short Box Spread is the inverse of a box spread , as well as the combination of a bear call spread and a bull put spread . It consists of buying an OTM call at strike $A$, selling an ITM put at strike $A$, buying an OTM put and strike $B < A$, and selling an ITM call at strike $B$, where all of the contracts have the same expiry date. This strategy serves as an delta-neutral arbitration from Option mispricing. Note that it only attains a true profit when the risk-free return is greater than the risk-free interest rate .

    Implementation

    Follow these steps to implement the short box spread strategy:

    1. In the Initialize initialize method, set the start date, set the end date, subscribe to the underlying Equity , and create an Option universe .
    2. private Symbol _symbol;
      
      public override void Initialize()
      {
          SetStartDate(2017, 4, 1);
          SetEndDate(2017, 4, 30);
          SetCash(100000);
      
          UniverseSettings.Asynchronous = true;
          var option = AddOption("GOOG", Resolution.Minute);
          _symbol = option.Symbol;
          option.SetFilter(-10, 10, 0, 30);
      }
      def initialize(self) -> None:
          self.set_start_date(2017, 4, 1)
          self.set_end_date(2017, 4, 30)
          self.set_cash(100000)
      
          self.universe_settings.asynchronous = True
          option = self.add_option("GOOG", Resolution.MINUTE)
          self._symbol = option.symbol
          option.set_filter(-10, 10, 0, 30)
    3. In the OnData on_data method, select the strike and expiry of the contracts in the strategy legs.
    4. public override void OnData(Slice slice)
      {
          if (Portfolio.Invested) return;
      
          // Get the OptionChain
          if (!slice.OptionChains.TryGetValue(_symbol, out var chain)) return;
      
          // Select an expiry date and ITM & OTM strike prices
          var expiry = chain.Max(x => x.Expiry);
          var contracts = chain.Where(x => x.Expiry == expiry).ToList();
          var higherStrike = contracts.Max(x => x.Strike);
          var lowerStrike = contracts.Min(x => x.Strike);
      def on_data(self, slice: Slice) -> None:
          if self.portfolio.invested: 
              return
      
          # Get the OptionChain
          chain = slice.option_chains.get(self._symbol, None)
          if not chain: 
              return
      
          # Select an expiry date and ITM & OTM strike prices
          expiry = max([x.expiry for x in chain])
          contracts = [x for x in chain if x.expiry == expiry]
          lower_strike = min([x.strike for x in contracts])
          higher_strike = max([x.strike for x in contracts])
    5. In the OnData on_data method, select the contracts and place the orders.
    6. Approach A: Call the OptionStrategies.ShortBoxSpread OptionStrategies.short_box_spread method with the details of each leg and then pass the result to the Buy buy method.

      var shortBoxSpread = OptionStrategies.ShortBoxSpread(_symbol, higherStrike, lowerStrike, expiry);
      Buy(shortBoxSpread, 1);
      short_box_spread = OptionStrategies.short_box_spread(self._symbol, higher_strike, lower_strike, expiry)
      self.buy(short_box_spread, 1)

      Approach B: Create a list of Leg objects and then call the Combo Market Order combo_market_order , Combo Limit Order combo_limit_order , or Combo Leg Limit Order combo_leg_limit_order method.

      // Select the call and put contracts
      var itmCall = chain.Single(x => x.Expiry == expiry && x.Strike == lowerStrike && x.Right == OptionRight.Call);
      var otmCall = chain.Single(x => x.Expiry == expiry && x.Strike == higherStrike && x.Right == OptionRight.Call);
      var itmPut = chain.Single(x => x.Expiry == expiry && x.Strike == higherStrike && x.Right == OptionRight.Put);
      var otmPut = chain.Single(x => x.Expiry == expiry && x.Strike == lowerStrike && x.Right == OptionRight.Put);
          
      var legs = new List<Leg>()
          {
              Leg.Create(itmCall.Symbol, -1),
              Leg.Create(itmPut.Symbol, -1),
              Leg.Create(otmCall.Symbol, 1),
              Leg.Create(otmPut.Symbol, 1),
          };
      ComboMarketOrder(legs, 1);
      # Select the call and put contracts
      itm_call = [x for x in chain if x.right == OptionRight.CALL and x.expiry == expiry and x.strike == lower_strike][0]
      otm_call = [x for x in chain if x.right == OptionRight.CALL and x.expiry == expiry and x.strike == higher_strike][0]
      itm_put = [x for x in chain if x.right == OptionRight.PUT and x.expiry == expiry and x.strike == higher_strike][0]
      otm_put = [x for x in chain if x.right == OptionRight.PUT and x.expiry == expiry and x.strike == lower_strike][0]
          
      legs = [
          Leg.create(itm_call.symbol, -1),
          Leg.create(itm_put.symbol, -1),
          Leg.create(otm_call.symbol, 1),
          Leg.create(otm_put.symbol, 1),
      ]
      self.combo_market_order(legs, 1)

    Strategy Payoff

    This is a fixed payoff, delta-neutral strategy. The payoff is

    $$ \begin{array}{rcll} C_T^{ITM} & = & (S_T - K_{-})^{+}\\ C_T^{OTM} & = & (S_T - K_{+})^{+}\\ P_T^{ITM} & = & (K_{+} - S_T)^{+}\\ P_T^{OTM} & = & (K_{-} - S_T)^{+}\\ Payoff_T & = & (C_0^{ITM} - C_T^{ITM} + P_0^{ITM} - P_T^{ITM} - C_0^{OTM} + C_T^{OTM} - P_0^{OTM} + P_T^{OTM})\times m - fee\\ & = & (K_{-} - K_{+} + C_0^{ITM} + P_0^{ITM} - C_0^{OTM} - P_0^{OTM})\times m - fee \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C_T^{ITM} & = & \textrm{ITM Call value at time T}\\ & C_T^{OTM} & = & \textrm{OTM Call value at time T}\\ & P_T^{ITM} & = & \textrm{ITM Put value at time T}\\ & P_T^{OTM} & = & \textrm{OTM Put value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K_{+} & = & \textrm{Higher strike price}\\ & K_{-} & = & \textrm{Lower strike price}\\ & Payoff_T & = & \textrm{Payout total at time T}\\ & C_0^{ITM} & = & \textrm{ITM Call price when the trade opened (debit paid)}\\ & C_0^{OTM} & = & \textrm{OTM Call price when the trade opened (credit received)}\\ & P_0^{ITM} & = & \textrm{ITM Put price when the trade opened (debit paid)}\\ & P_0^{OTM} & = & \textrm{OTM Put price when the trade opened (credit received)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$

    The following chart shows the payoff at expiration:

    short box spread strategy payoff

    The payoff is only dependent on the strike price and the initial asset prices.

    If the Option is American Option, there is a risk of early assignment on the contracts you sell.

    Example

    The following table shows the price details of the assets in the algorithm:

    Asset Price ($) Strike ($)
    ITM Call 23.00 810.00
    ITM Put 23.80 857.50
    OTM Call 1.85 857.50
    OTM Put 2.75 810.00
    Underlying Equity at expiration 843.25 -

    Therefore, the payoff is

    $$ \begin{array}{rcll} Payoff_T & = & (K_{-} - K_{+} + C_0^{ITM} + P_0^{ITM} - C_0^{OTM} - P_0^{OTM})\times m - fee\\ & = & (810.00 - 857.50 + 23.00 + 23.80 - 1.85 - 2.75)\times100 - 1.00\times4\\ & = & -534.00\\ \end{array} $$

    So, the strategy loses $534.

    The following algorithm implements a short box spread Option strategy:

     

    Trading and Orders

    Order Properties

    Introduction

    Order properties enable you to customize how the brokerage executes your orders. The DefaultOrderProperties default_order_properties of your algorithm sets the order properties for all of your orders. To adjust the order properties of an order, you can change the DefaultOrderProperties default_order_properties or pass an order properties object to the order method.

    Time In Force

    The TimeInForce time_in_force property determines how long an order should remain open if it doesn't fill. This property doesn't apply to market orders since they usually fill immediately. Time in force is useful to automatically cancel old trades. The following table describes the available TimeInForce options:

    Member Example Description
    GoodTilCanceled GOOD_TIL_CANCELED TimeInForce. GoodTilCanceled GOOD_TIL_CANCELED Order is valid until filled (default)
    Day DAY TimeInForce. Day DAY Order is valid until filled or the market closes
    GoodTilDate(DateTime expiry) GOOD_TIL_DATE(expiry: datetime) TimeInForce.GoodTilDate(new DateTime(2019, 6, 19, 12, 0, 0)) time_in_force.GOOD_TIL_DATE(datetime(2019, 6, 19, 12, 0, 0)) Order is valid until filled or the specified expiration time

    By default, orders remain open until they are canceled ( TimeInForce. GoodTilCanceled GOOD_TIL_CANCELED ). To update the value, set the DefaultOrderProperties.TimeInForce default_order_properties.time_in_force before you place an order or pass an orderProperties order_properties argument to the order method.

    // Set a Limit Order to be good until market close
    DefaultOrderProperties.TimeInForce = TimeInForce.Day;
    LimitOrder("IBM", 100, 120);
    
    // Set a Limit Order to be good until noon
    LimitOrder("IBM", 100, 120, orderProperties: new OrderProperties 
    {
        TimeInForce = TimeInForce.GoodTilDate(new DateTime(2019, 6, 19, 12, 0, 0))
    });
    # Set a Limit Order to be good until market close
    self.default_order_properties.time_in_force = TimeInForce.DAY
    self.limit_order("IBM", 100, 120)
    
    # Set a Limit Order to be good until noon
    order_properties = OrderProperties()
    order_properties.time_in_force = TimeInForce.GOOD_TIL_DATE(datetime(2019, 6, 19, 12, 0, 0))
    self.limit_order("IBM", 100, 120, order_properties=order_properties)

    If you trade a market that's open 24 hours a day with daily data, TimeInForce.Day TimeInForce.DAY won't work because the order cancels at the market close time but your algorithm receives daily data at midnight.

    Market on open (MOO) and market on close (MOC) orders don't support the GoodTilDate GOOD_TIL_DATE time in force. If you submit a MOO or MOC order with the GoodTilDate GOOD_TIL_DATE time in force, LEAN automatically adjusts the time in force to be GoodTilCanceled .

    The brokerage you use may not support all of the TimeInForce options. To see the options that your brokerage supports, see the Orders section of the brokerage model documentation .

    Brokerage-Specific Properties

    Some brokerages support additional order properties so you can customize how your orders execute. Some examples include the following order properties:

    To view the order properties your brokerage supports, see the Orders section of the brokerage model documentation .

    Tags

    You can tag orders to aid your strategy development. Tags can be any string of up to 100 characters. Tags aren't part of the OrderProperties object, but they are a property of the Order class you can set. To set an order tag, pass it as an argument when you create the order or use the order update methods.

    // Tag an order on creation
    var ticket = LimitOrder("SPY", 100, 221.05, tag: "Original tag");
    
    // Update the tag with UpdateTag
    ticket.UpdateTag("Updated tag");
    
    // Update the tag with UpdateOrderFields
    ticket.Update(new() { Tag = "Another tag" });
     # Tag an order on creation
    ticket = self.limit_order("SPY", 100, 221.05, "Original tag")
    
    # Update the tag with UpdateTag
    ticket.update_tag("Updated tag")
    
    # Update the tag with UpdateOrderFields
    update_settings = UpdateOrderFields()
    update_settings.tag = "Another tag"
    ticket.update(update_settings)

     

    Trading and Orders

    Order Events

    Introduction

    An OrderEvent object represents an update to the state of an order. As the state of your orders change, we notify your algorithm with OrderEvent objects through the OnOrderEvent on_order_event and OnAssignmentOrderEvent on_assignment_order_event event handlers.

    Track Order Events

    Each order generates events over its life as its status changes. Your algorithm receives these events through the OnOrderEvent on_order_event and OnAssignmentOrderEvent on_assignment_order_event methods. The OnOrderEvent on_order_event event handler receives all order events. The OnAssignmentOrderEvent on_assignment_order_event receives order events for Option assignments. The event handlers receive an OrderEvent object, which contains information about the order status.

    public override void OnOrderEvent(OrderEvent orderEvent)
    {
        var order = Transactions.GetOrderById(orderEvent.OrderId);
        if (orderEvent.Status == OrderStatus.Filled)
        {
            Debug($"{Time}: {order.Type}: {orderEvent}");
        }
    }
    
    public override void OnAssignmentOrderEvent(OrderEvent assignmentEvent)
    {
        Log(assignmentEvent.ToString());
    }
    def on_order_event(self, order_event: OrderEvent) -> None:
        order = self.transactions.get_order_by_id(order_event.order_id)
        if order_event.status == OrderStatus.FILLED:
            self.debug(f"{self.time}: {order.type}: {order_event}")
    
    def on_assignment_order_event(self, assignment_event: OrderEvent) -> None:
        self.log(str(assignment_event))

    To get a list of all OrderEvent objects for an order, call the OrderEvents order_events method of the order ticket .

    var orderEvents = orderTicket.OrderEvents();
    order_events = order_ticket.order_events()

    If you don't have the order ticket, get the order ticket from the TransactionManager .

    Order States

    Orders can have any of the following states:

    Event Attributes

    The OnOrderEvent on_order_event and OnAssignmentOrderEvent on_assignment_order_event event handlers in your algorithm receive OrderEvent objects, which have the following attributes:

     

    Trading and Orders

    Order Errors

    Introduction

    If an error occurs with one of your orders, LEAN logs the error message and stops executing.

    Types of Order Errors

    Errors can occur when you place orders or after you place them.

    Errors at Order Submission

    The following errors can occur when you submit an order:

    Errors After Order Submission

    The following errors can occur for active orders:

    Common Errors

    There are a few common order errors you may experience.

    Why is my order converted to a market on open order?

    If you place a market order when the market is closed, LEAN automatically converts the order into market on open order. This most commonly happens when you use daily or hourly data, which your algorithm can receive when the market is closed. Your algorithm receives daily bars at midnight and receives the last hourly bar of each day at 4 PM Eastern Time (ET). To avoid LEAN from converting your market order to market on open orders, submit your market orders when the market is open. To check if the market is open, call the IsMarketOpen is_market_open method.

    if (IsMarketOpen(_symbol))
    {
        MarketOrder(symbol, quantity);
    }
    if self.is_market_open(self._symbol):
        self.market_order(self._symbol, quantity)

    Why am I seeing the "stale price" warning?

    Stale fills occur when you fill an order with price data that is timestamped an hour or more into the past. Stale fills usually only occur if you trade illiquid assets or if your algorithm uses daily data but you trade intraday with Scheduled Events. If your order is filled with stale data, the fill price may not be realistic. The pre-built fill models can only fill market orders with stale data. To adjust the length of time that needs to pass before an order is considered stale, set the StalePriceTimeSpan stale_price_time_span setting.

    Settings.StalePriceTimeSpan = TimeSpan.FromMinutes(10);
    self.settings.stale_price_time_span = timedelta(minutes=10)

    Why do I get "Backtest Handled Error: The security with symbol '/ES' is marked as non-tradable"?

    This error occurs when you place an order for a continuous Futures contract, which isn't a tradable security. To fix the issue, place the order for a specific Futures contract. To access the currently selected contract in the continuous contract series, use the Mapped mapped property of the Future object.

    Why do I get "Backtest Handled Error: Order Error: ids: [1], Insufficient buying power to complete orders" from a Crypto order?

    When you place Crypto trades, ensure you have a sufficient balance of the base or quote currency before each trade. If you hold multiple assets and you want to put all of your capital into BTCUSDT, you need to first convert all your non-BTC assets into USDT and then purchase BTCUSDT.

    By default, the account currency is USD and your starting cash is $100,000. Some Crypto exchanges don't support fiat currencies, which means you can't convert the $100,000 USD to the pair's quote currency . In this case, set your account currency to the quote currency with a positive quantity.

    SetAccountCurrency("USDT", 1000);   // Set account currency to Thether and its quantity to 1000 USDT
    self.set_account_currency("USDT", 1000)   # Set account currency to Thether and its quantity to 1000 USDT

    Error Code Reference

    The OrderError enumeration has the following members:

    Order Response Error Reference

    The following sections explain why each OrderResponseErrorCode occurs and how to avoid it.

    None

    The OrderResponseErrorCode.None (0) error means there is no order response error.

    Processing Error

    The OrderResponseErrorCode.ProcessingError (-1) error occurs in the following situations:

    To investigate this order response error further, see the HandleSubmitOrderRequest , UpdateOrder , and CancelOrder methods of the BrokerageTransactionHandler in the LEAN GitHub repository.

    Order Already Exists

    The OrderResponseErrorCode.OrderAlreadyExists (-2) error occurs when you submit a new order but you already have an open order or a completed order with the same order ID. This order response error usually comes from a concurrency issue.

    To avoid this order response, don't place two asynchronous orders at the same time.

    Insufficient Buying Power

    The OrderResponseErrorCode.InsufficientBuyingPower (-3) error occurs when you place an order but the buying power model determines you can't afford it.

    To avoid this order response error for non-Option trades, ensure you have enough margin remaining to cover the initial margin requirements of the order before placing it.

    This error also commonly occurs when you place a market on open order with daily data. If you place the order with SetHoldings set_holdings or use CalculateOrderQuantity calculate_order_quantity to determine the order quantity, LEAN calculates the order quantity based on the market close price. If the open price on the following day makes your order more expensive, then you may have insufficient buying power. To avoid the order response error in this case, either use intraday data and place trades when the market is open or adjust your buying power buffer .

    Settings.FreePortfolioValuePercentage = 0.05m;
    self.settings.free_portfolio_value_percentage = 0.05

    Brokerage Model Refused to Submit Order

    The OrderResponseErrorCode.BrokerageModelRefusedToSubmitOrder (-4) error occurs when you place an order but the brokerage model determines it's invalid. The brokerage model usually checks your order meets the following requirements before sending it to the brokerage:

    Each brokerage model can have additional order requirements that the brokerage declares. To avoid this order response error, see the Orders section of the brokerage model documentation .

    To investigate this order response error further, see the CanSubmitOrder method definition of your brokerage model . This order response error occurs when the CanSubmitOrder method returns false False .

    Brokerage Failed to Submit Order

    The OrderResponseErrorCode.BrokerageFailedToSubmitOrder (-5) error occurs when you place an order but the brokerage implementation fails to submit the order to your brokerage.

    To investigate this order response error further, see the PlaceOrder method definition of your brokerage or the BacktestingBrokerage in the LEAN GitHub repository. This order response error occurs when the PlaceOrder method throws an error or returns false .

    Brokerage Failed to Update Order

    The OrderResponseErrorCode.BrokerageFailedToUpdateOrder (-6) error occurs when you try to update an order but the brokerage implementation fails to submit the order update request to your brokerage.

    To avoid this order response error, see the Orders section of the brokerage model documentation .

    To investigate this order response error further, see the UpdateOrder method definition of your brokerage or the BacktestingBrokerage in the LEAN GitHub repository. This order response error occurs when the UpdateOrder method throws an error or returns false .

    Brokerage Failed to Cancel Order

    The OrderResponseErrorCode.BrokerageFailedToCancelOrder (-8) error occurs when you try to cancel an order but the brokerage implementation fails to submit the cancel request to your brokerage.

    To investigate this order response error further, see the CancelOrder method definition of your brokerage or the BacktestingBrokerage in the LEAN GitHub repository. This order response error occurs when CancelOrder method throws an error or returns false .

    Invalid Order Status

    The OrderResponseErrorCode.InvalidOrderStatus (-9) error occurs when you try to update or cancel an order but the order is already complete. An order is complete if it has OrderStatus.Filled OrderStatus.FILLED , OrderStatus.Canceled , or OrderStatus.Invalid .

    To avoid this order response error, check Status of an order ticket or order event before you update or cancel the order.

    if (!_orderTicket.Status.IsClosed())
    {
        _orderTicket.Cancel();
    }
    if not OrderExtensions.is_closed(order_ticket.status):
        order_ticket.cancel()

    Unable to Find Order

    The OrderResponseErrorCode.UnableToFindOrder (-10) error occurs when you try to place, update, or cancel an order, but the BrokerageTransactionHandler doesn't have a record of the order ID.

    To investigate this order response error further, see BrokerageTransactionHandler.cs in the LEAN GitHub repository. This order response error occurs when the BrokerageTransactionHandler can't find the order ID in it's _completeOrders or _completeOrderTickets dictionaries.

    Order Quantity Zero

    The OrderResponseErrorCode.OrderQuantityZero (-11) error occurs when you place an order that has zero quantity or when you update an order to have a zero quantity. This error commonly occurs if you use the SetHoldings method but the portfolio weight you provide to the method is too small to translate into a non-zero order quantity.

    To avoid this order response error, check if the quantity of the order is non-zero before you place the order. If you use the SetHoldings set_holdings method, replace it with a combination of the CalculateOrderQuantity and MarketOrder methods.

    var quantity = CalculateOrderQuantity(_symbol, 0.05);
    if (quantity != 0)
    {
        MarketOrder(_symbol, quantity);
    }
    quantity = self.calculate_order_quantity(self._symbol, 0.05)
    if quantity:
        self.market_order(self._symbol, quantity)

    Unsupported Request Type

    The OrderResponseErrorCode.UnsupportedRequestType (-12) error occurs in the following situations:

    To avoid this order response error, check the quantity of your holdings before you try to exercise an Option contract.

    var holdingQuantity = Portfolio[_contractSymbol].Quantity;
    if (holdingQuantity > 0)
    {
        ExerciseOption(_contractSymbol, Math.Max(holdingQuantity, exerciseQuantity));
    }
    holding_quantity = self.Portfolio[self.contract_symbol].Quantity
    if holding_quantity > 0:
        self.ExerciseOption(self.contract_symbol, max(holding_quantity, exercise_quantity))

    Missing Security

    The OrderResponseErrorCode.MissingSecurity (-14) error occurs when you place an order for a security but you don't have a subscription for the security in your algorithm.

    To avoid this order response error, create a subscription for each security you want to trade. To create subscriptions, see the Requesting Data page of the documentation for each asset class .

    Exchange Not Open

    The OrderResponseErrorCode.ExchangeNotOpen (-15) error occurs in the following situations:

    Security Price Zero

    The OrderResponseErrorCode.SecurityPriceZero (-16) error occurs when you place an order or exercise an Option contract while the security price is $0. The security price can be $0 for the following reasons:

    Forex Base and Quote Currencies Required

    The OrderResponseErrorCode.ForexBaseAndQuoteCurrenciesRequired (-17) error occurs when you place a trade for a Forex or Crypto pair but you don't have the base currency and quote currency in your cash book . This error should never occur. If it does, create a bug report.

    Forex Conversion Rate Zero

    The OrderResponseErrorCode.ForexConversionRateZero (-18) error occurs when you place a trade for a Forex or Crypto pair and LEAN can't convert the value of the base currency to your account currency. This error usually indicates a lack of data. Investigate the data and if there is some missing, report it .

    Security Has No Data

    The OrderResponseErrorCode.SecurityHasNoData (-19) error occurs when you place an order for a security before your algorithm receives any data for it. If you subscribe to a security and place an order for the security in the same time step , you'll get this error. To avoid this order response error, initialize the security price with the last known price.

    SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))

    Exceeded Maximum Orders

    The OrderResponseErrorCode.ExceededMaximumOrders (-20) error occurs when exceed your order quota in a backtest. The number of orders you can place in a single backtest depends on the tier of your organization . The following table shows the number of orders you can place on each tier:

    Tier Orders Quota
    Free 10K
    Quant Researcher 10M
    Team Unlimited
    Trading Firm Unlimited
    Institution Unlimited

    To avoid this order response error, reduce the number of orders in your backtest or upgrade your organization .

    Market on Close Order Too Late

    The OrderResponseErrorCode.MarketOnCloseOrderTooLate (-21) error occurs when you try to place a market on close (MOC) order too early in the trading day.

    To avoid this order response error, place the MOC order closer to the market close or adjust the submission time buffer. By default, you must place MOC orders at least 15.5 minutes before the close, but some exchanges let you submit them closer to the market closing time. To adjust the buffer period that's required, set the MarketOnCloseOrder.SubmissionTimeBuffer MarketOnCloseOrder.SUBMISSION_TIME_BUFFER property.

    Orders.MarketOnCloseOrder.SubmissionTimeBuffer = TimeSpan.FromMinutes(10);
    MarketOnCloseOrder.SUBMISSION_TIME_BUFFER = timedelta(minutes=10)

    Invalid Request

    The OrderResponseErrorCode.InvalidRequest (-22) error occurs when you try to cancel an order multiple times.

    To avoid this order response error, only try to cancel an order one time.

    Request Canceled

    The OrderResponseErrorCode.RequestCanceled (-23) error occurs when you try to cancel an order multiple times.

    To avoid this order response error, only try to cancel an order one time.

    Algorithm Warming Up

    The OrderResponseErrorCode.AlgorithmWarmingUp (-24) error occurs in the following situations:

    To avoid this order response error, only manage orders after the warm-up period ends. To avoid trading during the warm-up period, add an IsWarmingUp is_warming_up guard to the top of the OnData on_data method.

    if (IsWarmingUp) return;
    if self.is_warming_up: return

    Brokerage Model Refused to Update Order

    The OrderResponseErrorCode.BrokerageModelRefusedToUpdateOrder (-25) error occurs in backtests when you try to update an order in a way that the brokerage model doesn't support.

    To avoid this issue, see the Orders section of the brokerage model documentation to check its order requirements.

    To investigate this order response error further, see the CanUpdateOrder method definition of your brokerage model .

    Quote Currency Required

    The OrderResponseErrorCode.QuoteCurrencyRequired (-26) error occurs when you place an order for a Forex or Crypto pair and don't have the quote currency of the pair in your cash book . This error should never occur. If it does, create a bug report.

    Conversion Rate Zero

    The OrderResponseErrorCode.ConversionRateZero (-27) error occurs when you place an order for a Forex or Crypto pair and LEAN can't convert the value of the quote currency in the pair to your account currency. This order response error usually indicates a lack of data. Investigate the data and if there is data missing, report it .

    Non-Tradable Security

    The OrderResponseErrorCode.NonTradableSecurity (-28) error occurs when you place an order for a security that's not tradable . To avoid this order response error, check if a security is tradable before you trade it.

    if (Securities[_symbol].IsTradable)
    {
        MarketOrder(_symbol, quantity);
    }
    if self.securities[self._symbol].is_tradable:
        self.market_order(self._symbol, quantity)

    Non-Exercisable Security

    The OrderResponseErrorCode.NonExercisableSecurity (-29) error occurs when you call the ExerciseOption method with a Symbol that doesn't reference an Option contract.

    Order Quantity Less Than Lot Size

    The OrderResponseErrorCode.OrderQuantityLessThanLotSize (-30) error occurs when you place an order with a quantity that's less than the lot size of the security.

    To avoid this order response error, check if the order quantity is greater than or equal to the security lot size before you place an order.

    var lotSize = Securities[_symbol].SymbolProperties.LotSize;
    if (quantity >= lotSize)
    {
        MarketOrder(_symbol, quantity);
    }
    lot_size = self.Securities[self._symbol].SymbolProperties.LotSize
    if quantity >= lot_size:
        self.MarketOrder(self._symbol, quantity)

    Exceeds Shortable Quantity

    The OrderResponseErrorCode.ExceedsShortableQuantity (-31) error occurs when you place an order to short a security but the shortable provider of the brokerage model states there isn't enough shares to borrow. For a full example of this error, clone and run this backtest .

    To avoid this order response error, check if there are enough shares available before you place an order to short a security.

    var availableToBorrow = BrokerageModel.GetShortableProvider().ShortableQuantity(_symbol, Time);
    if (availableToBorrow == null || quantityToBorrow <= availableToBorrow)
    {
        MarketOrder(_symbol, -quantityToBorrow);
    }
    available_to_borrow = self.BrokerageModel.GetShortableProvider().ShortableQuantity(self._symbol, self.Time)
    if available_to_borrow == None or quantity_to_borrow <= available_to_borrow:
        self.MarketOrder(self._symbol, -quantity_to_borrow)

    Invalid New Order Status

    The OrderResponseErrorCode.InvalidNewOrderStatus (-32) error occurs in live trading when you try to update or cancel an order while it still has OrderStatus.New status.

    To avoid this order response error, check the Status property of the order ticket or order event before you update or cancel an order.

    if (_orderTicket.Status != OrderStatus.New)
    {
        _orderTicket.Cancel();
    }
    if self.order_ticket.status != OrderStatus.NEW:
        self.order_ticket.cancel()

    European Option Not Expired on Exercise

    The OrderResponseErrorCode.EuropeanOptionNotExpiredOnExercise (-33) error occurs when you try to exercise a European Option contract before its expiry date.

    To avoid this order response error, check the type and expiry date of the contract before you exercise it.

    if (_contractSymbol.ID.OptionStyle == OptionStyle.European && _contractSymbol.ID.Date == Time.Date)
    {
        ExerciseOption(_contractSymbol, quantity);
    }
    if self.contract_symbol.ID.OptionStyle == OptionStyle.European && self.contract_symbol.ID.Date == self.Time.Date:
        self.ExerciseOption(self.contract_symbol, quantity)

    Option Order on Stock Split

    The OrderResponseErrorCode.OptionOrderOnStockSplit (-34) error occurs when you try to submit an order for an Equity Option contract when the current time slice contains a split for the underlying Equity.

    To avoid this order response error, check if the time slice has a split event for the underlying Equity of the contract before you place an order for the contract.

    if (!slice.Splits.ContainsKey(_contractSymbol.Underlying))
    {
        MarketOrder(_contractSymbol, quantity);
    }
    if self.contract_symbol.underlying not in slice.splits:
        self.market_order(self.contract_symbol, quantity)

     

    Trading and Orders

    Trade Statistics

    Introduction

    The TradeBuilder tracks the trades of your algorithm and calculates some statistics. You can adjust how it defines a trade and how it matches offsetting order fills.

    Set Trade Builder

    To set the TradeBuilder , in the Initialize initialize method, call the SetTradeBuilder set_trade_builder method.

    SetTradeBuilder(new TradeBuilder(groupingMethod, matchingMethod));
    self.set_trade_builder(TradeBuilder(grouping_method, matching_method))

    The following table describes the arguments the TradeBuilder constructor accepts:

    Argument Data Type Description Default Value
    groupingMethod grouping_method FillGroupingMethod The method used to group order fills into trades
    matchingMethod matching_method FillMatchingMethod The method used to match offsetting order fills

    The FillGroupingMethod enumeration has the following members:

    The FillMatchingMethod enumeration has the following members:

    Default Behavior

    The default TradeBuilder uses FillGroupingMethod.FillToFill FillGroupingMethod.FILL_TO_FILL and FillMatchingMethod.FIFO .

    Check Open Positions

    To check if you have a position open for a security as defined by the FillGroupingMethod , call the HasOpenPosition has_open_position method.

    var hasOpenPosition = TradeBuilder.HasOpenPosition(_symbol);
    has_open_position = self.trade_builder.has_open_position(self._symbol)

    Get Closed Trades

    To get your closed trades, use the ClosedTrades closed_trades property.

    var trades = TradeBuilder.ClosedTrades;
    trades = self.trade_builder.closed_trades

    This property returns a list of Trade objects, which have the following attributes:

     

    Trading and Orders

    Trading Calendar

    Introduction

    The TradingCalendar trading_calendar contains a variety of events relevant to the assets in your algorithm. We source the event data from Quantlib .

    Trading Day Properties

    TradingDay objects represent the trading events of a single day. They have the following properties:

    Get a Single Trading Day

    To get the trading events of the current day, call the GetTradingDay get_trading_day method with no arguments.

    var tradingDay = TradingCalendar.GetTradingDay();
    trading_day = self.trading_calendar.get_trading_day()

    To get the trading events of a specific day, pass a DateTime datetime object to the GetTradingDay get_trading_day method.

    var tradingDay = TradingCalendar.GetTradingDay(new DateTime(2022, 6, 1));
    trading_day = self.trading_calendar.get_trading_day(datetime(2022, 6, 1))

    Get Trading Days

    To get all the trading events across a range of dates, pass start and end DateTime datetime objects to the GetTradingDays get_trading_days method.

    var startDate = new DateTime(2022, 6, 1);
    var endDate = new DateTime(2022, 7, 1);
    var tradingDays = TradingCalendar.GetTradingDays(startDate, endDate);
    start_date = datetime(2022, 6, 1)
    end_date = datetime(2022, 7, 1)
    trading_days = self.trading_calendar.get_trading_days(start_date, end_date)

    To get specific trading events across a range of dates, pass a TradingDayType enumeration member and the dates to the GetDaysByType get_days_by_type method.

    var tradingDays = TradingCalendar.GetDaysByType(TradingDayType.OptionExpiration, startDate, endDate);
    trading_days = self.TradingCalendar.get_days_by_type(TradingDayType.OPTION_EXPIRATION, start_date, end_date)

    The TradingDayType enumeration has the following members:

     

    Trading and Orders

    Financial Advisors

    Introduction

    Financial Advisor accounts enable certified professionals to use a single trading algorithm to manage several client accounts. Our Interactive Brokers integration enables you to place FA group orders if your IB account code starts with F, FA, or I.

    Group Routing

    To place trades using a subset of client accounts, create Account Groups in Trader Workstation and then define the InteractiveBrokersOrderProperties when you create orders.

    DefaultOrderProperties = new InteractiveBrokersOrderProperties
    {
        FaGroup = "TestGroupEQ",
        FaMethod = "EqualQuantity",
        Account = "DU123456"
    };
    self.default_order_properties = InteractiveBrokersOrderProperties()
    self.default_order_properties.fa_group = "TestGroupEQ"
    self.default_order_properties.fa_method = "EqualQuantity"
    self.default_order_properties.account = "DU123456"

    SecurityHolding objects aggregate your positions across all the account groups. If you have two groups where group A has 10 shares of SPY and group B has -10 shares of SPY, then self.portfolio["SPY"].quantity Portfolio["SPY"].Quantity is zero.

    Allocation Methods

    LEAN supports several allocation methods for FA group orders. If you intend to use the same group allocation method for every order, set the DefaultOrderProperties default_order_properties of your algorithm, which sets the order properties for all of your orders.

    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new InteractiveBrokersOrderProperties()
        {
            FaGroup = "TestGroupEQ",
            FaMethod = "EqualQuantity",
            Account = "DU123456"
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);  
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = InteractiveBrokersOrderProperties()
        self.default_order_properties.fa_group = "TestGroupEQ"
        self.default_order_properties.fa_method = "EqualQuantity"
        self.default_order_properties.account = "DU123456"
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);

    To adjust the order properties of an order, change the DefaultOrderProperties default_order_properties or pass an order properties object to the order method . The following sections explain the FA group allocation methods.

    Equal Quantity

    This group allocation method distributes shares equally between all accounts in the group. When you use this method, you need to specify an order quantity.

    For example, say your Account Group includes four accounts and you place an order to buy 400 shares of a stock. In this case, each account receives 100 shares. If your Account Group includes six accounts, each account receives 66 shares, and then 1 share is allocated to each account until all are distributed. After you submit the order, your algorithm receives order events to track the order progress. When all the shares are bought, the order status is OrderStatus.Filled OrderStatus.FILLED . If one of the accounts in the group can't afford 10 of the shares it needs to buy, 10 shares are cancelled and you'll only end up buying 390 shares in total.

    LimitOrder(
        _symbol, quantity, limitPrice, 
        orderProperties: new InteractiveBrokersOrderProperties
        { 
            FaMethod = "EqualQuantity" 
        }
    );
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.fa_method = "EqualQuantity"
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Net Liquidation Value

    This group allocation method distributes shares based on the net liquidation value of each account. The system calculates ratios based on the net liquidation value in each account and allocates shares based on these ratios. When you use this method, you need to specify an order quantity.

    For example, say your account group includes three accounts, A, B and C with Net Liquidation values of $25,000, $50,000 and $100,000, respectively. In this case, the system calculates a ratio of 1:2:4. If you place an order for 700 shares of a stock, it allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.

    LimitOrder(_symbol, quantity, limitPrice, 
        orderProperties: new InteractiveBrokersOrderProperties
        { 
            FaMethod = "NetLiq" 
        }
    );
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.fa_method = "NetLiq"
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Available Equity

    This group allocation method distributes shares based on the amount of available equity in each account. The system calculates ratios based on the available equity in each account and allocates shares based on these ratios. When you use this method, you need to specify an order quantity.

    For example, say your account group includes three accounts, A, B and C with available equity of $25,000, $50,000 and $100,000, respectively. In this case, the system calculates a ratio of 1:2:4. If you place an order for 700 shares of a stock, it allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.

    LimitOrder(_symbol, quantity, limitPrice, 
        orderProperties: new InteractiveBrokersOrderProperties
        { 
            FaMethod = "AvailableEquity" 
        }
    );
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.fa_method = "AvailableEquity"
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Subscription Requirements

    To use FA group orders through our Interactive Brokers integration, you need to connect as a member of a Trading Firm and Institution organization. If you aren't currently on either of these tiers, upgrade your organization .

     

    Reality Modeling

    Reality Modeling

    Key Concepts

    Introduction

    Reality models make backtests as realistic as possible to how the strategy would perform in live trading. These reality models model the behavior of things like the portfolio, brokerage, fills, slippage, options, and strategy capacity . Some reality models are set on a security basis and some are set at the portfolio level. The default models assume you trade highly liquid assets. If you trade high volumes or on illiquid assets, you should create custom reality models to be more realistic.

    Security Level Models

    LEAN's philosophy is to make the models customizable per security as much as possible. The following models are security-level models:

    To set a security-level reality model, call the set reality model method on the Security object. To get the correct method, see the preceding documentation page for each type of model.

    // Set IBM to have a constant $1 transaction fee 
    Securities["IBM"].SetFeeModel(new ConstantFeeModel(1)); 
    # Set IBM to have a constant $1 transaction fee
    self.securities["IBM"].set_fee_model(ConstantFeeModel(1))

    You can also set the security-specific models inside a security initializer .

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite some of the reality models        
            security.SetFeeModel(new ConstantFeeModel(1));    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite some of the reality models        
            security.set_fee_model(ConstantFeeModel(1))

    Portfolio Level Models

    A portfolio is a semi-closed system where the state updates over time as the value and quantity of assets in the portfolio fluctuate. It's a semi-closed system because the portfolio usually incurs transaction fees and you can add and deposit capital from the portfolio. LEAN models the portfolio holdings to track and update the average price of each asset with every transaction.

    You can set the following portfolio-level models:

     

    Reality Modeling

    Trade Fills

    Trade Fills

    Key Concepts

    Introduction

    A trade fill is the quantity and price at which your brokerage executes your order in the market. Fill models model how each type of order fills to accurately simulate the behavior of a real brokerage. Fill models determine the price and quantity of your fills, can incorporate spread costs, and work with the slippage model to add slippage into the fill price. If you trade US Equities, our built-in fill models can fill your orders at the official opening and closing auction prices .

    Set Models

    The brokerage model of your algorithm automatically sets the fill model for each security, but you can override it. To manually set the fill model of a security, call the SetFillModel set_fill_model method on the Security object.

    // In Initialize
    var security = AddEquity("SPY");
    security.SetFillModel(new ImmediateFillModel());
    # In Initialize
    security = self.add_equity("SPY")
    security.set_fill_model(ImmediateFillModel())

    You can also set the fill model in a security initializer . If your algorithm has a dynamic universe, use the security initializer technique. In order to initialize single security subscriptions with the security initializer, call SetSecurityInitializer set_security_initializer before you create the subscriptions.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite some of the reality models        
            security.SetFillModel(new ImmediateFillModel());    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite some of the reality models        
            security.set_fill_model(ImmediateFillModel())

    To view all the pre-built fill models, see Supported Models .

    Default Behavior

    The brokerage model of your algorithm automatically sets the fill model of each security. The default brokerage model is the DefaultBrokerageModel , which sets the EquityFillModel for Equities, the FutureFillModel for Futures, the FutureOptionFillModel for Future Options, and the ImmediateFillModel for all other asset classes.

    Model Structure

    Fill Models should extend the FillModel class. To implement your own fill model, override the methods in the FillModel class you wish to change. The class has a dedicated method for each order type. Most of the methods receive a Security and Order object and return an OrderEvent object that contains information about the order status, fill quantity, and errors.

    // In the Initialize method, set the custom fill model
    security.SetFillModel(new MyFillModel());
    	
    // Define the custom fill model outside of the algorithm
    public class MyFillModel : FillModel {
    
        public override OrderEvent MarketFill(Security asset, MarketOrder order) {
            return base.MarketFill(asset, order);
        }
    
        public override OrderEvent LimitFill(Security asset, LimitOrder order) {
            return base.LimitFill(asset, order);
        }
    
        public override OrderEvent LimitIfTouchedFill(Security asset, LimitIfTouchOrder order) {
            return base.LimitIfTouchedFill(asset, order);
        }
    
        public override OrderEvent StopMarketFill(Security asset, StopMarketOrder order) {
            return base.StopMarketFill(asset, order);
        }
    
        public override OrderEvent StopLimitFill(Security asset, StopLimitOrder order) {
            return base.StopLimitFill(asset, order);
        }
    
        public override OrderEvent TrailingStopFill(Security asset, TrailingStopOrder order) {
    	    return TrailingStopFill(asset, order);
        }
    
        public override OrderEvent MarketOnOpenFill(Security asset, MarketOnOpenOrder order) {
            return base.MarketOnOpenFill(asset, order);
        }
    
        public override OrderEvent MarketOnCloseFill(Security asset, MarketOnCloseOrder order) {
            return base.MarketOnCloseFill(asset, order);
        }
    
        public override List<OrderEvent> ComboMarketFill(Order order, FillModelParameters parameters) {
            return base.ComboMarketFill(order, parameters);
        }
    
        public override List<OrderEvent> ComboLimitFill(Order order, FillModelParameters parameters) {
            return base.ComboLimitFill(order, parameters);
        }
    
        public override List<OrderEvent> ComboLegLimitFill(Order order, FillModelParameters parameters) {
            return base.ComboLegLimitFill(order, parameters);
        }
    }
    
    # In the Initialize method, set the custom fill model
    security.set_fill_model(MyFillModel())
    
    # Define the custom fill model outside of the algorithm
    class MyFillModel(FillModel):
    
        def market_fill(self, asset: Security, order: MarketOrder) -> OrderEvent:
            return super().market_fill(asset, order)
    
        def limit_fill(self, asset: Security, order: LimitOrder) -> OrderEvent:
            return super().limit_fill(asset, order)
    
        def limit_if_touched_fill(self, asset: Security, order: LimitIfTouchedOrder) -> OrderEvent:
            return super().limit_if_touched_fill(asset, order)
    
        def stop_market_fill(self, asset: Security, order: StopMarketOrder) -> OrderEvent:
            return super().stop_market_fill(asset, order)
    
        def stop_limit_fill(self, asset: Security, order: StopLimitOrder) -> OrderEvent:
            return super().stop_limit_fill(asset, order)
    
        def trailing_stop_fill(self, asset: Security, order: TrailingStopOrder) -> OrderEvent:
            return super().trailing_stop_fill(asset, order)
    
        def market_on_open_fill(self, asset: Security, order: MarketOnOpenOrder) -> OrderEvent:
            return super().market_on_open_fill(asset, order)
    
        def market_on_close_fill(self, asset: Security, order: MarketOnCloseOrder) -> OrderEvent:
            return super().market_on_close_fill(asset, order)
    
        def combo_market_fill(self, order: Order, parameters: FillModelParameters) -> List[OrderEvent]:
            return super().combo_market_fill(order, parameters)
        
        def combo_limit_fill(self, order: Order, parameters: FillModelParameters) -> List[OrderEvent]:
            return super().combo_limit_fill(order, parameters)
        
        def combo_leg_limit_fill(self, order: Order, parameters: FillModelParameters) -> List[OrderEvent]:
            return super().combo_leg_limit_fill(order, parameters)
    

    For a full example algorithm, see this backtest this backtest .

    The FillModelParameters class has the following properties:

    Partial Fills

    In live trading, your orders can partially fill. For example, if you have a buy limit order at the bid price for 100 shares and someone sells 10 shares with a market order, your order is partially filled. In backtests, the pre-built fill models assume orders completely fill. To simulate partial fills in backtests, create a custom fill model.

    Stale Fills

    Stale fills occur when you fill an order with price data that is timestamped an hour or more into the past. Stale fills usually only occur if you trade illiquid assets or if your algorithm uses daily data but you trade intraday with Scheduled Events. If your order is filled with stale data, the fill price may not be realistic. The pre-built fill models can only fill market orders with stale data. To adjust the length of time that needs to pass before an order is considered stale, set the StalePriceTimeSpan stale_price_time_span setting.

    Settings.StalePriceTimeSpan = TimeSpan.FromMinutes(10);
    self.settings.stale_price_time_span = timedelta(minutes=10)

    Examples

    Demonstration Algorithms
    CustomModelsAlgorithm.py Python CustomPartialFillModelAlgorithm.py Python ComboOrdersFillModelAlgorithm.py Python ForwardDataOnlyFillModelAlgorithm.py Python CustomModelsAlgorithm.cs C# CustomPartialFillModelAlgorithm.cs C# ComboOrdersFillModelAlgorithm.cs C# ForwardDataOnlyFillModelAlgorithm.cs C#

     

    Trade Fills

    Supported Models

    Fill models determine the price and quantity of your fills. The following fill models are available:

    See Also

    Reality Modeling
    Order Types

     

    Supported Models

    Equity Model

    Introduction

    The EquityFillModel is the default fill model if you trade Equity assets with the DefaultBrokerageModel . This fill model fills trades completely and immediately.

    security.SetFillModel(new EquityFillModel());
    security.set_fill_model(EquityFillModel())

    The fill logic of each order depends on the order type, the data format of the security subscription, and the order direction. The following sections explain the fill logic of each order given these factors.

    To view the implementation of this model, see the LEAN GitHub repository .

    Market Orders

    The model fills buy market orders at the best effort ask price plus slippage and fills sell market orders at the best effort bid price minus slippage.

    To get the best effort bid price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a buy quote, use the bid price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing bid price of the most recent QuoteBar .

    To get the best effort ask price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a sell quote, use the ask price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing ask price of the most recent QuoteBar .

    If neither of the preceding procedures yield a result, the model uses the following procedure to get the best effort bid or ask price:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a tick of type TickType.Trade , use the last trade price.
    2. If the subscription provides TradeBar data, use the closing bid price of the most recent QuoteBar .

    The model only fills market orders during regular trading hours.

    Limit Orders

    To fill limit orders, the model first gets the best effort TradeBar . To get the best effort TradeBar , the model checks the resolution of your security subscription. If your subscription provies Tick data, it gets the most recent batch of trade ticks and consolidates them to build a TradeBar . If your subscription provies TradeBar data, it gets the most recent TradeBar . If the EndTime end_time of the best effort TradeBar is less than or equal to the time you placed the order, the model waits until the next best effort TradeBar to fill the order.

    Once the model has a valid best effort TradeBar , it can fill the order. The following table shows the fill condition and fill price of limit orders. The model only fills the order once the fill condition is met.

    Order Direction Fill Condition Fill Price
    Buy low price < limit price min(open price, limit price)
    Sell high price > limit price max(open price, limit price)

    The model only fills limit orders when the exchange is open.

    The model won't fill limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Limit if Touched Orders

    To fill limit if touched orders, the model first gets the best effort TradeBar . To get the best effort TradeBar , the model checks the resolution of your security subscription. If your subscription provies Tick data, it gets the most recent batch of trade ticks and consolidates them to build a TradeBar . If your subscription provies TradeBar data, it gets the most recent TradeBar . If the EndTime end_time of the best effort TradeBar is less than or equal to the time you placed the order, the model waits until the next best effort TradeBar to fill the order.

    After the model has a valid best effort TradeBar , it can check if the trigger price has been touched. The following table describes the trigger condition of limit if touched orders for each order direction:

    Order Direction Trigger Condition
    Buy low price <= trigger price
    Sell high price >= trigger price

    Once the limit if touched order triggers, the model starts to check if it should fill the order. The following table shows the fill condition and fill price of limit if touched orders. The model only fills the order once the fill condition is met

    Order Direction Fill Condition Fill Price
    Buy Best effort ask price <= limit price
    min(best effort ask price, limit price)
    Sell Best effort bid price >= limit price
    max(best effort bid price, limit price)

    To get the best effort bid price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a buy quote, use the bid price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing bid price of the most recent QuoteBar .

    To get the best effort ask price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a sell quote, use the ask price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing ask price of the most recent QuoteBar .

    If neither of the preceding procedures yield a result, the model uses the following procedure to get the best effort bid or ask price:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a tick of type TickType.Trade , use the last trade price.
    2. If the subscription provides TradeBar data, use the closing bid price of the most recent QuoteBar .

    The model only fills limit orders when the exchange is open.

    The model won't trigger or fill limit if touched orders with stale data .

    Stop Market Orders

    To fill stop market orders, the model first gets the best effort TradeBar . To get the best effort TradeBar , the model checks the resolution of your security subscription. If your subscription provies Tick data, it gets the most recent batch of trade ticks and consolidates them to build a TradeBar . If your subscription provies TradeBar data, it gets the most recent TradeBar . If the EndTime end_time of the best effort TradeBar is less than or equal to the time you placed the order, the model waits until the next best effort TradeBar to fill the order.

    Once the stop condition is met, the model fills the orders and sets the fill price.

    Once the model has a valid best effort TradeBar , it can fill the order. The following table shows the stop condition and fill price of stop market orders. The model only fills the order once the stop condition is met.

    Order Direction Fill Condition Fill Price
    Buy high price >= stop price max(open price, stop price) + slippage
    Sell low price <= stop price min(open price, stop price) - slippage

    The model only fills stop market orders during regular trading hours.

    The model won't fill stop market orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Stop Limit Orders

    The fill logic of stop limit orders depends on the data format of the security subscription and the order direction. The following table shows the fill price of stop limit orders given these factors. To determine the fill price of the order, the fill model first checks the most recent tick for the security. If your security subscription doesn't provide tick data, the fill model checks the most recent QuoteBar . If your security subscription doesn't provide quote data, the fill model checks the most recent TradeBar .

    The following table describes how the fill model processes the order given the data format and order direction. Once the stop condition is met, the model starts to check the fill condition. Once the fill condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Condition Fill Price
    Tick Quote Buy quote price > stop price quote price < limit price min(quote price, limit price)
    Tick Quote Sell quote price < stop price quote price > limit price max(quote price, limit price)
    Tick Trade Buy trade price > stop price trade price < limit price min(trade price, limit price)
    Tick Trade Sell trade price < stop price trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy ask high price > stop price ask close price < limit price min(ask high price, limit price)
    QuoteBar
    Sell bid low price < stop price bid close price > limit price max(bid low price, limit price)
    TradeBar
    Buy high price > stop price close price < limit price min(high price, limit price)
    TradeBar
    Sell low price < stop price close price > limit price max(low price, limit price)

    The model won't fill stop limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    The model only fills stop limit orders when the exchange is open.

    Trailing Stop Orders

    To fill trailing stop orders, the model first gets the best effort TradeBar . To get the best effort TradeBar , the model checks the resolution of your security subscription. If your subscription provies Tick data, it gets the most recent batch of trade ticks and consolidates them to build a TradeBar . If your subscription provies TradeBar data, it gets the most recent TradeBar . If the EndTime end_time of the best effort TradeBar is less than or equal to the time you placed the order, the model waits until the next best effort TradeBar to fill the order.

    Once the stop condition is met, the model fills the orders and sets the fill price.

    Once the model has a valid best effort TradeBar , it can fill the order. The following table shows the stop condition and fill price of trailing stop orders. The model only fills the order once the stop condition is met.

    Order Direction Fill Condition Fill Price
    Buy high price >= stop price max(open price, stop price) + slippage
    Sell low price <= stop price min(open price, stop price) - slippage

    While the stop condition is not met, the model updates the stop price under certain conditions. The following table shows the update condition and stop price value for currency-based trailing amounts:

    Order Direction Update Condition Stop Price
    Buy stop price - low price <= trailing amount low price + trailing amount
    Sell high price - stop price <= trailing amount high price - trailing amount

    The following table shows the update condition and stop price value for percentage-based trailing amounts:

    Order Direction Update Condition Stop Price
    Buy stop price - low price <= low price * trailing amount low price * (1 + trailing amount)
    Sell high price - stop price <= high price * trailing amount high price * (1 - trailing amount)

    The model only fills trailing stop orders during regular trading hours.

    The model won't fill trailing stop orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Market on Open Orders

    The following table describes the fill price of market on open orders for each data format and order direction:

    Data Format Order Direction Fill Price
    Tick Buy If the model receives the official opening auction price within one minute, the order fills at official open price + slippage. After one minute, the order fills at the most recent trade price + slippage. If the security doesn't trade within the first two minutes, the order fills at the best effort ask price + slippage.
    Tick Sell If the model receives the official opening auction price within one minute, the order fills at the official open price - slippage. After one minute, the order fills at the most recent trade price - slippage. If the security doesn't trade within the first two minutes, the order fills at the best effort bid price - slippage.
    TradeBar Buy Open price + slippage
    TradeBar Sell Open price - slippage
    QuoteBar Buy Best effort ask price + slippage
    QuoteBar Sell Best effort bid price - slippage

    The model checks the data format in the following order:

    1. Tick
    2. TradeBar
    3. QuoteBar

    To get the best effort bid price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a buy quote, use the bid price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing bid price of the most recent QuoteBar .

    To get the best effort ask price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a sell quote, use the ask price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing ask price of the most recent QuoteBar .

    If neither of the preceding procedures yield a result, the model uses the following procedure to get the best effort bid or ask price:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a tick of type TickType.Trade , use the last trade price.
    2. If the subscription provides TradeBar data, use the closing bid price of the most recent QuoteBar .

    Market on Close Orders

    The following table describes the fill price of market on close orders for each data format and order direction:

    Data Format Order Direction Fill Price
    Tick Buy If the model receives the official closing auction price within one minute after the close, the order fills at official close price + slippage. After one minute, the order fills at the most recent trade price + slippage. If the security doesn't trade within the first two minutes, the order fills at the best effort ask price + slippage.
    Tick Sell If the model receives the official closing auction price within one minute after the close, the order fills at the official close price - slippage. After one minute, the order fills at the most recent trade price - slippage. If the security doesn't trade within the first two minutes after the close, the order fills at the best effort bid price - slippage.
    TradeBar Buy Open price + slippage
    TradeBar Sell Open price - slippage
    QuoteBar Buy Best effort ask price + slippage
    QuoteBar Sell Best effort bid price - slippage

    The model checks the data format in the following order:

    1. Tick
    2. TradeBar
    3. QuoteBar

    To get the best effort bid price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a buy quote, use the bid price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing bid price of the most recent QuoteBar .

    To get the best effort ask price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a sell quote, use the ask price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing ask price of the most recent QuoteBar .

    If neither of the preceding procedures yield a result, the model uses the following procedure to get the best effort bid or ask price:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a tick of type TickType.Trade , use the last trade price.
    2. If the subscription provides TradeBar data, use the closing bid price of the most recent QuoteBar .

    Combo Market Orders

    The fill logic of combo market orders depends on the data format of the security subscription and the order direction. The following table shows the fill price of combo market orders given these factors. To determine the fill price of the order, the fill model first checks the most recent tick for the security. If your security subscription doesn't provide tick data, the fill model checks the most recent QuoteBar . If your security subscription doesn't provide quote data, the fill model checks the most recent TradeBar .

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy Ask quote price + slippage
    Tick Quote Sell Bid quote price - slippage
    Tick Trade Buy Trade price + slippage
    Tick Trade Sell Trade price - slippage
    QuoteBar
    Buy Ask close price + slippage
    QuoteBar
    Sell Bid close price - slippage
    TradeBar
    Buy Close price + slippage
    TradeBar
    Sell Close price - slippage

    The model only fills combo market orders if all the following conditions are met:

    The fill quantity of each leg is the product of the leg order quantity and the combo market order quantity.

    Combo Limit Orders

    The fill logic of combo limit orders depends on the data format of the security subscription and the order direction. To determine the fill price of the order, the fill model first checks the most recent tick for the security. If your security subscription doesn't provide tick data, the fill model checks the most recent QuoteBar . If your security subscription doesn't provide quote data, the fill model checks the most recent TradeBar .

    To fill combo limit orders, the fill model calculates the aggregate price of the combo order, which is the sum of prices for each security in the order legs. The price of each security is a function of the data format and order direction. Legs with a positive order quantity increase the aggregate price and legs with a negative quantity decrease the aggregate price. The following table shows how the fill model calculates the security prices.

    Data Format TickType Combo Order Direction Leg Order Direction Price
    Tick Quote Buy or sell Buy Ask price
    Tick Quote Buy or sell Sell Bid price
    Tick Trade Buy or sell Buy or sell Trade price
    QuoteBar Buy Buy Ask low price
    QuoteBar Buy Sell Bid low price
    QuoteBar Sell Buy Ask high price
    QuoteBar Sell Sell Bid high price
    TradeBar Buy Buy or sell Low price
    TradeBar Sell Buy or sell High price

    After the fill model calculates the aggregate price of the combo order, it checks if it should fill the order. The following table describes the fill condition of the combo order and the fill price price of each leg:

    Data Format TickType Combo Order Direction Fill Condition Leg Order Direction Fill Price
    Tick Quote Buy Aggregate price < combo limit price Buy or sell Quote price
    Tick Quote Sell Aggregate price > combo limit price Buy or sell Quote price
    Tick Trade Buy Aggregate price < combo limit price Buy or sell Trade price
    Tick Trade Sell Aggregate price > combo limit price Buy or sell Trade price
    QuoteBar
    Buy Aggregate price < combo limit price Buy Ask low price
    QuoteBar
    Buy Aggregate price < combo limit price Sell Bid low price
    QuoteBar
    Sell Aggregate price > combo limit price Buy Ask high price
    QuoteBar
    Sell Aggregate price > combo limit price Sell Bid high price
    TradeBar
    Buy Aggregate price < combo limit price Buy or sell Low price
    TradeBar
    Sell Aggregate price > combo limit price Buy or sell High price

    The model only fills combo limit orders if the data isn't stale and all the legs can fill in the same time step after the order time step. The fill quantity of each leg is the product of the leg order quantity and the combo order quantity.

    Combo Leg Limit Orders

    The fill logic of combo leg limit orders depends on the data format of the security subscription and the order direction. The following table shows the fill price of combo leg limit orders given these factors. To determine the fill price of the order, the fill model first checks the most recent tick for the security. If your security subscription doesn't provide tick data, the fill model checks the most recent QuoteBar . If your security subscription doesn't provide quote data, the fill model checks the most recent TradeBar .

    The order direction in the table represents the order direction of the order leg, not the order direction of the combo order.

    Data Format TickType Order Direction Fill Condition Fill Price
    Tick Quote Buy Ask price < limit price min(ask price, limit price)
    Tick Quote Sell Bid price > limit price max(bid price, limit price)
    Tick Trade Buy Trade price < limit price min(trade price, limit price)
    Tick Trade Sell Trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy Ask low price < limit price min(ask high price, limit price)
    QuoteBar
    Sell Bid high price > limit price max(bid low price, limit price)
    TradeBar
    Buy Low price < limit price min(high price, limit price)
    TradeBar
    Sell High price > limit price max(low price, limit price)

    The model only fills combo leg limit orders if all the following conditions are met:

    The fill quantity is the product of the leg order quantity and the combo order quantity.

     

    Supported Models

    Future Model

    Introduction

    The FutureFillModel is the default fill model if you trade Futures contracts with the DefaultBrokerageModel . This fill model fills trades completely and immediately.

    security.SetFillModel(new FutureFillModel());
    security.set_fill_model(FutureFillModel())

    The fill logic of each order depends on the order type, the data format of the security subscription, and the order direction. The following tables show the fill price of each order given these factors. To determine the fill price of an order, the fill model first checks the most recent tick for the security. If your security subscription doesn't provide tick data, the fill model checks the most recent QuoteBar . If your security subscription doesn't provide quote data, the fill model checks the most recent TradeBar .

    To view the implementation of this model, see the LEAN GitHub repository .

    Market Orders

    The following table describes the fill price of market orders for each data format and order direction:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask close price + slippage
    QuoteBar
    Sell bid close price - slippage
    TradeBar
    Buy close price + slippage
    TradeBar
    Sell close price - slippage

    The model only fills market orders if the exchange is open and it immediately fills them. If your algorithm places a market order at 10 AM, it fills at 10 AM.

    Limit Orders

    The following table describes the fill logic of limit orders for each data format and order direction:

    Data Format TickType Order Direction Fill Condition Fill Price
    Tick Quote Buy quote price < limit price min(quote price, limit price)
    Tick Quote Sell quote price > limit price max(quote price, limit price)
    Tick Trade Buy trade price < limit price min(trade price, limit price)
    Tick Trade Sell trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy ask low price < limit price min(ask high price, limit price)
    QuoteBar
    Sell bid high price > limit price max(bid low price, limit price)
    TradeBar
    Buy low price < limit price min(high price, limit price)
    TradeBar
    Sell high price > limit price max(low price, limit price)

    The model won't fill limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Limit if Touched Orders

    The model converts a limit if touched order to a limit order when the trigger condition is met. The following table describes the trigger condition of limit if touched orders for each data format and order direction:

    Data Format TickType Order Direction Trigger Condition
    Tick Quote Buy quote price <= trigger price
    Tick Quote Sell quote price >= trigger price
    Tick Trade Buy trade price <= trigger price
    Tick Trade Sell trade price >= trigger price
    TradeBar
    Buy low price <= trigger price
    TradeBar
    Sell high price >= trigger price

    Once the limit if touched order triggers, to fill the order, the model checks the bid price for buy orders and the ask price for sell orders.

    To get the bid price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a buy quote, use the bid price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing bid price of the most recent QuoteBar .

    To get the ask price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a sell quote, use the ask price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing ask price of the most recent QuoteBar .

    If neither of the preceding procedures yield a result, the model uses the following procedure to get the bid or ask price:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a tick of type TickType.Trade , use the last trade price.
    2. If the subscription provides TradeBar data, use the closing bid price of the most recent QuoteBar .

    Buy orders fill when the bid price <= limit price and sell orders fill when the ask price >= limit price. The order fills at the limit price. The model won't trigger or fill limit if touched orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Stop Market Orders

    The following table describes the fill logic of stop market orders for each data format and order direction. Once the stop condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Price
    Tick Quote Buy quote price > stop price max(stop price, quote price + slippage)
    Tick Quote Sell quote price < stop price min(stop price, quote price - slippage)
    Tick Trade Buy trade price > stop price max(stop price, last trade price + slippage)
    Tick Trade Sell trade price < stop price min(stop price, last trade price - slippage)
    QuoteBar
    Buy ask high price > stop price max(stop price, ask close price + slippage)
    QuoteBar
    Sell bid low price < stop price min(stop price, bid close price - slippage)
    TradeBar
    Buy high price > stop price max(stop price, close price + slippage)
    TradeBar
    Sell low price < stop price min(stop price, close price - slippage)

    The model only fills stop market orders when the exchange is open.

    The model won't fill stop market orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Stop Limit Orders

    The following table describes the fill logic of stop limit orders for each data format and order direction. Once the stop condition is met, the model starts to check the fill condition. Once the fill condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Condition Fill Price
    Tick Quote Buy quote price > stop price quote price < limit price min(quote price, limit price)
    Tick Quote Sell quote price < stop price quote price > limit price max(quote price, limit price)
    Tick Trade Buy trade price > stop price trade price < limit price min(trade price, limit price)
    Tick Trade Sell trade price < stop price trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy ask high price > stop price ask close price < limit price min(ask high price, limit price)
    QuoteBar
    Sell bid low price < stop price bid close price > limit price max(bid low price, limit price)
    TradeBar
    Buy high price > stop price close price < limit price min(high price, limit price)
    TradeBar
    Sell low price < stop price close price > limit price max(low price, limit price)

    The model won't fill stop limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Trailing Stop Orders

    The following table describes the fill logic of trailing stop orders for each data format and order direction. Once the stop condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Price
    Tick Quote Buy quote price > stop price max(stop price, quote price + slippage)
    Tick Quote Sell quote price < stop price min(stop price, quote price - slippage)
    Tick Trade Buy trade price > stop price max(stop price, last trade price + slippage)
    Tick Trade Sell trade price < stop price min(stop price, last trade price - slippage)
    QuoteBar
    Buy ask high price > stop price max(stop price, ask close price + slippage)
    QuoteBar
    Sell bid low price < stop price min(stop price, bid close price - slippage)
    TradeBar
    Buy high price > stop price max(stop price, close price + slippage)
    TradeBar
    Sell low price < stop price min(stop price, close price - slippage)

    While the stop condition is not met, the model updates the stop price under certain conditions. The following table shows the update condition and stop price value for currency-based trailing amounts:

    Data Format TickType Order Direction Update Condition Stop Price
    Tick Quote Buy stop price - quote price <= trailing amount quote price + trailing amount
    Tick Quote Sell quote price - stop price <= trailing amount quote price - trailing amount
    Tick Trade Buy stop price - trade price <= trailing amount trade price + trailing amount
    Tick Trade Sell trade price - stop price <= trailing amount trade price - trailing amount
    QuoteBar
    Buy stop price - ask low price <= trailing amount ask low price + trailing amount
    QuoteBar
    Sell bid high price - stop price <= trailing amount bid high price - trailing amount
    TradeBar
    Buy stop price - low price <= trailing amount low price + trailing amount
    TradeBar
    Sell high price - stop price <= trailing amount high price - trailing amount

    The following table shows the update condition and stop price value for percentage-based trailing amounts.

    Data Format TickType Order Direction Update Condition Stop Price
    Tick Quote Buy stop price - quote price <= quote price * trailing amount quote price * (1 + trailing amount)
    Tick Quote Sell quote price - stop price <= quote price * trailing amount quote price * (1 - trailing amount)
    Tick Trade Buy stop price - trade price <= trade price * trailing amount trade price * (1 + trailing amount)
    Tick Trade Sell trade price - stop price <= trade price * trailing amount trade price * (1 - trailing amount)
    QuoteBar
    Buy stop price - ask low price <= ask low price * trailing amount ask low price * (1 + trailing amount)
    QuoteBar
    Sell bid high price - stop price <= bid high price * trailing amount bid high price * (1 - trailing amount)
    TradeBar
    Buy stop price - low price <= stop price * trailing amount low price * (1 + trailing amount)
    TradeBar
    Sell high price - stop price <= high price * trailing amount high price * (1 - trailing amount)

    The model only fills trailing stop orders when the exchange is open.

    The model won't fill trailing stop orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Market on Open Orders

    The following table describes the fill price of market on open orders for each data format and order side:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask open price + slippage
    QuoteBar
    Sell bid open price - slippage
    TradeBar
    Buy open price + slippage
    TradeBar
    Sell open price - slippage

    The model won't fill market on open orders during pre-market hours.

    The model won't fill market on open orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Market on Close Orders

    The following table describes the fill price of market on close orders for each data format and order side:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask close price + slippage
    QuoteBar
    Sell bid close price - slippage
    TradeBar
    Buy close price + slippage
    TradeBar
    Sell close price - slippage

    The model won't fill market on close orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Combo Market Orders

    The following table describes the fill price of combo market orders for each data format and order direction:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy Ask quote price + slippage
    Tick Quote Sell Bid quote price - slippage
    Tick Trade Buy Trade price + slippage
    Tick Trade Sell Trade price - slippage
    QuoteBar
    Buy Ask close price + slippage
    QuoteBar
    Sell Bid close price - slippage
    TradeBar
    Buy Close price + slippage
    TradeBar
    Sell Close price - slippage

    The model only fills combo market orders if all the following conditions are met:

    The fill quantity of each leg is the product of the leg order quantity and the combo market order quantity.

    Combo Limit Orders

    To fill combo limit orders, the fill model calculates the aggregate price of the combo order, which is the sum of prices for each security in the order legs. The price of each security is a function of the data format and order direction. Legs with a positive order quantity increase the aggregate price and legs with a negative quantity decrease the aggregate price. The following table shows how the fill model calculates the security prices.

    Data Format TickType Combo Order Direction Leg Order Direction Price
    Tick Quote Buy or sell Buy Ask price
    Tick Quote Buy or sell Sell Bid price
    Tick Trade Buy or sell Buy or sell Trade price
    QuoteBar Buy Buy Ask low price
    QuoteBar Buy Sell Bid low price
    QuoteBar Sell Buy Ask high price
    QuoteBar Sell Sell Bid high price
    TradeBar Buy Buy or sell Low price
    TradeBar Sell Buy or sell High price

    After the fill model calculates the aggregate price of the combo order, it checks if it should fill the order. The following table describes the fill condition of the combo order and the fill price price of each leg:

    Data Format TickType Combo Order Direction Fill Condition Leg Order Direction Fill Price
    Tick Quote Buy Aggregate price < combo limit price Buy or sell Quote price
    Tick Quote Sell Aggregate price > combo limit price Buy or sell Quote price
    Tick Trade Buy Aggregate price < combo limit price Buy or sell Trade price
    Tick Trade Sell Aggregate price > combo limit price Buy or sell Trade price
    QuoteBar
    Buy Aggregate price < combo limit price Buy Ask low price
    QuoteBar
    Buy Aggregate price < combo limit price Sell Bid low price
    QuoteBar
    Sell Aggregate price > combo limit price Buy Ask high price
    QuoteBar
    Sell Aggregate price > combo limit price Sell Bid high price
    TradeBar
    Buy Aggregate price < combo limit price Buy or sell Low price
    TradeBar
    Sell Aggregate price > combo limit price Buy or sell High price

    The model only fills combo limit orders if the data isn't stale and all the legs can fill in the same time step after the order time step. The fill quantity of each leg is the product of the leg order quantity and the combo order quantity.

    Combo Leg Limit Orders

    The following table describes the fill logic of combo leg limit orders for each data format and order direction. The order direction in the table represents the order direction of the order leg, not the order direction of the combo order.

    Data Format TickType Order Direction Fill Condition Fill Price
    Tick Quote Buy Ask price < limit price min(ask price, limit price)
    Tick Quote Sell Bid price > limit price max(bid price, limit price)
    Tick Trade Buy Trade price < limit price min(trade price, limit price)
    Tick Trade Sell Trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy Ask low price < limit price min(ask high price, limit price)
    QuoteBar
    Sell Bid high price > limit price max(bid low price, limit price)
    TradeBar
    Buy Low price < limit price min(high price, limit price)
    TradeBar
    Sell High price > limit price max(low price, limit price)

    The model only fills combo leg limit orders if all the following conditions are met:

    The fill quantity is the product of the leg order quantity and the combo order quantity.

     

    Supported Models

    Future Option Model

    Introduction

    The FutureOptionFillModel is the default fill model if you trade Future Option contracts with the DefaultBrokerageModel . This fill model fills trades completely and immediately.

    security.SetFillModel(new FutureOptionFillModel());
    security.set_fill_model(FutureOptionFillModel())

    The fill logic of each order depends on the order type, the data format of the security subscription, and the order direction. The following tables show the fill price of each order given these factors. To determine the fill price of an order, the fill model first checks the most recent tick for the security. If your security subscription doesn't provide tick data, the fill model checks the most recent QuoteBar . If your security subscription doesn't provide quote data, the fill model checks the most recent TradeBar .

    To view the implementation of this model, see the LEAN GitHub repository .

    Market Orders

    The following table describes the fill price of market orders for each data format and order direction:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask close price + slippage
    QuoteBar
    Sell bid close price - slippage
    TradeBar
    Buy close price + slippage
    TradeBar
    Sell close price - slippage

    The model only fills market orders if the exchange is open and it immediately fills them. If your algorithm places a market order at 10 AM, it fills at 10 AM.

    Limit Orders

    The following table describes the fill logic of limit orders for each data format and order direction:

    Data Format TickType Order Direction Fill Condition Fill Price
    Tick Quote Buy quote price < limit price min(quote price, limit price)
    Tick Quote Sell quote price > limit price max(quote price, limit price)
    Tick Trade Buy trade price < limit price min(trade price, limit price)
    Tick Trade Sell trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy ask low price < limit price min(ask high price, limit price)
    QuoteBar
    Sell bid high price > limit price max(bid low price, limit price)
    TradeBar
    Buy low price < limit price min(high price, limit price)
    TradeBar
    Sell high price > limit price max(low price, limit price)

    The model won't fill limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Limit if Touched Orders

    The model converts a limit if touched order to a limit order when the trigger condition is met. The following table describes the trigger condition of limit if touched orders for each data format and order direction:

    Data Format TickType Order Direction Trigger Condition
    Tick Quote Buy quote price <= trigger price
    Tick Quote Sell quote price >= trigger price
    Tick Trade Buy trade price <= trigger price
    Tick Trade Sell trade price >= trigger price
    TradeBar
    Buy low price <= trigger price
    TradeBar
    Sell high price >= trigger price

    Once the limit if touched order triggers, to fill the order, the model checks the bid price for buy orders and the ask price for sell orders.

    To get the bid price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a buy quote, use the bid price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing bid price of the most recent QuoteBar .

    To get the ask price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a sell quote, use the ask price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing ask price of the most recent QuoteBar .

    If neither of the preceding procedures yield a result, the model uses the following procedure to get the bid or ask price:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a tick of type TickType.Trade , use the last trade price.
    2. If the subscription provides TradeBar data, use the closing bid price of the most recent QuoteBar .

    Buy orders fill when the bid price <= limit price and sell orders fill when the ask price >= limit price. The order fills at the limit price. The model won't trigger or fill limit if touched orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Stop Market Orders

    The following table describes the fill logic of stop market orders for each data format and order direction. Once the stop condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Price
    Tick Quote Buy quote price > stop price max(stop price, quote price + slippage)
    Tick Quote Sell quote price < stop price min(stop price, quote price - slippage)
    Tick Trade Buy trade price > stop price max(stop price, last trade price + slippage)
    Tick Trade Sell trade price < stop price min(stop price, last trade price - slippage)
    QuoteBar
    Buy ask high price > stop price max(stop price, ask close price + slippage)
    QuoteBar
    Sell bid low price < stop price min(stop price, bid close price - slippage)
    TradeBar
    Buy high price > stop price max(stop price, close price + slippage)
    TradeBar
    Sell low price < stop price min(stop price, close price - slippage)

    The model only fills stop market orders when the exchange is open.

    The model won't fill stop market orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Stop Limit Orders

    The following table describes the fill logic of stop limit orders for each data format and order direction. Once the stop condition is met, the model starts to check the fill condition. Once the fill condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Condition Fill Price
    Tick Quote Buy quote price > stop price quote price < limit price min(quote price, limit price)
    Tick Quote Sell quote price < stop price quote price > limit price max(quote price, limit price)
    Tick Trade Buy trade price > stop price trade price < limit price min(trade price, limit price)
    Tick Trade Sell trade price < stop price trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy ask high price > stop price ask close price < limit price min(ask high price, limit price)
    QuoteBar
    Sell bid low price < stop price bid close price > limit price max(bid low price, limit price)
    TradeBar
    Buy high price > stop price close price < limit price min(high price, limit price)
    TradeBar
    Sell low price < stop price close price > limit price max(low price, limit price)

    The model won't fill stop limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Trailing Stop Orders

    The following table describes the fill logic of trailing stop orders for each data format and order direction. Once the stop condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Price
    Tick Quote Buy quote price > stop price max(stop price, quote price + slippage)
    Tick Quote Sell quote price < stop price min(stop price, quote price - slippage)
    Tick Trade Buy trade price > stop price max(stop price, last trade price + slippage)
    Tick Trade Sell trade price < stop price min(stop price, last trade price - slippage)
    QuoteBar
    Buy ask high price > stop price max(stop price, ask close price + slippage)
    QuoteBar
    Sell bid low price < stop price min(stop price, bid close price - slippage)
    TradeBar
    Buy high price > stop price max(stop price, close price + slippage)
    TradeBar
    Sell low price < stop price min(stop price, close price - slippage)

    While the stop condition is not met, the model updates the stop price under certain conditions. The following table shows the update condition and stop price value for currency-based trailing amounts:

    Data Format TickType Order Direction Update Condition Stop Price
    Tick Quote Buy stop price - quote price <= trailing amount quote price + trailing amount
    Tick Quote Sell quote price - stop price <= trailing amount quote price - trailing amount
    Tick Trade Buy stop price - trade price <= trailing amount trade price + trailing amount
    Tick Trade Sell trade price - stop price <= trailing amount trade price - trailing amount
    QuoteBar
    Buy stop price - ask low price <= trailing amount ask low price + trailing amount
    QuoteBar
    Sell bid high price - stop price <= trailing amount bid high price - trailing amount
    TradeBar
    Buy stop price - low price <= trailing amount low price + trailing amount
    TradeBar
    Sell high price - stop price <= trailing amount high price - trailing amount

    The following table shows the update condition and stop price value for percentage-based trailing amounts.

    Data Format TickType Order Direction Update Condition Stop Price
    Tick Quote Buy stop price - quote price <= quote price * trailing amount quote price * (1 + trailing amount)
    Tick Quote Sell quote price - stop price <= quote price * trailing amount quote price * (1 - trailing amount)
    Tick Trade Buy stop price - trade price <= trade price * trailing amount trade price * (1 + trailing amount)
    Tick Trade Sell trade price - stop price <= trade price * trailing amount trade price * (1 - trailing amount)
    QuoteBar
    Buy stop price - ask low price <= ask low price * trailing amount ask low price * (1 + trailing amount)
    QuoteBar
    Sell bid high price - stop price <= bid high price * trailing amount bid high price * (1 - trailing amount)
    TradeBar
    Buy stop price - low price <= stop price * trailing amount low price * (1 + trailing amount)
    TradeBar
    Sell high price - stop price <= high price * trailing amount high price * (1 - trailing amount)

    The model only fills trailing stop orders when the exchange is open.

    The model won't fill trailing stop orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Market on Open Orders

    The following table describes the fill price of market on open orders for each data format and order side:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask open price + slippage
    QuoteBar
    Sell bid open price - slippage
    TradeBar
    Buy open price + slippage
    TradeBar
    Sell open price - slippage

    The model won't fill market on open orders during pre-market hours.

    The model won't fill market on open orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Market on Close Orders

    The following table describes the fill price of market on close orders for each data format and order side:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask close price + slippage
    QuoteBar
    Sell bid close price - slippage
    TradeBar
    Buy close price + slippage
    TradeBar
    Sell close price - slippage

    The model won't fill market on close orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Combo Market Orders

    The following table describes the fill price of combo market orders for each data format and order direction:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy Ask quote price + slippage
    Tick Quote Sell Bid quote price - slippage
    Tick Trade Buy Trade price + slippage
    Tick Trade Sell Trade price - slippage
    QuoteBar
    Buy Ask close price + slippage
    QuoteBar
    Sell Bid close price - slippage
    TradeBar
    Buy Close price + slippage
    TradeBar
    Sell Close price - slippage

    The model only fills combo market orders if all the following conditions are met:

    The fill quantity of each leg is the product of the leg order quantity and the combo market order quantity.

    Combo Limit Orders

    To fill combo limit orders, the fill model calculates the aggregate price of the combo order, which is the sum of prices for each security in the order legs. The price of each security is a function of the data format and order direction. Legs with a positive order quantity increase the aggregate price and legs with a negative quantity decrease the aggregate price. The following table shows how the fill model calculates the security prices.

    Data Format TickType Combo Order Direction Leg Order Direction Price
    Tick Quote Buy or sell Buy Ask price
    Tick Quote Buy or sell Sell Bid price
    Tick Trade Buy or sell Buy or sell Trade price
    QuoteBar Buy Buy Ask low price
    QuoteBar Buy Sell Bid low price
    QuoteBar Sell Buy Ask high price
    QuoteBar Sell Sell Bid high price
    TradeBar Buy Buy or sell Low price
    TradeBar Sell Buy or sell High price

    After the fill model calculates the aggregate price of the combo order, it checks if it should fill the order. The following table describes the fill condition of the combo order and the fill price price of each leg:

    Data Format TickType Combo Order Direction Fill Condition Leg Order Direction Fill Price
    Tick Quote Buy Aggregate price < combo limit price Buy or sell Quote price
    Tick Quote Sell Aggregate price > combo limit price Buy or sell Quote price
    Tick Trade Buy Aggregate price < combo limit price Buy or sell Trade price
    Tick Trade Sell Aggregate price > combo limit price Buy or sell Trade price
    QuoteBar
    Buy Aggregate price < combo limit price Buy Ask low price
    QuoteBar
    Buy Aggregate price < combo limit price Sell Bid low price
    QuoteBar
    Sell Aggregate price > combo limit price Buy Ask high price
    QuoteBar
    Sell Aggregate price > combo limit price Sell Bid high price
    TradeBar
    Buy Aggregate price < combo limit price Buy or sell Low price
    TradeBar
    Sell Aggregate price > combo limit price Buy or sell High price

    The model only fills combo limit orders if the data isn't stale and all the legs can fill in the same time step after the order time step. The fill quantity of each leg is the product of the leg order quantity and the combo order quantity.

    Combo Leg Limit Orders

    The following table describes the fill logic of combo leg limit orders for each data format and order direction. The order direction in the table represents the order direction of the order leg, not the order direction of the combo order.

    Data Format TickType Order Direction Fill Condition Fill Price
    Tick Quote Buy Ask price < limit price min(ask price, limit price)
    Tick Quote Sell Bid price > limit price max(bid price, limit price)
    Tick Trade Buy Trade price < limit price min(trade price, limit price)
    Tick Trade Sell Trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy Ask low price < limit price min(ask high price, limit price)
    QuoteBar
    Sell Bid high price > limit price max(bid low price, limit price)
    TradeBar
    Buy Low price < limit price min(high price, limit price)
    TradeBar
    Sell High price > limit price max(low price, limit price)

    The model only fills combo leg limit orders if all the following conditions are met:

    The fill quantity is the product of the leg order quantity and the combo order quantity.

     

    Supported Models

    Immediate Model

    Introduction

    The ImmediateFillModel is the default fill model if you trade non-Equity assets with the DefaultBrokerageModel . This fill model fills trades completely and immediately.

    security.SetFillModel(new ImmediateFillModel());
    security.set_fill_model(ImmediateFillModel())

    The fill logic of each order depends on the order type, the data format of the security subscription, and the order direction. The following tables show the fill price of each order given these factors. To determine the fill price of an order, the fill model first checks the most recent tick for the security. If your security subscription doesn't provide tick data, the fill model checks the most recent QuoteBar . If your security subscription doesn't provide quote data, the fill model checks the most recent TradeBar .

    To view the implementation of this model, see the LEAN GitHub repository .

    Market Orders

    The following table describes the fill price of market orders for each data format and order direction:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask close price + slippage
    QuoteBar
    Sell bid close price - slippage
    TradeBar
    Buy close price + slippage
    TradeBar
    Sell close price - slippage

    The model only fills market orders if the exchange is open and it immediately fills them. If your algorithm places a market order at 10 AM, it fills at 10 AM.

    Limit Orders

    The following table describes the fill logic of limit orders for each data format and order direction:

    Data Format TickType Order Direction Fill Condition Fill Price
    Tick Quote Buy quote price < limit price min(quote price, limit price)
    Tick Quote Sell quote price > limit price max(quote price, limit price)
    Tick Trade Buy trade price < limit price min(trade price, limit price)
    Tick Trade Sell trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy ask low price < limit price min(ask high price, limit price)
    QuoteBar
    Sell bid high price > limit price max(bid low price, limit price)
    TradeBar
    Buy low price < limit price min(high price, limit price)
    TradeBar
    Sell high price > limit price max(low price, limit price)

    The model won't fill limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Limit if Touched Orders

    The model converts a limit if touched order to a limit order when the trigger condition is met. The following table describes the trigger condition of limit if touched orders for each data format and order direction:

    Data Format TickType Order Direction Trigger Condition
    Tick Quote Buy quote price <= trigger price
    Tick Quote Sell quote price >= trigger price
    Tick Trade Buy trade price <= trigger price
    Tick Trade Sell trade price >= trigger price
    TradeBar
    Buy low price <= trigger price
    TradeBar
    Sell high price >= trigger price

    Once the limit if touched order triggers, to fill the order, the model checks the bid price for buy orders and the ask price for sell orders.

    To get the bid price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a buy quote, use the bid price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing bid price of the most recent QuoteBar .

    To get the ask price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a sell quote, use the ask price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing ask price of the most recent QuoteBar .

    If neither of the preceding procedures yield a result, the model uses the following procedure to get the bid or ask price:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a tick of type TickType.Trade , use the last trade price.
    2. If the subscription provides TradeBar data, use the closing bid price of the most recent QuoteBar .

    Buy orders fill when the bid price <= limit price and sell orders fill when the ask price >= limit price. The order fills at the limit price. The model won't trigger or fill limit if touched orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Stop Market Orders

    The following table describes the fill logic of stop market orders for each data format and order direction. Once the stop condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Price
    Tick Quote Buy quote price > stop price max(stop price, quote price + slippage)
    Tick Quote Sell quote price < stop price min(stop price, quote price - slippage)
    Tick Trade Buy trade price > stop price max(stop price, last trade price + slippage)
    Tick Trade Sell trade price < stop price min(stop price, last trade price - slippage)
    QuoteBar
    Buy ask high price > stop price max(stop price, ask close price + slippage)
    QuoteBar
    Sell bid low price < stop price min(stop price, bid close price - slippage)
    TradeBar
    Buy high price > stop price max(stop price, close price + slippage)
    TradeBar
    Sell low price < stop price min(stop price, close price - slippage)

    The model only fills stop market orders when the exchange is open.

    The model won't fill stop market orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Stop Limit Orders

    The following table describes the fill logic of stop limit orders for each data format and order direction. Once the stop condition is met, the model starts to check the fill condition. Once the fill condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Condition Fill Price
    Tick Quote Buy quote price > stop price quote price < limit price min(quote price, limit price)
    Tick Quote Sell quote price < stop price quote price > limit price max(quote price, limit price)
    Tick Trade Buy trade price > stop price trade price < limit price min(trade price, limit price)
    Tick Trade Sell trade price < stop price trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy ask high price > stop price ask close price < limit price min(ask high price, limit price)
    QuoteBar
    Sell bid low price < stop price bid close price > limit price max(bid low price, limit price)
    TradeBar
    Buy high price > stop price close price < limit price min(high price, limit price)
    TradeBar
    Sell low price < stop price close price > limit price max(low price, limit price)

    The model won't fill stop limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Trailing Stop Orders

    The following table describes the fill logic of trailing stop orders for each data format and order direction. Once the stop condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Price
    Tick Quote Buy quote price > stop price max(stop price, quote price + slippage)
    Tick Quote Sell quote price < stop price min(stop price, quote price - slippage)
    Tick Trade Buy trade price > stop price max(stop price, last trade price + slippage)
    Tick Trade Sell trade price < stop price min(stop price, last trade price - slippage)
    QuoteBar
    Buy ask high price > stop price max(stop price, ask close price + slippage)
    QuoteBar
    Sell bid low price < stop price min(stop price, bid close price - slippage)
    TradeBar
    Buy high price > stop price max(stop price, close price + slippage)
    TradeBar
    Sell low price < stop price min(stop price, close price - slippage)

    While the stop condition is not met, the model updates the stop price under certain conditions. The following table shows the update condition and stop price value for currency-based trailing amounts:

    Data Format TickType Order Direction Update Condition Stop Price
    Tick Quote Buy stop price - quote price <= trailing amount quote price + trailing amount
    Tick Quote Sell quote price - stop price <= trailing amount quote price - trailing amount
    Tick Trade Buy stop price - trade price <= trailing amount trade price + trailing amount
    Tick Trade Sell trade price - stop price <= trailing amount trade price - trailing amount
    QuoteBar
    Buy stop price - ask low price <= trailing amount ask low price + trailing amount
    QuoteBar
    Sell bid high price - stop price <= trailing amount bid high price - trailing amount
    TradeBar
    Buy stop price - low price <= trailing amount low price + trailing amount
    TradeBar
    Sell high price - stop price <= trailing amount high price - trailing amount

    The following table shows the update condition and stop price value for percentage-based trailing amounts.

    Data Format TickType Order Direction Update Condition Stop Price
    Tick Quote Buy stop price - quote price <= quote price * trailing amount quote price * (1 + trailing amount)
    Tick Quote Sell quote price - stop price <= quote price * trailing amount quote price * (1 - trailing amount)
    Tick Trade Buy stop price - trade price <= trade price * trailing amount trade price * (1 + trailing amount)
    Tick Trade Sell trade price - stop price <= trade price * trailing amount trade price * (1 - trailing amount)
    QuoteBar
    Buy stop price - ask low price <= ask low price * trailing amount ask low price * (1 + trailing amount)
    QuoteBar
    Sell bid high price - stop price <= bid high price * trailing amount bid high price * (1 - trailing amount)
    TradeBar
    Buy stop price - low price <= stop price * trailing amount low price * (1 + trailing amount)
    TradeBar
    Sell high price - stop price <= high price * trailing amount high price * (1 - trailing amount)

    The model only fills trailing stop orders when the exchange is open.

    The model won't fill trailing stop orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Market on Open Orders

    The following table describes the fill price of market on open orders for each data format and order side:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask open price + slippage
    QuoteBar
    Sell bid open price - slippage
    TradeBar
    Buy open price + slippage
    TradeBar
    Sell open price - slippage

    The model won't fill market on open orders during pre-market hours.

    The model won't fill market on open orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Market on Close Orders

    The following table describes the fill price of market on close orders for each data format and order side:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask close price + slippage
    QuoteBar
    Sell bid close price - slippage
    TradeBar
    Buy close price + slippage
    TradeBar
    Sell close price - slippage

    The model won't fill market on close orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Combo Market Orders

    The following table describes the fill price of combo market orders for each data format and order direction:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy Ask quote price + slippage
    Tick Quote Sell Bid quote price - slippage
    Tick Trade Buy Trade price + slippage
    Tick Trade Sell Trade price - slippage
    QuoteBar
    Buy Ask close price + slippage
    QuoteBar
    Sell Bid close price - slippage
    TradeBar
    Buy Close price + slippage
    TradeBar
    Sell Close price - slippage

    The model only fills combo market orders if all the following conditions are met:

    The fill quantity of each leg is the product of the leg order quantity and the combo market order quantity.

    Combo Limit Orders

    To fill combo limit orders, the fill model calculates the aggregate price of the combo order, which is the sum of prices for each security in the order legs. The price of each security is a function of the data format and order direction. Legs with a positive order quantity increase the aggregate price and legs with a negative quantity decrease the aggregate price. The following table shows how the fill model calculates the security prices.

    Data Format TickType Combo Order Direction Leg Order Direction Price
    Tick Quote Buy or sell Buy Ask price
    Tick Quote Buy or sell Sell Bid price
    Tick Trade Buy or sell Buy or sell Trade price
    QuoteBar Buy Buy Ask low price
    QuoteBar Buy Sell Bid low price
    QuoteBar Sell Buy Ask high price
    QuoteBar Sell Sell Bid high price
    TradeBar Buy Buy or sell Low price
    TradeBar Sell Buy or sell High price

    After the fill model calculates the aggregate price of the combo order, it checks if it should fill the order. The following table describes the fill condition of the combo order and the fill price price of each leg:

    Data Format TickType Combo Order Direction Fill Condition Leg Order Direction Fill Price
    Tick Quote Buy Aggregate price < combo limit price Buy or sell Quote price
    Tick Quote Sell Aggregate price > combo limit price Buy or sell Quote price
    Tick Trade Buy Aggregate price < combo limit price Buy or sell Trade price
    Tick Trade Sell Aggregate price > combo limit price Buy or sell Trade price
    QuoteBar
    Buy Aggregate price < combo limit price Buy Ask low price
    QuoteBar
    Buy Aggregate price < combo limit price Sell Bid low price
    QuoteBar
    Sell Aggregate price > combo limit price Buy Ask high price
    QuoteBar
    Sell Aggregate price > combo limit price Sell Bid high price
    TradeBar
    Buy Aggregate price < combo limit price Buy or sell Low price
    TradeBar
    Sell Aggregate price > combo limit price Buy or sell High price

    The model only fills combo limit orders if the data isn't stale and all the legs can fill in the same time step after the order time step. The fill quantity of each leg is the product of the leg order quantity and the combo order quantity.

    Combo Leg Limit Orders

    The following table describes the fill logic of combo leg limit orders for each data format and order direction. The order direction in the table represents the order direction of the order leg, not the order direction of the combo order.

    Data Format TickType Order Direction Fill Condition Fill Price
    Tick Quote Buy Ask price < limit price min(ask price, limit price)
    Tick Quote Sell Bid price > limit price max(bid price, limit price)
    Tick Trade Buy Trade price < limit price min(trade price, limit price)
    Tick Trade Sell Trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy Ask low price < limit price min(ask high price, limit price)
    QuoteBar
    Sell Bid high price > limit price max(bid low price, limit price)
    TradeBar
    Buy Low price < limit price min(high price, limit price)
    TradeBar
    Sell High price > limit price max(low price, limit price)

    The model only fills combo leg limit orders if all the following conditions are met:

    The fill quantity is the product of the leg order quantity and the combo order quantity.

     

    Supported Models

    Latest Price Model

    Introduction

    The LatestPriceFillModel fills trades completely and immediately.

    security.SetFillModel(new LatestPriceFillModel());
    security.set_fill_model(LatestPriceFillModel())

    The fill logic of each order depends on the order type, the data format of the security subscription, and the order direction. The following tables show the fill price of each order given these factors. To determine the fill price of an order, the fill model first checks the most recent tick for the security. If your security subscription doesn't provide tick data, the fill model checks the most recent QuoteBar . If there is no QuoteBar available, it uses the OHLC prices from the Security object. If there is a QuoteBar available, the fill model gets the most recent TradeBar . If the TradeBar is more recent, it uses the TradeBar data. Otherwise, it uses the QuoteBar data.

    To view the implementation of this model, see the LEAN GitHub repository .

    Market Orders

    The following table describes the fill price of market orders for each data format and order direction:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask close price + slippage
    QuoteBar
    Sell bid close price - slippage
    TradeBar
    Buy close price + slippage
    TradeBar
    Sell close price - slippage

    The model only fills market orders if the exchange is open and it immediately fills them. If your algorithm places a market order at 10 AM, it fills at 10 AM.

    Limit Orders

    The following table describes the fill logic of limit orders for each data format and order direction:

    Data Format TickType Order Direction Fill Condition Fill Price
    Tick Quote Buy quote price < limit price min(quote price, limit price)
    Tick Quote Sell quote price > limit price max(quote price, limit price)
    Tick Trade Buy trade price < limit price min(trade price, limit price)
    Tick Trade Sell trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy ask low price < limit price min(ask high price, limit price)
    QuoteBar
    Sell bid high price > limit price max(bid low price, limit price)
    TradeBar
    Buy low price < limit price min(high price, limit price)
    TradeBar
    Sell high price > limit price max(low price, limit price)

    The model won't fill limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Limit if Touched Orders

    The model converts a limit if touched order to a limit order when the trigger condition is met. The following table describes the trigger condition of limit if touched orders for each data format and order direction:

    Data Format TickType Order Direction Trigger Condition
    Tick Quote Buy quote price <= trigger price
    Tick Quote Sell quote price >= trigger price
    Tick Trade Buy trade price <= trigger price
    Tick Trade Sell trade price >= trigger price
    TradeBar
    Buy low price <= trigger price
    TradeBar
    Sell high price >= trigger price

    Once the limit if touched order triggers, to fill the order, the model checks the bid price for buy orders and the ask price for sell orders.

    To get the bid price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a buy quote, use the bid price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing bid price of the most recent QuoteBar .

    To get the ask price, the model uses the following procedure:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a sell quote, use the ask price of the most recent quote tick.
    2. If the subscription provides QuoteBar data, use the closing ask price of the most recent QuoteBar .

    If neither of the preceding procedures yield a result, the model uses the following procedure to get the bid or ask price:

    1. If the subscription provides Tick data and the most recent batch of ticks contains a tick of type TickType.Trade , use the last trade price.
    2. If the subscription provides TradeBar data, use the closing bid price of the most recent QuoteBar .

    Buy orders fill when the bid price <= limit price and sell orders fill when the ask price >= limit price. The order fills at the limit price. The model won't trigger or fill limit if touched orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Stop Market Orders

    The following table describes the fill logic of stop market orders for each data format and order direction. Once the stop condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Price
    Tick Quote Buy quote price > stop price max(stop price, quote price + slippage)
    Tick Quote Sell quote price < stop price min(stop price, quote price - slippage)
    Tick Trade Buy trade price > stop price max(stop price, last trade price + slippage)
    Tick Trade Sell trade price < stop price min(stop price, last trade price - slippage)
    QuoteBar
    Buy ask high price > stop price max(stop price, ask close price + slippage)
    QuoteBar
    Sell bid low price < stop price min(stop price, bid close price - slippage)
    TradeBar
    Buy high price > stop price max(stop price, close price + slippage)
    TradeBar
    Sell low price < stop price min(stop price, close price - slippage)

    The model only fills stop market orders when the exchange is open.

    The model won't fill stop market orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Stop Limit Orders

    The following table describes the fill logic of stop limit orders for each data format and order direction. Once the stop condition is met, the model starts to check the fill condition. Once the fill condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Condition Fill Price
    Tick Quote Buy quote price > stop price quote price < limit price min(quote price, limit price)
    Tick Quote Sell quote price < stop price quote price > limit price max(quote price, limit price)
    Tick Trade Buy trade price > stop price trade price < limit price min(trade price, limit price)
    Tick Trade Sell trade price < stop price trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy ask high price > stop price ask close price < limit price min(ask high price, limit price)
    QuoteBar
    Sell bid low price < stop price bid close price > limit price max(bid low price, limit price)
    TradeBar
    Buy high price > stop price close price < limit price min(high price, limit price)
    TradeBar
    Sell low price < stop price close price > limit price max(low price, limit price)

    The model won't fill stop limit orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Trailing Stop Orders

    The following table describes the fill logic of trailing stop orders for each data format and order direction. Once the stop condition is met, the model fills the orders and sets the fill price.

    Data Format TickType Order Direction Stop Condition Fill Price
    Tick Quote Buy quote price > stop price max(stop price, quote price + slippage)
    Tick Quote Sell quote price < stop price min(stop price, quote price - slippage)
    Tick Trade Buy trade price > stop price max(stop price, last trade price + slippage)
    Tick Trade Sell trade price < stop price min(stop price, last trade price - slippage)
    QuoteBar
    Buy ask high price > stop price max(stop price, ask close price + slippage)
    QuoteBar
    Sell bid low price < stop price min(stop price, bid close price - slippage)
    TradeBar
    Buy high price > stop price max(stop price, close price + slippage)
    TradeBar
    Sell low price < stop price min(stop price, close price - slippage)

    While the stop condition is not met, the model updates the stop price under certain conditions. The following table shows the update condition and stop price value for currency-based trailing amounts:

    Data Format TickType Order Direction Update Condition Stop Price
    Tick Quote Buy stop price - quote price <= trailing amount quote price + trailing amount
    Tick Quote Sell quote price - stop price <= trailing amount quote price - trailing amount
    Tick Trade Buy stop price - trade price <= trailing amount trade price + trailing amount
    Tick Trade Sell trade price - stop price <= trailing amount trade price - trailing amount
    QuoteBar
    Buy stop price - ask low price <= trailing amount ask low price + trailing amount
    QuoteBar
    Sell bid high price - stop price <= trailing amount bid high price - trailing amount
    TradeBar
    Buy stop price - low price <= trailing amount low price + trailing amount
    TradeBar
    Sell high price - stop price <= trailing amount high price - trailing amount

    The following table shows the update condition and stop price value for percentage-based trailing amounts.

    Data Format TickType Order Direction Update Condition Stop Price
    Tick Quote Buy stop price - quote price <= quote price * trailing amount quote price * (1 + trailing amount)
    Tick Quote Sell quote price - stop price <= quote price * trailing amount quote price * (1 - trailing amount)
    Tick Trade Buy stop price - trade price <= trade price * trailing amount trade price * (1 + trailing amount)
    Tick Trade Sell trade price - stop price <= trade price * trailing amount trade price * (1 - trailing amount)
    QuoteBar
    Buy stop price - ask low price <= ask low price * trailing amount ask low price * (1 + trailing amount)
    QuoteBar
    Sell bid high price - stop price <= bid high price * trailing amount bid high price * (1 - trailing amount)
    TradeBar
    Buy stop price - low price <= stop price * trailing amount low price * (1 + trailing amount)
    TradeBar
    Sell high price - stop price <= high price * trailing amount high price * (1 - trailing amount)

    The model only fills trailing stop orders when the exchange is open.

    The model won't fill trailing stop orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Market on Open Orders

    The following table describes the fill price of market on open orders for each data format and order side:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask open price + slippage
    QuoteBar
    Sell bid open price - slippage
    TradeBar
    Buy open price + slippage
    TradeBar
    Sell open price - slippage

    The model won't fill market on open orders during pre-market hours.

    The model won't fill market on open orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Market on Close Orders

    The following table describes the fill price of market on close orders for each data format and order side:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy quote price + slippage
    Tick Quote Sell quote price - slippage
    Tick Trade Buy trade price + slippage
    Tick Trade Sell trade price - slippage
    QuoteBar
    Buy ask close price + slippage
    QuoteBar
    Sell bid close price - slippage
    TradeBar
    Buy close price + slippage
    TradeBar
    Sell close price - slippage

    The model won't fill market on close orders with stale data or data with the order timestamp to avoid look-ahead bias.

    Combo Market Orders

    The following table describes the fill price of combo market orders for each data format and order direction:

    Data Format TickType Order Direction Fill Price
    Tick Quote Buy Ask quote price + slippage
    Tick Quote Sell Bid quote price - slippage
    Tick Trade Buy Trade price + slippage
    Tick Trade Sell Trade price - slippage
    QuoteBar
    Buy Ask close price + slippage
    QuoteBar
    Sell Bid close price - slippage
    TradeBar
    Buy Close price + slippage
    TradeBar
    Sell Close price - slippage

    The model only fills combo market orders if all the following conditions are met:

    The fill quantity of each leg is the product of the leg order quantity and the combo market order quantity.

    Combo Limit Orders

    To fill combo limit orders, the fill model calculates the aggregate price of the combo order, which is the sum of prices for each security in the order legs. The price of each security is a function of the data format and order direction. Legs with a positive order quantity increase the aggregate price and legs with a negative quantity decrease the aggregate price. The following table shows how the fill model calculates the security prices.

    Data Format TickType Combo Order Direction Leg Order Direction Price
    Tick Quote Buy or sell Buy Ask price
    Tick Quote Buy or sell Sell Bid price
    Tick Trade Buy or sell Buy or sell Trade price
    QuoteBar Buy Buy Ask low price
    QuoteBar Buy Sell Bid low price
    QuoteBar Sell Buy Ask high price
    QuoteBar Sell Sell Bid high price
    TradeBar Buy Buy or sell Low price
    TradeBar Sell Buy or sell High price

    After the fill model calculates the aggregate price of the combo order, it checks if it should fill the order. The following table describes the fill condition of the combo order and the fill price price of each leg:

    Data Format TickType Combo Order Direction Fill Condition Leg Order Direction Fill Price
    Tick Quote Buy Aggregate price < combo limit price Buy or sell Quote price
    Tick Quote Sell Aggregate price > combo limit price Buy or sell Quote price
    Tick Trade Buy Aggregate price < combo limit price Buy or sell Trade price
    Tick Trade Sell Aggregate price > combo limit price Buy or sell Trade price
    QuoteBar
    Buy Aggregate price < combo limit price Buy Ask low price
    QuoteBar
    Buy Aggregate price < combo limit price Sell Bid low price
    QuoteBar
    Sell Aggregate price > combo limit price Buy Ask high price
    QuoteBar
    Sell Aggregate price > combo limit price Sell Bid high price
    TradeBar
    Buy Aggregate price < combo limit price Buy or sell Low price
    TradeBar
    Sell Aggregate price > combo limit price Buy or sell High price

    The model only fills combo limit orders if the data isn't stale and all the legs can fill in the same time step after the order time step. The fill quantity of each leg is the product of the leg order quantity and the combo order quantity.

    Combo Leg Limit Orders

    The following table describes the fill logic of combo leg limit orders for each data format and order direction. The order direction in the table represents the order direction of the order leg, not the order direction of the combo order.

    Data Format TickType Order Direction Fill Condition Fill Price
    Tick Quote Buy Ask price < limit price min(ask price, limit price)
    Tick Quote Sell Bid price > limit price max(bid price, limit price)
    Tick Trade Buy Trade price < limit price min(trade price, limit price)
    Tick Trade Sell Trade price > limit price max(trade price, limit price)
    QuoteBar
    Buy Ask low price < limit price min(ask high price, limit price)
    QuoteBar
    Sell Bid high price > limit price max(bid low price, limit price)
    TradeBar
    Buy Low price < limit price min(high price, limit price)
    TradeBar
    Sell High price > limit price max(low price, limit price)

    The model only fills combo leg limit orders if all the following conditions are met:

    The fill quantity is the product of the leg order quantity and the combo order quantity.

     

    Reality Modeling

    Slippage

    Slippage

    Key Concepts

    Introduction

    Slippage is the difference between the fill price you expect to get for an order and the actual fill price. Since the price can move in the direction of your trade or against the direction of your trade while you wait for the order to fill, slippage can be positive or negative. Slippage models model slippage to make backtest results more realistic.

    Factors Impacting Slippage

    There are many factors that can impact slippage, including the trading engine, brokerage connection, and market dynamics.

    Trading Engine

    How long does it take from when you place an order to when it's sent to the brokerage? Longer delays lead to more slippage.

    Brokerage Connection

    How long does it take for your brokerage to receive an order that you send? Slow internet connections, long travel distances, and poor infrastructure lead to more slippage

    Market Dynamics

    How volatile is the current market environment? More volatility leads to more slippage.

    Does the market consist of sophisticated microsecond arbitrageurs? If your order creates an arbitrage opportunity, it can cause more slippage.

    Set Models

    The brokerage model of your algorithm automatically sets the slippage model for each security, but you can override it. To manually set the slippage model of a security, call the SetSlippageModel set_slippage_model method on the Security object.

    // In Initialize
    var security = AddEquity("SPY");
    security.SetSlippageModel(new VolumeShareSlippageModel());
    # In Initialize
    security = self.add_equity("SPY")
    security.set_slippage_model(VolumeShareSlippageModel())

    You can also set the slippage model in a security initializer . If your algorithm has a dynamic universe, use the security initializer technique. In order to initialize single security subscriptions with the security initializer, call SetSecurityInitializer set_security_initializer before you create the subscriptions.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite some of the reality models        
            security.SetSlippageModel(new VolumeShareSlippageModel());    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite some of the reality models        
            security.set_slippage_model(VolumeShareSlippageModel())

    To view all the pre-built slippage models, see Supported Models .

    Default Behavior

    The brokerage model of your algorithm automatically sets the slippage model of each security. The default brokerage model is the DefaultBrokerageModel , which uses the NullSlippageModel to model zero slippage for all securities.

    Model Structure

    Slippage models should implement the ISlippageModel interface. Extensions of the ISlippageModel interface must implement the GetSlippageApproximation get_slippage_approximation method, which calculates the slippage quantity.

    // In the Initialize method, set the slippage model
    security.SetSlippageModel(new MySlippageModel());
    
    // Define the custom slippage model
    public class MySlippageModel : ISlippageModel 
    {
        public decimal GetSlippageApproximation(Security asset, Order order) 
        {
            return asset.Price*0.0001m*(decimal) Math.Log10(2*(double) order.AbsoluteQuantity);
        }
    }
    
    # In the Initialize method, set the slippage model
    security.set_slippage_model(MySlippageModel())
    
    # Define the custom slippage model
    class MySlippageModel:
    
        def get_slippage_approximation(self, asset: Security, order: Order) -> float:
            return asset.price * 0.0001 * np.log10(2*float(order.absolute_quantity))

    For a full example algorithm, see this backtest this backtest .

    Examples

    Demonstration Algorithms
    CustomModelsAlgorithm.py Python CustomModelsAlgorithm.cs C#

     

    Slippage

    Supported Models

    Introduction

    This page describes the pre-built slippage models in LEAN. If none of these models perform exactly how you want, create a custom slippage model .

    Null Model

    The NullSlippageModel sets the slippage of each order to zero. It's the default slippage model of the DefaultBrokerageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    To view the implementation of this model, see the LEAN GitHub repository .

    Constant Model

    The ConstantSlippageModel applies a constant percentage of slippage to each order.

    security.SetSlippageModel(new ConstantSlippageModel(0.01m));
    security.set_slippage_model(ConstantSlippageModel(0.01))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    slippagePercent slippage_percent decimal float The slippage percent for each order. The value must be in the interval (0, 1).

    To view the implementation of this model, see the LEAN GitHub repository .

    Volume Share Model

    The VolumeShareSlippageModel calculates the slippage of each order by multiplying the price impact constant by the square of the ratio of the order to the total volume. If the volume of the current bar is zero, the slippage percent is

    Slippage percent calculation when bar volume is 0

    where volumeLimit and priceImpact are custom input variables. If the volume of the current bar is positive, the slippage percent is

    Slippage percent calculation when bar volume is greater than 0

    where orderQuantity is the quantity of the order and barVolume is the volume of the current bar. If the security subscription provides TradeBar data, the barVolume is the volume of the current bar. If the security subscription provides QuoteBar data, the barVolume is the bid or ask size of the current bar. CFD, Forex, and Crypto data often doesn't include volume. If there is no volume reported for these asset classes, the model returns zero slippage.

    security.SetSlippageModel(new VolumeShareSlippageModel());
    security.set_slippage_model(VolumeShareSlippageModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    volumeLimit volume_limit decimal float Maximum percent of historical volume that can fill in each bar. 0.5 means 50% of historical volume. 1.0 means 100%. 0.025
    priceImpact price_impact decimal float Scaling coefficient for price impact. Larger values will result in more simulated price impact. Smaller values will result in less simulated price impact. 0.1

    To view the implementation of this model, see the LEAN GitHub repository .

    Market Impact Model

    The MarketImpactSlippageModel calculates the slippage with perspective to the market impact created by an order, which mimics the consumption of the order book and disruption of the supply-demand relationship at the microeconomic scale. The model is divided into distinct parts, the market impact estimation and the slippage that results from it.

    Factors to Consider

    The model includes factors that create market impact. Almgren, Thum, Hauptmann & Li (2005) suggested the following factors:

    1. Execution Time
    2. Asset price time series is usually considered as Random walk (with/without drift) $$S_t = S_{t-1} + f(S, t) + \epsilon$$ or Brownian Motion $$S_t = S_0 + exp((\mu-\frac{1}{2}\sigma^2)t + \sigma W_t)$$ In either model, the variance of predictions increases over time ($Var(S)=\sigma\sqrt{t}$). In fact, this happens to most stock price models. Thus, time uncertainty should also apply to the concept of slippage. The longer it takes to go from order submission to execution, the further the fill price will be from the price at order submission.

    3. Volatility of the Underlying Securities
    4. Like (1), the volatility also contributes to the uncertainty of the next price ($Var(S)=\sigma\sqrt{t}$). In most cases, volatility has a one-sided impact since the market's volatility is often introduced by overbuying or overselling from positive or negative sentiments.

    5. Liquidity
    6. Liquidity plays a crucial role in the supply-demand resilience. When a stock is liquid, an order usually only takes a small fraction of the market depth. Hence, the gap between the bid and ask price can be refilled quickly due to high market participation and a small gap. However, when a stock is illiquid, a single order might already take the top few layers of the order book, creating a wide gap between the bid and ask price and volume, which makes a bigger shift in the equilibrium price. This will create an impact which is permanent in nature.

      Market impact componenets
    7. Order Size
    8. Last but not least, the order size directly affects the proportion of the order book/liquidity that the order consumes. Moreover, the larger the order is, the longer it takes to fill since the market might not have sufficient depth. This has interaction effects with the preceding factors.

    Market Impact Decomposition

    In the book "A Signal Processing Perspective on Financial Engineering", Feng & Palomer (2015) generalized scholars' opinions that market impact can be broken down into "permanent" and "temporary" components, with noise. The permanent impact of a trade refers to the price differences between equilibrium prices before and after the trade and the resilience of the order book. In contrast, temporary impact refers to the price difference between the instant price drop after a trade and the post-trade equilibrium.

    Market impact under different liquidity situation

    The model incorporates the preceding factors and estimates both the permanent and temporary impact components with two diffusion models as a function of $\nu=\frac{X}{VT}$, which is the normalized order size: $$G\left(\nu\right)=\pm\gamma\left|\nu\right|^\alpha+\text{noise}$$ $$H\left(\nu\right)=\pm\eta\left|\nu\right|^\beta+\text{noise}$$ where $X$ is the order quantity, $V$ is the average daily volume, and $T$ is the time difference between order submission and filling (execution time). The other symbols are parameters that are calibrated from historical trade data. Together with the execution time, daily volatility $\sigma$, and liquidity factor $\delta$, the complete models are as follows: $$I=\sigma T \gamma\left|\frac{X}{VT}\right|^\alpha\left(\frac{\Theta}{V}\right)^\delta+\sigma\sqrt{T_{\text{post}}}\epsilon$$ $$J=\sigma T \eta\left|\frac{X}{VT}\right|^\beta+\sigma\sqrt{T_{\text{post}}}\epsilon$$ where $\Theta$ is the share outstanding, $T_{post}$ is the time difference between order submission and the new equilibrium established, $I$ is the permanent market impact, and $J$ is the temporary market impact. The inverse of the turnover rate $\frac{\Theta}{V}$ contributes to the permanent impact. This relationship is reasonable since higher turnover means more market participants are in the market, so the order book depth is deeper.

    Implementation

    security.SetSlippageModel(new MarketImpactSlippageModel(self));
    security.set_slippage_model(MarketImpactSlippageModel(self))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    algorithm IAlgorithm The algorithm instance
    nonNegative non_negative bool Indicator whether only non-negative slippage allowed. true True
    latency double float Seconds between order submission and order fill 0.075
    impactTime impact_time double float Seconds between order fill and the establishment of the new equilibrium 1800
    alpha double float Exponent of the permanent impact function 0.891
    beta double float Exponent of the temporary impact function 0.600
    gamma double float Coefficient of the permanent impact function 0.314
    eta double float Coefficient of the temporary impact function 0.142
    delta double float Liquidity scaling factor for permanent impact 0.267
    randomSeed random_seed int Random seed for generating gaussian noise 50

    The default parameters of the MarketImpactSlippageModel are the parameters that the authors calibrated and shared. However, you may want to reference the original paper and recalibrate the parameters because of the following reasons:

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Reality Modeling

    Transaction Fees

    Transaction Fees

    Key Concepts

    Introduction

    Your orders incur a transaction fee when a brokerage fills them in the market. LEAN uses transaction fee models in backtesting to model the live trading fees you would incur with the strategy. Transaction fee models make backtest results more realistic. To give your backtests the most accurate fees, LEAN contains transaction fee models that model the fee structure of many popular brokerages.

    Set Models

    The brokerage model of your algorithm automatically sets the fee model for each security, but you can override it. To manually set the fee model of a security, call the SetFeeModel set_fee_model method on the Security object.

    // In Initialize
    var security = AddEquity("SPY");
    security.SetFeeModel(new ConstantFeeModel(0));
    # In Initialize
    security = self.add_equity("SPY")
    security.set_fee_model(ConstantFeeModel(0))

    You can also set the fee model in a security initializer . If your algorithm has a dynamic universe, use the security initializer technique. In order to initialize single security subscriptions with the security initializer, call SetSecurityInitializer set_security_initializer before you create the subscriptions.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite some of the reality models        
            security.SetFeeModel(new ConstantFeeModel(0));    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite some of the reality models        
            security.set_fee_model(ConstantFeeModel(0))

    In live trading, the SetFeeModel set_fee_model method isn't ignored. If we use order helper methods like SetHoldings set_holdings , the fee model helps to calculate the order quantity. However, the algorithm doesn't update the cash book with the fee from the fee model. The algorithm uses the actual fee from the brokerage to update the cash book.

    To view all the pre-built fee models, see Supported Models .

    Default Behavior

    The brokerage model of your algorithm automatically sets the fill model for each security. The default brokerage model is the DefaultBrokerageModel , which set the ConstantFeeModel with no fees for Forex, CFD, and Crypto assets and sets the InteractiveBrokersFeeModel for the remaining asset classes.

    Model Structure

    Fee models should extend the FeeModel class. Extensions of the FeeModel class must implement the GetOrderFee get_order_fee method, which receives OrderFeeParameters and returns an OrderFee that represents a cash amount in a currency.

    // In the Initialize method, set the fee model
    security.SetFeeModel(new MyFeeModel());
    
    // Define the custom fee model
    public class MyFeeModel : FeeModel 
    {
        public override OrderFee GetOrderFee(OrderFeeParameters parameters) 
        {
            return new OrderFee(new CashAmount(0.5m, "USD"));
        }
    }
    # In the Initialize method, set the fee model
    security.set_fee_model(MyFeeModel())
    
    # Define the custom fee model
    class MyFeeModel(FeeModel):
    
        def get_order_fee(self, parameters: OrderFeeParameters) -> OrderFee:
            return OrderFee(CashAmount(0.5, 'USD'))

    For a full example algorithm, see this backtest this backtest .

    The OrderFeeParameters object has the following members:

    Negative Transaction Fees

    If you short a security and receive interest payments, they are negative transaction fees.

    Examples

    Demonstration Algorithms
    CustomModelsAlgorithm.py Python RawPricesCoarseUniverseAlgorithm.py Python CustomModelsAlgorithm.cs C# RawPricesCoarseUniverseAlgorithm.cs C#

     

    Transaction Fees

    Supported Models

    Introduction

    This page describes some of the pre-built fee models in LEAN. For more brokerage-specific fee models, see the brokerage model documentation . If none of these models perform exactly how you want, create a custom fee model .

    Constant Model

    The ConstantFeeModel applies the absolute value of a constant fee to each order. It's the default fee model of the DefaultBrokerageModel if you trade Forex, CFD, or Crypto assets.

    security.SetFeeModel(new ConstantFeeModel(0.05m));
    security.set_fee_model(ConstantFeeModel(0.05))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    fee decimal float The order fee quantity
    currency string str The order fee currency
    "USD"

    To view the implementation of this model, see the LEAN GitHub repository .

    Interactive Brokers Model

    The InteractiveBrokersFeeModel models the fees of Interactive Brokers .

    security.SetFeeModel(new InteractiveBrokersFeeModel());
    security.set_fee_model(InteractiveBrokersFeeModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    monthlyForexTradeAmountInUSDollars monthly_forex_trade_amount_in_us_dollars decimal float Monthly Forex dollar volume traded 0
    monthlyOptionsTradeAmountInContracts monthly_options_trade_amount_in_contracts decimal float Monthly Option contracts traded
    0

    The following table describes which currency the InteractiveBrokersFeeModel charges fees in for each asset class:

    Asset Class Fee Currency
    US Equity USD
    India Equity INR
    Equity Options USD
    Forex USD
    US Futures USD
    Hong Kong Futures The contract quote currency (CNH, HKD, or USD)
    US Future Options USD
    Hong Kong Future Options The contract quote currency (CNH, HKD, or USD)
    Index Options USD
    CFD The contract quote currency

    The following sections describe the trading fees of each asset class. To view the implementation of this model, see the LEAN GitHub repository .

    US Equities

    US Equity trades cost $0.005/share with a $1 minimum fee and a 0.5% maximum fee.

    Equity Options and Index Options

    Equity Options and Index Options fees are a function of your monthly volume and the premium of the contract you trade. The following table shows the fees for each volume tier:

    Monthly Volume (Contacts)
    Premium ($) Fee per Contract ($)
    <= 10,000 < 0.05 0.25
    <= 10,000 0.05 <= premium < 0.10 0.50
    <= 10,000 >= 0.10 0.70
    10,000 < volume <= 50,000 < 0.05
    0.25
    10,000 < volume <= 50,000 >= 0.05
    0.50
    50,000 < volume <= 100,000 Any 0.25
    > 100,000 Any 0.15

    By default, LEAN models your fees at the tier with the lowest monthly volume. To adjust the fee tier, manually set the fee model and provide a monthlyOptionsTradeAmountInContracts monthly_options_trade_amount_in_contracts argument.

    The following table shows how the model determines the premium for each order type and direction:

    Order Type Buy Order Premium Sell Order Premium
    Market Bid price Ask price
    Limit Limit price Limit price
    Limit if touched Limit price Limit price
    Stop market Stop price Stop price
    Stop limit Limit price Limit price
    Trailing stop Stop price Stop price
    Market on open Bid price Ask price
    Market on close Bid price Ask price
    Combo market Bid price Ask price
    Combo limit Limit price Limit price
    Combo leg limit Limit price Limit price

    There is no fee to exercise Option contracts.

    Forex

    Forex fees are a function of your monthly Forex trading volume. The following table shows the fee tiers:

    Monthly Volume (USD) Commission Rate (%) Minimum Fee ($)
    <= 1B 0.002 2
    1B < volume <= 2B 0.0015 1.5
    2B < volume <= 5B 0.001 1.25
    > 5B 0.0008 1

    By default, LEAN models your fees at the tier with the lowest monthly volume. To adjust the fee tier, manually set the fee model and provide a monthlyForexTradeAmountInUSDollars monthly_forex_trade_amount_in_us_dollars argument.

    US Futures

    US Futures fees depend on the contracts you trade. The following table shows the base fee per contract for each Future:

    Contract Symbol Market Name Base Fee Per Contract ($) Exchange Fee Per Contract ($)
    E-mini Futures
    ES CME E-mini S&P 500 Futures 0.85 1.28
    NQ CME E-mini Nasdaq-100 Futures 0.85 1.28
    YM CBOT E-mini Dow ($5) Futures 0.85 1.28
    RTY CME E-mini Russell 2000 Index Futures 0.85 1.28
    EMD CME E-mini S&P MidCap 400 Futures 0.85 1.28
    Micro E-mini Futures
    MYM CBOT Micro E-mini Dow Jones Industrial Average Index Futures 0.25 0.3
    M2K CME Micro E-mini Russell 2000 Index Futures 0.25 0.3
    MES CME Micro E-mini Standard and Poor's 500 Stock Price Index Futures 0.25 0.3
    MNQ CME Micro E-mini Nasdaq-100 Index Futures 0.25 0.3
    2YY CBOT Micro 2-Year Yield Futures 0.25 0.3
    5YY CBOT Micro 5-Year Yield Futures 0.25 0.3
    10Y CBOT Micro 10-Year Yield Futures 0.25 0.3
    30Y CBOT Micro 30-Year Yield Futures 0.25 0.3
    MCL NYMEX Micro WTI Crude Oil Futures 0.25 0.3
    MGC COMEX Micro Gold Futures 0.25 0.3
    SIL COMEX Micro Silver Futures 0.25 0.3
    Cryptocurrency Futures
    BTC CME Bitcoin Futures 5 6
    MIB CME BTIC on Micro Bitcoin Futures 2.25 2.5
    MBT CME Micro Bitcoin Futures 2.25 2.5
    MET CME Micro Ether Futures 0.2 0.2
    MRB CME BTIC on Micro Ether Futures 0.2 0.2
    E-mini FX Futures
    E7 CME E-mini Euro FX Futures 0.5 0.85
    J7 CME E-mini Japanese Yen Futures 0.5 0.85
    Micro E-mini FX Futures
    M6E CME Micro Euro/U.S. Dollar (EUR/USD) Futures 0.15 0.24
    M6A CME Micro Australian Dollar/U.S. Dollar (AUD/USD) Futures 0.15 0.24
    M6B CME Micro British Pound Sterling/U.S. Dollar (GBP/USD) Futures 0.15 0.24
    MCD CME Micro Canadian Dollar/U.S.Dollar(CAD/USD) Futures 0.15 0.24
    MJY CME Micro Japanese Yen/U.S. Dollar (JPY/USD) Futures 0.15 0.24
    MSF CME Micro Swiss Franc/U.S. Dollar (CHF/USD) Futures 0.15 0.24
    M6J CME Micro USD/JPY Futures 0.15 0.24
    MIR CME Micro INR/USD Futures 0.15 0.24
    M6C CME Micro USD/CAD Futures 0.15 0.24
    M6S CME Micro USD/CHF Futures 0.15 0.24
    MNH CME Micro USD/CNH Futures 0.15 0.24

    If you trade a contract that's not in the preceding table, the base fee is $0.85/contract and the exchange fee is $1.60/contract.

    In addition to the base fee and exchange fee, there is a $0.02/contract regulatory fee.

    Futures Options

    Futures Options fees depend on the contracts you trade. The following table shows the base fee per contract for each Future:

    Contract Symbol Market Underlying Futures Name Base Fee Per Contract ($) Exchange Fee Per Contract ($)
    E-mini Futures Options
    ES CME E-mini S&P 500 Futures 0.85 0.55
    NQ CME E-mini Nasdaq-100 Futures 0.85 0.55
    YM CBOT E-mini Dow ($5) Futures 0.85 0.55
    RTY CME E-mini Russell 2000 Index Futures 0.85 0.55
    EMD CME E-mini S&P MidCap 400 Futures 0.85 0.55
    Micro E-mini Futures Options
    MYM CBOT Micro E-mini Dow Jones Industrial Average Index Futures 0.25 0.2
    M2K CME Micro E-mini Russell 2000 Index Futures 0.25 0.2
    MES CME Micro E-mini Standard and Poor's 500 Stock Price Index Futures 0.25 0.2
    MNQ CME Micro E-mini Nasdaq-100 Index Futures 0.25 0.2
    2YY CBOT Micro 2-Year Yield Futures 0.25 0.2
    5YY CBOT Micro 5-Year Yield Futures 0.25 0.2
    10Y CBOT Micro 10-Year Yield Futures 0.25 0.2
    30Y CBOT Micro 30-Year Yield Futures 0.25 0.2
    MCL NYMEX Micro WTI Crude Oil Futures 0.25 0.2
    MGC COMEX Micro Gold Futures 0.25 0.2
    SIL COMEX Micro Silver Futures 0.25 0.2
    Cryptocurrency Futures Options
    BTC CME Bitcoin Futures 5 5
    MIB CME BTIC on Micro Bitcoin Futures 1.25 2.5
    MBT CME Micro Bitcoin Futures 1.25 2.5
    MET CME Micro Ether Futures 0.1 0.2
    MRB CME BTIC on Micro Ether Futures 0.1 0.2

    If you trade a contract that's not in the preceding table, the base fee is $0.85/contract and the exchange fee is $1.60/contract.

    In addition to the base fee and exchange fee, there is a $0.02/contract regulatory fee.

    CFD

    CFD trades cost 0.002% of the trade value. The following table shows the minimum fee for each quote currency:

    Quote Currency Fee
    JPY ¥40
    MKD HK$10
    Other 1

    CFD trading fees are denominated in the quote currency of the CFD product.

    Binance Model

    The BinanceFeeModel models the fees of spot trades on Binance and Binance US .

    security.SetFeeModel(new BinanceFeeModel());
    security.set_fee_model(BinanceFeeModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    mFee m_fee decimal float Maker fee value 0.001
    tFee t_fee decimal float Taker fee value 0.001

    The BinanceFeeModel charges the order fees of Binance and Binance US at the VIP 0 level, which is a 0.1% maker and taker fee. If you add liquidity to the order book by placing a limit order that doesn't cross the spread, you pay maker fees. If you remove liquidity from the order book by placing an order that crosses the spread, you pay taker fees. Binance adjusts your fees based on your 30-day trading volume and BNB balance, but we don't currently model these metrics to adjust fees.

    The BinanceFeeModel charges fees in the currency you receive from a trade. For example, if you buy ETHBTC, you pay fees in ETH. If you sell ETHBTC, you pay fees in BTC.

    To view the implementation of this model, see the LEAN GitHub repository .

    Binance Futures Model

    The BinanceFuturesFeeModel models the Binance Futures live trading fees .

    security.SetFeeModel(new BinanceFuturesFeeModel());
    security.set_fee_model(BinanceFuturesFeeModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    mUsdtFee m_usdt_fee decimal float Maker fee value for USDT pair contracts 0.0002
    tUsdtFee t_usdt_fee decimal float Taker fee value for USDT pair contracts 0.0004
    mBusdFee m_busd_fee decimal float Maker fee value for BUSD pair contracts 0.00012
    tBusdFee t_busd_fee decimal float Taker fee value for BUSD pair contracts 0.00036

    By default, the BinanceFuturesFeeModel charges the order fees of Binance Futures at the Regular User level. If you add liquidity to the order book by placing a limit order that doesn't cross the spread, you pay maker fees. If you remove liquidity from the order book by placing an order that crosses the spread, you pay taker fees. Binance adjusts your fees based on your 30-day trading volume and BNB balance, but we don't currently model these metrics to adjust fees.

    The BinanceFuturesFeeModel charges fees in the currency you receive from a trade. For example, if you buy BTCUSD, you pay fees in BTC. If you sell BTCUSD, you pay fees in USD.

    To view the implementation of this model, see the LEAN GitHub repository .

    Binance Coin Futures Model

    The BinanceCoinFuturesFeeModel models the Binance Coin Futures live trading fees .

    security.SetFeeModel(new BinanceCoinFuturesFeeModel());
    security.set_fee_model(BinanceCoinFuturesFeeModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    mFee m_fee decimal float Maker fee value 0.0001
    tFee t_fee decimal float Taker fee value 0.0005

    By default, the BinanceCoinFuturesFeeModel charges the order fees of Binance Coin Futures at the Regular User level. If you add liquidity to the order book by placing a limit order that doesn't cross the spread, you pay maker fees. If you remove liquidity from the order book by placing an order that crosses the spread, you pay taker fees. Binance adjusts your fees based on your 30-day trading volume and BNB balance, but we don't currently model these metrics to adjust fees.

    The BinanceCoinFuturesFeeModel charges fees in the currency you receive from a trade. For example, if you buy BTCUSDT, you pay fees in BTC. If you sell BTCUSDT, you pay fees in USDT.

    To view the implementation of this model, see the LEAN GitHub repository .

    Bitfinex Model

    The BitfinexFeeModel models the Bitfinex live trading fees .

    security.SetFeeModel(new BitfinexFeeModel());
    security.set_fee_model(BitfinexFeeModel())

    The BitfinexFeeModel charges a 0.1% maker fee and a 0.2% taker fee. If you place a limit order that hits a hidden order or you add liquidity to the order book by placing a limit order that doesn't cross the spread, you pay maker fees. If you place a hidden order or you remove liquidity from the order book by placing an order that crosses the spread, you pay taker fees. Bitfinex adjusts your fees based on your 30-day trading volume and LEO balance, but we don't currently model these metrics to adjust fees.

    The BitfinexFeeModel charges fees in the currency you receive from a trade. For example, if you buy ETHBTC, you pay fees in ETH. If you sell ETHBTC, you pay fees in BTC.

    To view the implementation of this model, see the LEAN GitHub repository .

    Bybit Model

    The BybitFeeModel models the Bybit live trading fees .

    security.SetFeeModel(new BybitFeeModel());
    security.set_fee_model(BybitFeeModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    mFee m_fee decimal float Maker fee value 0.001
    tFee t_fee decimal float Taker fee value 0.001

    The BybitFeeModel charges the order fees of Bybit at the VIP 0 level, which is a 0.1% maker and taker fee for spot trades. If you add liquidity to the order book by placing a limit order that doesn't cross the spread, you pay maker fees. If you remove liquidity from the order book by placing an order that crosses the spread, you pay taker fees. Bybit adjusts your fees based on your 30-day trading volume, net borrowings, or asset balance, but we don't currently model these metrics to adjust fees. Bybit also charges different fees for fiat-Crypto pairs, (for example, USDT/EUR), but the BybitFeeModel charges the same fee rate for all pairs.

    The BybitFeeModel charges fees in the currency you receive from a trade. For example, if you buy ETHBTC, you pay fees in ETH. If you sell ETHBTC, you pay fees in BTC.

    To view the implementation of this model, see the LEAN GitHub repository .

    Bybit Futures Model

    The BybitFuturesFeeModel models the Bybit live trading fees .

    security.SetFeeModel(new BybitFuturesFeeModel());
    security.set_fee_model(BybitFuturesFeeModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    makerFee maker_fee decimal float Maker fee value 0.0002
    takerFee taker_fee decimal float Taker fee value 0.00055

    The BybitFuturesFeeModel charges the order fees of Bybit at the VIP 0 level, which is a 0.02% maker and a 0.055% taker fee for Crypto Futures trades. If you add liquidity to the order book by placing a limit order that doesn't cross the spread, you pay maker fees. If you remove liquidity from the order book by placing an order that crosses the spread, you pay taker fees. Bybit adjusts your fees based on your 30-day trading volume, net borrowings, or asset balance, but we don't currently model these metrics to adjust fees.

    The BybitFuturesFeeModel charges fees in the currency you receive from a trade. For example, if you buy BTCUSDT, you pay fees in BTC. If you sell BTCUSDT, you pay fees in USDT.

    To view the implementation of this model, see the LEAN GitHub repository .

    Coinbase Model

    The CoinbaseFeeModel models the Coinbase live trading fees .

    security.SetFeeModel(new CoinbaseFeeModel());
    security.set_fee_model(CoinbaseFeeModel())

    The CoinbaseFeeModel models the order fees of Coinbase at the $50K-100K pricing tier for all Crypto pairs, so it charges a 0.5% maker and taker fee for most pairs. The following table shows the Coinbase Stable Pairs, which charge a 0% maker fee and a 0.1% taker fee:

    Stable Pairs
    DAIUSDC DAIUSD GYENUSD PAXUSD
    PAXUSDT MUSDUSD USDCEUR USDCGBP
    USDTEUR USDTGBP USDTUSD USDTUSDC
    USTEUR USTUSD USTUSDT WBTCBTC

    If you add liquidity to the order book by placing a limit order that doesn't cross the spread, you pay maker fees. If you remove liquidity from the order book by placing an order that crosses the spread, you pay taker fees. Coinbase adjusts your fees based on your 30-day trading volume, but we don't currently model trading volume to adjust fees.

    The CoinbaseFeeModel models the adjustments Coinbase has made to their fees over time. The following table shows the fees for each time period:

    Time Period (UTC) Maker Fee (%) Taker Fee (%)
    Time < 3/23/2019 1:30AM 0 0.3
    3/23/2019 1:30AM <= Time < 10/8/2019 12:30AM 0.15 0.25
    10/8/2019 12:30AM <= Time 0.5 0.5

    The CoinbaseFeeModel charges fees in the quote currency .

    To view the implementation of this model, see the LEAN GitHub repository .

    Kraken Model

    The KrakenFeeModel models the fees of Kraken .

    security.SetFeeModel(new KrakenFeeModel());
    security.set_fee_model(KrakenFeeModel())

    The KrakenFeeModel model the order fees of Kraken. For trading pairs that contain only Crypto assets, this fee model models the lowest tier in Kraken's tiered fee structure, which is a 0.16% maker fee and a 0.26% taker fee. If you add liquidity to the order book by placing a limit order that doesn't cross the spread, you pay maker fees. If you remove liquidity from the order book by placing an order that crosses the spread, you pay taker fees. For trading pairs that have any of the following currencies as the base currency in the pair, the fee is 0.2%:

    The KrakenFeeModel charges fees in the quote currency for buy orders and in the base currency for sell orders. To override these settings, define the KrakenOrderProperties .

    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new KrakenOrderProperties()
        {
            FeeInBase = true,
            FeeInQuote = false
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new KrakenOrderProperties
                   { 
                       FeeInQuote = true, 
                       FeeInBase = false 
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = KrakenOrderProperties()
        self.default_order_properties.fee_in_base = True
        self.default_order_properties.fee_in_quote = False
    
    def on_data(self, slice: Slice) -> None:
        # Override the default order properties
        order_properties = KrakenOrderProperties()
        order_properties.fee_in_quote = True
        order_properties.fee_in_base = False
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Kraken adjusts your fees based on your 30-day trading volume, but the KrakenFeeModel don't currently model trading volume to adjust fees.

    To view the implementation of this model, see the LEAN GitHub repository .

    Samco Model

    The SamcoFeeModel models the fees of Samco .

    security.SetFeeModel(new SamcoFeeModel());
    security.set_fee_model(SamcoFeeModel())

    The SamcoFeeModel models the order fees of Samco by its Equity Intraday fee structure. The following table shows the fees:

    Charge Item Fee
    Brokerage Fee ₹20 per trade or 0.02% (whichever is lower)
    Exchange Transaction Charge 0.00345%
    Securities Transaction Tax 0.025%
    Goods and Services Tax 18%
    SEBI Charges 0.0001%
    Stamp Duty 0.003%

    The SamcoFeeModel charges fees in INR.

    To view the implementation of this model, see the LEAN GitHub repository .

    TD Ameritrade Model

    The TDAmeritradeFeeModel models the fees of TD Ameritrade .

    security.SetFeeModel(new TDAmeritradeFeeModel());
    security.set_fee_model(TDAmeritradeFeeModel())

    The TDAmeritradeFeeModel charges $0 USD for Equity trades.

    To view the implementation of this model, see the LEAN GitHub repository .

    Trade Station Model

    The TradeStationFeeModel models the fees of Trade Station .

    security.SetFeeModel(new TradeStationFeeModel());
    security.set_fee_model(TradeStationFeeModel())

    The following sections describe the trading fees of each asset class. To view the implementation of this model, see the LEAN GitHub repository .

    US Equities

    US Equity trades are free for US residents. For non-US residents, they cost $5 USD per order.

    Equity Options

    Equity Option trades cost $0.60 USD per contract. For non-US residents, they cost an extra $5 USD per order.

    Futures

    Futures trades cost $1.50 USD per contract.

    Wolverine Model

    The WolverineFeeModel models the fees of Wolverine Execution Services.

    security.SetFeeModel(new WolverineFeeModel());
    security.set_fee_model(WolverineFeeModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    feesPerShare fees_per_share decimal? float / NoneType The fees per share to apply. If null None , it uses 0.005. null None

    The WolverineFeeModel charges fees in USD.

    To view the implementation of this model, see the LEAN GitHub repository .

    Zerodha Model

    The ZerodhaFeeModel models the fees of Zerodha .

    security.SetFeeModel(new ZerodhaFeeModel());
    security.set_fee_model(ZerodhaFeeModel())

    The ZerodhaFeeModel models the order fees of Zerodha with its Equity Intraday fee structure. The following table shows the fees:

    Charge Item Fee
    Brokerage Fee ₹20 per trade or 0.03% (whichever is lower)
    Exchange Transaction Charge 0.00345%
    Securities Transaction Tax 0.025%
    Goods and Services Tax 18%
    SEBI Charges 0.0001%
    Stamp Duty 0.003%

    The ZerodhaFeeModel charges fees in INR.

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Reality Modeling

    Brokerages

    Brokerages

    Key Concepts

    Introduction

    Brokerages provide you with a connection to the market so you can fill trades. Brokerage models simulate the live behavior of a real brokerage. To avoid sending invalid orders for execution in live trading, the brokerage model validates your orders before LEAN sends them to the real brokerage. Brokerage models combine together all of the models relevant for a brokerage. If you set the appropriate brokerage model, the supported order types, default markets, and some of the security-level models are appropriately set in your algorithm.

    Set Models

    To set a brokerage model, in the Initialize initialize method, call the SetBrokerageModel set_brokerage_model method with a BrokerageName and an AccountType . If you set a brokerage model, it overrides any security level models you manually set in your algorithm.

    SetBrokerageModel(BrokerageName.OandaBrokerage); // Defaults to margin account
    SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Margin); // Overrides the default account type
    
    self.set_brokerage_model(BrokerageName.OANDA_BROKERAGE) # Defaults to margin account
    self.set_brokerage_model(BrokerageName.BITFINEX, AccountType.MARGIN) # Overrides the default account type
    

    In live trading, LEAN doesn't ignore your SetBrokerageModel set_brokerage_model method calls. LEAN uses some of the brokerage model rules to catch invalid orders before they reach your real brokerage.

    To view all the pre-built brokerage models, see Supported Models .

    Default Behavior

    The default brokerage model is the DefaultBrokerageModel , but LEAN has many other brokerage models you can use in your algorithms. For more information about the DefaultBrokerageModel , see QuantConnect Paper Trading .

    Modeled Properties

    Brokerage models model that following properties:

    Model Structure

    Brokerage models should extend the DefaultBrokerageModel class. Extensions of the DefaultBrokerageModel class should implement the following methods:

    // In the Initialize method, set the custom brokerage model
    SetBrokerageModel(new MyBrokerageModel());
        
    // Define the custom brokerage model outside of the algorithm
    class MyBrokerageModel : DefaultBrokerageModel
    {
        public override decimal RequiredFreeBuyingPowerPercent { get; }
    
        public new IReadOnlyDictionary<SecurityType, string> DefaultMarkets  = new Dictionary<SecurityType, string>
        {
            {SecurityType.Equity, Market.USA}
        }.ToReadOnlyDictionary();
    
        public MyBrokerageModel(AccountType accountType = AccountType.Margin)
            : base(accountType)
        {
            
        }
    
        public override bool CanSubmitOrder(Security security, Order order,
            out BrokerageMessageEvent message)
        {
            return base.CanSubmitOrder(security, order, out message);
        }
    
        public override bool CanUpdateOrder(Security security, Order order,
            UpdateOrderRequest request, out BrokerageMessageEvent message)
        {
            return base.CanUpdateOrder(security, order, request, out message);
        }
    
        public override bool CanExecuteOrder(Security security, Order order)
        {
            return base.CanExecuteOrder(security, order);
        }
    
        public override void ApplySplit(List<OrderTicket> tickets, Split split)
        {
            base.ApplySplit(tickets, split);
        }
    
        public override decimal GetLeverage(Security security)
        {
            return base.GetLeverage(security);
        }
    
        public override IBenchmark GetBenchmark(SecurityManager securities)
        {
            return base.GetBenchmark(securities);
        }
    
        public override IFillModel GetFillModel(Security security)
        {
            return base.GetFillModel(security);
        }
    
        public override IFeeModel GetFeeModel(Security security)
        {
            return base.GetFeeModel(security);
        }
    
        public override ISlippageModel GetSlippageModel(Security security)
        {
            return base.GetSlippageModel(security);
        }
    
        public override ISettlementModel GetSettlementModel(Security security)
        {
            return base.GetSettlementModel(security);
        }
    
        public override IBuyingPowerModel GetBuyingPowerModel(Security security)
        {
            return base.GetBuyingPowerModel(security);
        }
    
        public override IMarginInterestRateModel GetMarginInterestRateModel(Security security)
        {
            return base.GetMarginInterestRateModel(security);
        }
    
        public override IShortableProvider GetShortableProvider(Security security)
        {
            return base.GetShortableProvider(security);
        }
    }
    
    # In the Initialize method, set the custom brokerage model
    self.set_brokerage_model(MyBrokerageModel())
    
    # Define the custom brokerage model outside of the algorithm
    class MyBrokerageModel(DefaultBrokerageModel):
        default_markets = {SecurityType.EQUITY: Market.USA}
        required_free_buying_power_percent = 0
    
        def __init__(self, accountType: account_type = account_type.margin):
            self.account_type = accountType
        
        def can_submit_order(self, security: Security, order: Order,
             message: BrokerageMessageEvent) -> bool:
            return super().can_submit_order(security, order, message)
    
        def can_update_order(self, security: Security, order: Order,
             request: UpdateOrderRequest, message: BrokerageMessageEvent) -> bool:
            return super().can_update_order(security, order, request, message)
    
        def can_execute_order(self, security: Security, order: Order) -> bool:
            return super().can_execute_order(security, order)
    
        def apply_split(self, tickets: List[OrderTicket], split: Split) -> None:
            super().apply_split(tickets, split)
    
        def get_leverage(self, security: Security) -> float:
            return super().get_leverage(security)
    
        def get_benchmark(self, securities: SecurityManager) -> IBenchmark:
            return super().get_benchmark(securities)
    
        def get_fill_model(self, security: Security) -> IFillModel:
            return super().get_fill_model(security)
    
        def get_fee_model(self, security: Security) -> IFeeModel:
            return super().get_fee_model(security)
    
        def get_slippage_model(self, security: Security) -> ISlippageModel:
            return super().get_slippage_model(security)
    
        def get_settlement_model(self, security: Security) -> ISettlementModel:
            return super().get_settlement_model(security)
    
        def get_buying_power_model(self, security: Security) -> IBuyingPowerModel:
            return super().get_buying_power_model(security)
    
        def get_margin_interest_rate_model(self, security: Security) -> IMarginInterestRateModel:
            return super().get_margin_interest_rate_model(security)
    
        def get_shortable_provider(self, security: Security) -> IShortableProvider:
            return super().get_shortable_provider(security)

    For a full example algorithm, see this backtest this backtest .

    Custom brokerage models give you enormous control over your algorithm behavior and allow you to model virtually any brokerage in the world.

    Examples

    Demonstration Algorithms
    BrokerageModelAlgorithm.py Python BrokerageModelAlgorithm.cs C# CustomBrokerageMessageHandlerAlgorithm.cs C#

     

    Brokerages

    Supported Models

    Brokerage models combine together all of the models relevant for a brokerage. The following brokerage models are available:

    See Also

    Reality Modeling
    Live Trading Brokerages

     

    Supported Models

    QuantConnect Paper Trading

    Introduction

    This page explains the DefaultBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.QuantConnectBrokerage, AccountType.Cash);
    SetBrokerageModel(BrokerageName.QuantConnectBrokerage, AccountType.Margin); // Overrides the default account type
    self.set_brokerage_model(BrokerageName.QUANTCONNECT_BROKERAGE) # Defaults to margin account
    self.set_brokerage_model(BrokerageName.QUANTCONNECT_BROKERAGE, AccountType.MARGIN) # Overrides the default account type

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The DefaultBrokerageModel supports trading for all asset classes .

    Orders

    The following sections describe how the DefaultBrokerageModel handles orders.

    Order Types

    The following table describes the available order types for each asset class that the DefaultBrokerageModel supports:

    Order Type US Equity Equity Options Crypto Crypto Futures Forex CFD Futures Futures Options Index Options
    MarketOrder green check green check green check green check green check green check green check green check green check
    LimitOrder green check green check green check green check green check green check green check green check green check
    LimitIfTouchedOrder green check green check green check green check green check green check green check green check green check
    StopMarketOrder green check green check green check green check green check green check green check green check green check
    StopLimitOrder green check green check green check green check green check green check green check green check green check
    MarketOnOpenOrder green check green check green check green check green check green check
    MarketOnCloseOrder green check green check green check green check green check green check green check green check
    ComboMarketOrder green check green check green check
    ComboLimitOrder green check green check green check
    ComboLegLimitOrder green check green check green check
    ExerciseOption green check
    Not supported for cash-settled Options
    green check

    Time In Force

    The DefaultBrokerageModel supports the following TimeInForce instructions:

    Updates

    The DefaultBrokerageModel supports order updates .

    Handling Splits

    If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:

    Fills

    The following table shows the fill model that the DefaultBrokerageModel uses for each SecurityType :

    SecurityType Fill Model
    Equity EquityFillModel
    Future FutureFillModel
    FutureOption FutureOptionFillModel
    Remaining SecurityType values ImmediateFillModel

    Slippage

    The DefaultBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The DefaultBrokerageModel uses the ConstantFeeModel with no fees for Forex, CFD, Crypto, and Crypto Future assets and the InteractiveBrokersFeeModel for the remaining asset classes.

    // For Forex, CFD, Crypto, and Crypto Future assets:
    security.SetFeeModel(new ConstantFeeModel(0.0m));
    
    // For the remaining asset classes:
    security.SetFeeModel(new InteractiveBrokersFeeModel());
    
    # For Forex, CFD, Crypto, and Crypto Future assets:
    security.set_fee_model(ConstantFeeModel(0))
    
    # For the remaining asset classes:
    security.set_fee_model(InteractiveBrokersFeeModel())

    Buying Power

    The DefaultBrokerageModel sets the buying power model based on the asset class of the security. The following table shows the default buying power model of each asset class:

    Asset Class Model
    Equity Options OptionMarginModel
    Futures FutureMarginModel
    Future Options FuturesOptionsMarginModel
    Index Options OptionMarginModel
    Crypto CashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
    CryptoFuture CryptoFutureMarginModel
    Forex CashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
    Other SecurityMarginModel

    If you have a margin account, the DefaultBrokerageModel allows 2x leverage for Equities, 50x leverage for Forex and CFDs, and 1x leverage for the remaining asset classes.

    Settlement

    The following table shows which settlement model the DefaultBrokerageModel uses based on the security type and your account type:

    Security Type Account Type Settlement Model
    Equity Cash DelayedSettlementModel with the default settlement rules
    Option Cash DelayedSettlementModel with the default settlement rules
    Future Any FutureSettlementModel

    For all other cases, the DefaultBrokerageModel uses the ImmediateSettlementModel .

    // For US Equities with a cash account:
    security.SetSettlementModel(new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime));
    
    // For Equity Options with a cash account:
    security.SetSettlementModel(new DelayedSettlementModel(Option.DefaultSettlementDays, Option.DefaultSettlementTime));
    
    // For Futures
    security.SetSettlementModel(new FutureSettlementModel());
    
    // For remaining cases:
    security.SetSettlementModel(new ImmediateSettlementModel());
    # For US Equities with a cash account:
    security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME))
    
    # For Equity Options with a cash account:
    security.set_settlement_model(DelayedSettlementModel(Option.DEFAULT_SETTLEMENT_DAYS, Option.DEFAULT_SETTLEMENT_TIME))
    
    # For Futures
    security.set_settlement_model(FutureSettlementModel())
    
    # For remaining cases:
    security.set_settlement_model(ImmediateSettlementModel())

    Margin Interest Rate

    The DefaultBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The following table describes the default markets of each SecurityType for the DefaultBrokerageModel :

    SecurityType Market
    Equity USA
    Option USA
    Future CME
    FutureOption CME
    Index USA
    IndexOption USA
    Forex Oanda
    Cfd Oanda
    Crypto Coinbase
    CryptoFuture Binance

     

    Supported Models

    Binance

    Introduction

    This page explains the Binance brokerage models, including the asset classes they supports, their default security-level models , and their default markets.

    // Binance Spot
    SetBrokerageModel(BrokerageName.Binance, AccountType.Cash);
    SetBrokerageModel(BrokerageName.Binance, AccountType.Margin);
    
    // Binance Futures
    SetBrokerageModel(BrokerageName.BinanceFutures, AccountType.Margin);
    SetBrokerageModel(BrokerageName.BinanceCoinFutures, AccountType.Margin);
    
    // Binance US Spot
    SetBrokerageModel(BrokerageName.BinanceUS, AccountType.Cash);
    # Binance Spot
    self.set_brokerage_model(BrokerageName.BINANCE, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.BINANCE, AccountType.MARGIN)
    
    # Binance Futures
    self.set_brokerage_model(BrokerageName.BINANCE_FUTURES, AccountType.MARGIN)
    self.set_brokerage_model(BrokerageName.BINANCE_COIN_FUTURES, AccountType.MARGIN)
    
    # Binance US Spot
    self.set_brokerage_model(BrokerageName.BINANCE_US, AccountType.CASH)

    To view the implementation of these models, see the following pages in the LEAN GitHub repository:

    Asset Classes

    The Binance brokerage models support trading Crypto and Crypto Futures .

    The Binance US brokerage model supports trading Crypto .

    Orders

    The Binance and Binance US brokerage models support several order types and order properties, but don't support order updates.

    Order Types

    The following table describes the available order types for each asset class that the Binance and Binance US brokerage models support:

    Order Type Crypto Crypto Futures
    MarketOrder green check green check
    LimitOrder green check green check
    StopLimitOrder green check

    Order Properties

    The Binance and Binance US brokerage models supports custom order properties. The following table describes the members of the BinanceOrderProperties object that you can set to customize order execution:

    Property Description
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The following instructions are supported:
    • Day DAY
    • GoodTilCanceled GOOD_TIL_CANCELED
    • GoodTilDate GOOD_TIL_DATE
    PostOnly post_only A flag to signal that the order must only add liquidity to the order book and not take liquidity from the order book. If part of the order results in taking liquidity rather than providing liquidity, the order is rejected without any part of it being filled.
    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new BinanceOrderProperties
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
            PostOnly = false
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new BinanceOrderProperties
                   { 
                       TimeInForce = TimeInForce.Day,
                       PostOnly = false
                   });
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new BinanceOrderProperties
                   { 
                       TimeInForce = TimeInForce.GoodTilDate(new DateTime(year, month, day)),
                       PostOnly = true
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = BinanceOrderProperties()
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
        self.default_order_properties.post_only = False
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = BinanceOrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        order_properties.post_only = True
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The Binance and Binance US brokerage models don't support order updates, but you can cancel an existing order and then create a new order with the desired arguments. For more information about this workaround, see the Workaround for Brokerages That Don’t Support Updates .

    Fills

    The Binance brokerage models use the ImmediateFillModel .

    Slippage

    The Binance brokerage models use the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The following table shows the fee model that each Binance brokerage model uses:

    Brokerage Model Fee Model
    BinanceBrokerageModel BinanceFeeModel
    BinanceFuturesBrokerageModel BinanceFuturesFeeModel
    BinanceCoinFuturesBrokerageModel BinanceCoinFuturesFeeModel
    BinanceUSBrokerageModel BinanceFeeModel

    The Binance brokerage models use the default argument values for each fee model so that it models the current Binance fee schedule.

    Buying Power

    The Binance brokerage models use the CashBuyingPowerModel for cash accounts and the SecurityMarginModel for margin accounts.

    The following table shows the maximum leverage each brokerage model allows for margin accounts:

    Brokerage Model Maximum Leverage
    BinanceBrokerageModel 3
    BinanceFuturesBrokerageModel 25
    BinanceCoinFuturesBrokerageModel 25

    The BinanceUSBrokerageModel doesn't currently support margin trading.

    Settlement

    The Binance brokerage models use the ImmediateSettlementModel .

    Margin Interest Rate

    The following table shows the margin interest rate model that the Binance brokerages use:

    Brokerage Model Margin Interest Rate Model
    BinanceBrokerageModel NullMarginInterestRateModel
    BinanceFuturesBrokerageModel BinanceFutureMarginInterestRateModel for Crypto Perpetual Futures and NullMarginInterestRateModel for other assets
    BinanceCoinFuturesBrokerageModel BinanceFutureMarginInterestRateModel for Crypto Perpetual Futures and NullMarginInterestRateModel for other assets
    BinanceUSBrokerageModel NullMarginInterestRateModel

    Default Markets

    The following table shows the default market of the Binance brokerage models:

    Brokerage Model Market
    BinanceBrokerageModel Market.Binance Market.BINANCE
    BinanceFuturesBrokerageModel Market.Binance Market.BINANCE
    BinanceCoinFuturesBrokerageModel Market.Binance Market.BINANCE
    BinanceUSBrokerageModel Market.BinanceUS Market.BINANCE_US

     

    Supported Models

    Bitfinex

    Introduction

    This page explains the BitfinexBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Cash);
    SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.BITFINEX, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.BITFINEX, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The BitfinexBrokerageModel supports trading Crypto .

    Orders

    The BitfinexBrokerageModel supports several order types, order properties, and order updates.

    Order Types

    The following table describes the available order types for each asset class that the BitfinexBrokerageModel supports:

    Order Type Crypto
    MarketOrder green check
    LimitOrder green check
    LimitIfTouchedOrder green check
    StopMarketOrder green check
    StopLimitOrder green check
    MarketOnOpenOrder green check
    MarketOnCloseOrder green check

    Order Properties

    The BitfinexBrokerageModel supports custom order properties. The following table describes the members of the BitfinexOrderProperties object that you can set to customize order execution:

    Property Description
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The following instructions are supported:
    • Day DAY
    • GoodTilCanceled GOOD_TIL_CANCELED
    • GoodTilDate GOOD_TIL_DATE
    Hidden hidden A flag to signal that the order should be hidden. Hidden orders do not appear in the order book, so they do not influence other market participants. Hidden orders incur the taker fee.
    PostOnly post_only A flag to signal that the order must only add liquidity to the order book and not take liquidity from the order book. If part of the order results in taking liquidity rather than providing liquidity, the order is rejected without any part of it being filled.
    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new BitfinexOrderProperties
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
            Hidden = false,
            PostOnly = false
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new BitfinexOrderProperties
                   { 
                       TimeInForce = TimeInForce.Day,
                       Hidden = true,
                       PostOnly = false
                   });
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new BitfinexOrderProperties
                   { 
                       TimeInForce = TimeInForce.GoodTilDate(new DateTime(year, month, day)),
                       Hidden = false,
                       PostOnly = true
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = BitfinexOrderProperties()
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
        self.default_order_properties.hidden = False
        self.default_order_properties.post_only = False
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = BitfinexOrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        order_properties.hidden = True
        order_properties.post_only = False
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
        order_properties.hidden = False
        order_properties.post_only = True
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The BitfinexBrokerageModel supports order updates .

    Fills

    The BitfinexBrokerageModel uses the ImmediateFillModel .

    Slippage

    The BitfinexBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The BitfinexBrokerageModel uses the BitfinexFeeModel with the default argument values that models the current Bitfinex fee schedule.

    Buying Power

    The BitfinexBrokerageModel uses the CashBuyingPowerModel for cash accounts and the SecurityMarginModel for margin accounts.

    If you have a margin account, the BitfinexBrokerageModel allows 3.3x leverage.

    Settlement

    The BitfinexBrokerageModel uses the ImmediateSettlementModel .

    Margin Interest Rate

    The BitfinexBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the BitfinexBrokerageModel is Market.Bitfinex Market.BITFINEX .

     

    Supported Models

    Bybit

    Introduction

    This page explains the BybitBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.Bybit, AccountType.Cash);
    SetBrokerageModel(BrokerageName.Bybit, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.BYBIT, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The BybitBrokerageModel supports trading Crypto and Crypto Futures .

    Orders

    The BybitBrokerageModel supports several order types, order properties, and order updates.

    Order Types

    The following table describes the available order types for each asset class that the BybitBrokerageModel supports:

    Order Type Crypto Crypto Futures
    MarketOrder green check green check
    LimitOrder green check green check
    StopMarketOrder green check green check
    StopLimitOrder green check green check

    Order Properties

    The BybitBrokerageModel supports custom order properties. The following table describes the members of the BybitBrokerageModel object that you can set to customize order execution:

    Property Description
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The following instructions are supported:
    • Day DAY
    • GoodTilCanceled GOOD_TIL_CANCELED
    • GoodTilDate GOOD_TIL_DATE
    PostOnly post_only A flag to signal that the order must only add liquidity to the order book and not take liquidity from the order book. If part of the order results in taking liquidity rather than providing liquidity, the order is rejected without any part of it being filled. This order property is only available for limit orders.
    ReduceOnly reduce_only A flag to signal that the order must only reduce your current position size. For more information about this order property, see Reduce-Only Order on the Bybit website.
    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new BybitOrderProperties
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
            PostOnly = false,
            ReduceOnly = false
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new BybitOrderProperties
                   { 
                       TimeInForce = TimeInForce.Day,
                       PostOnly = true,
                       ReduceOnly = false
                   });
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new BybitOrderProperties
                   { 
                       TimeInForce = TimeInForce.GoodTilDate(new DateTime(year, month, day)),
                       PostOnly = false,
                       ReduceOnly = true
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = BybitOrderProperties()
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
        self.default_order_properties.post_only = False
        self.default_order_properties.reduce_only = False
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = BybitOrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        order_properties.post_only = True
        self.default_order_properties.reduce_only = False
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
        order_properties.post_only = False
        self.default_order_properties.reduce_only = True
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The BybitBrokerageModel supports order updates for Crypto Future assets that have one of the following order states :

    In cases where you can't update an order, you can cancel the existing order and then create a new order with the desired arguments. For more information about this workaround, see the Workaround for Brokerages That Don’t Support Updates .

    Fills

    The BybitBrokerageModel uses the ImmediateFillModel .

    Slippage

    The BybitBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The BybitBrokerageModel uses the BybitFeeModel for Crypto trades and the BybitFuturesFeeModel for Crypto Future trades. In both cases, the brokerage model uses the default argument values that models the Bybit fee schedule for VIP Level 0.

    Buying Power

    The BybitBrokerageModel sets the buying power model based on the asset class of the security. The following table shows the default buying power model of each asset class:

    Asset Class Model
    Crypto CashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
    CryptoFuture CryptoFutureMarginModel

    If you have a margin account, the BybitBrokerageModel allows 10x leverage.

    Settlement

    The BybitBrokerageModel uses the ImmediateSettlementModel .

    Margin Interest Rate

    The BybitBrokerageModel uses the BybitFutureMarginInterestRateModel for perpetual Futures and the NullMarginInterestRateModel for every other asset.

    Default Markets

    The default market of the BybitBrokerageModel is Market.Bybit Market.BYBIT .

     

    Supported Models

    Coinbase

    Introduction

    This page explains the CoinbaseBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.Coinbase, AccountType.Cash);
    self.set_brokerage_model(BrokerageName.COINBASE, AccountType.CASH)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The CoinbaseBrokerageModel supports trading Crypto .

    Orders

    The CoinbaseBrokerageModel supports several order types and order properties, but it doesn't support order updates.

    Order Types

    The following table describes the available order types for each asset class that the CoinbaseBrokerageModel supports:

    Order Type Crypto
    MarketOrder green check
    LimitOrder green check
    StopMarketOrder green check
    Supported after 2019-03-23 in backtests. For reference, see the Coinbase Market Structure Update on the Coinbase website.
    StopLimitOrder green check

    Order Properties

    The CoinbaseBrokerageModel supports custom order properties. The following table describes the members of the CoinbaseOrderProperties object that you can set to customize order execution:

    Property Description
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The GoodTilCanceled TimeInForce is supported.
    PostOnly post_only A flag that signals the order must only add liquidity to the order book and not take liquidity from the order book. If part of the order results in taking liquidity rather than providing liquidity, the order is rejected without any part of it being filled.
    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new CoinbaseOrderProperties
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
            PostOnly = false
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new CoinbaseOrderProperties
                   { 
                       TimeInForce = TimeInForce.GoodTilCanceled,
                       PostOnly = true
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = CoinbaseOrderProperties()
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
        self.default_order_properties.post_only = False
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = CoinbaseOrderProperties()
        order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
        order_properties.post_only = True
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The CoinbaseBrokerageModel doesn't support order updates, but you can cancel an existing order and then create a new order with the desired arguments. For more information about this workaround, see the Workaround for Brokerages That Don’t Support Updates .

    Fills

    The CoinbaseBrokerageModel uses the ImmediateFillModel .

    Slippage

    The CoinbaseBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The CoinbaseBrokerageModel uses the CoinbaseFeeModel .

    Buying Power

    The CoinbaseBrokerageModel uses the CashBuyingPowerModel . The brokerage model doesn't currently support margin trading.

    Settlement

    The CoinbaseBrokerageModel uses the ImmediateSettlementModel .

    Margin Interest Rate

    The CoinbaseBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the CoinbaseBrokerageModel is Market.Coinbase Market.COINBASE .

     

    Supported Models

    Interactive Brokers

    Introduction

    This page explains the InteractiveBrokersBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Cash);
    SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.INTERACTIVE_BROKERS_BROKERAGE, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.INTERACTIVE_BROKERS_BROKERAGE, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The InteractiveBrokersBrokerageModel supports the following asset classes:

    Orders

    The InteractiveBrokersBrokerageModel supports several order types, order properties, and order updates.

    Order Types

    The following table describes the order types that the InteractiveBrokersBrokerageModel supports: supports. For specific details about each order type, refer to the IB documentation.

    Order Type IB Documentation Page
    MarketOrder Market Orders
    LimitOrder Limit Orders
    LimitIfTouchedOrder Limit if Touched Orders
    StopMarketOrder Stop Orders
    StopLimitOrder Stop-Limit Orders
    TrailingStopOrder Trailing Stop Orders
    MarketOnOpenOrder Market-on-Open (MOO) Orders
    MarketOnCloseOrder Market-on-Close (MOC) Orders
    ComboMarketOrder Spread Orders
    ComboLimitOrder Spread Orders
    ComboLegLimitOrder Spread Orders
    ExerciseOption Options Exercise

    The following table describes the available order types for each asset class that the InteractiveBrokersBrokerageModel supports:

    Order Type US Equity Equity Options Forex Futures Futures Options Index Options CFD
    MarketOrder green check green check green check green check green check green check green check
    LimitOrder green check green check green check green check green check green check green check
    LimitIfTouchedOrder green check green check green check green check green check green check green check
    StopMarketOrder green check green check green check green check green check green check green check
    StopLimitOrder green check green check green check green check green check green check green check
    TrailingStopOrder green check green check green check green check green check green check green check
    MarketOnOpenOrder green check green check green check green check
    MarketOnCloseOrder green check green check
    ComboMarketOrder green check green check green check
    ComboLimitOrder green check green check green check
    ComboLegLimitOrder green check green check green check
    ExerciseOption green check
    Not supported for cash-settled Options
    green check

    Order Properties

    The InteractiveBrokersBrokerageModel supports custom order properties. The following table describes the members of the InteractiveBrokersOrderProperties object that you can set to customize order execution. The table does not include the preceding methods for FA accounts.

    Property Description
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The following instructions are supported:
    • Day DAY
    • GoodTilCanceled GOOD_TIL_CANCELED
    • GoodTilDate GOOD_TIL_DATE
    OutsideRegularTradingHours outside_regular_trading_hours A flag to signal that the order may be triggered and filled outside of regular trading hours.
    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new InteractiveBrokersOrderProperties
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
            OutsideRegularTradingHours = false
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new InteractiveBrokersOrderProperties
                   { 
                       TimeInForce = TimeInForce.Day,
                       OutsideRegularTradingHours = false
                   });
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new InteractiveBrokersOrderProperties
                   { 
                       TimeInForce = TimeInForce.GoodTilDate(new DateTime(year, month, day)),
                       OutsideRegularTradingHours = true
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = InteractiveBrokersOrderProperties()
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
        self.default_order_properties.outside_regular_trading_hours = False
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = InteractiveBrokersOrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        order_properties.outside_regular_trading_hours = True
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The InteractiveBrokersBrokerageModel supports order updates .

    Financial Advisor Group Orders

    To place FA group orders, see Financial Advisors .

    Fractional Trading

    The InteractiveBrokersBrokerageModel doesn't support fractional trading .

    Handling Splits

    If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:

    Order Size Limits

    The InteractiveBrokersBrokerageModel enforces the Spot Currency Minimum/Maximum Order Sizes from the IB website.

    Fills

    The following table shows the fill model that the InteractiveBrokersBrokerageModel uses for each SecurityType :

    SecurityType Fill Model
    Equity EquityFillModel
    Future FutureFillModel
    FutureOption FutureOptionFillModel
    Remaining SecurityType values ImmediateFillModel

    Slippage

    The InteractiveBrokersBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The InteractiveBrokersBrokerageModel uses the InteractiveBrokersFeeModel with the default argument values. We model current Interactive Brokers fees on all assets.

    Buying Power

    The InteractiveBrokersBrokerageModel sets the buying power model based on the asset class of the security. The following table shows the default buying power model of each asset class:

    Asset Class Model
    Equity Options OptionMarginModel
    Futures FutureMarginModel
    Future Options FuturesOptionsMarginModel
    Index Options OptionMarginModel
    Crypto CashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
    CryptoFuture CryptoFutureMarginModel
    Forex CashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
    Other SecurityMarginModel

    If you have a margin account, the InteractiveBrokersBrokerageModel allows 2x leverage for Equities, 50x leverage for Forex, 10x leverage for CFDs, and 1x leverage for the remaining asset classes.

    Settlement

    The InteractiveBrokersBrokerageModel uses the ImmediateSettlementModel in most cases. If you trade US Equities or Equity Options with a cash account, it uses the DelayedSettlementModel with the default settlement rules .

    The following table shows which settlement model the InteractiveBrokersBrokerageModel uses based on the security type and your account type:

    Security Type Account Type Settlement Model
    Equity Cash DelayedSettlementModel with the default settlement rules
    Option Cash DelayedSettlementModel with the default settlement rules
    Future Any FutureSettlementModel

    For all other cases, the InteractiveBrokersBrokerageModel uses the ImmediateSettlementModel .

    // For US Equities with a cash account:
    security.SetSettlementModel(new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime));
    
    // For Equity Options with a cash account:
    security.SetSettlementModel(new DelayedSettlementModel(Option.DefaultSettlementDays, Option.DefaultSettlementTime));
    
    // For remaining cases:
    security.SetSettlementModel(new ImmediateSettlementModel());
    # For US Equities with a cash account:
    security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME))
    
    # For Equity Options with a cash account:
    security.set_settlement_model(DelayedSettlementModel(Option.DEFAULT_SETTLEMENT_DAYS, Option.DEFAULT_SETTLEMENT_TIME))
    
    # For remaining cases:
    security.set_settlement_model(ImmediateSettlementModel())

    Interactive Brokers doesn't provide information on which assets aren't settled, so we assume each live trading session starts with its cash fully settled.

    Margin Interest Rate

    The InteractiveBrokersBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The following table describes the default markets of each SecurityType for the InteractiveBrokersBrokerageModel :

    SecurityType Market
    Equity USA
    Option USA
    Future CME
    FutureOption CME
    Index USA
    IndexOption USA
    Forex Oanda
    Cfd InteractiveBrokers

    Financial Advisors

    IB supports FA accounts for Trading Firm and Institution organizations. FA accounts enable certified professionals to use a single trading algorithm to manage several client accounts.

    To place trades using a subset of client accounts, create Account Groups in Trader Workstation and then define the InteractiveBrokersOrderProperties when you create orders.

    DefaultOrderProperties = new InteractiveBrokersOrderProperties
    {
        FaGroup = "TestGroupEQ",
        FaMethod = "EqualQuantity",
        Account = "DU123456"
    };
    self.default_order_properties = InteractiveBrokersOrderProperties()
    self.default_order_properties.fa_group = "TestGroupEQ"
    self.default_order_properties.fa_method = "EqualQuantity"
    self.default_order_properties.account = "DU123456"

    SecurityHolding objects aggregate your positions across all the account groups. If you have two groups where group A has 10 shares of SPY and group B has -10 shares of SPY, then self.portfolio["SPY"].quantity Portfolio["SPY"].Quantity is zero.

    LEAN supports several allocation methods for FA group orders. If you intend to use the same group allocation method for every order, set the DefaultOrderProperties default_order_properties of your algorithm, which sets the order properties for all of your orders.

    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new InteractiveBrokersOrderProperties()
        {
            FaGroup = "TestGroupEQ",
            FaMethod = "EqualQuantity",
            Account = "DU123456"
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);  
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = InteractiveBrokersOrderProperties()
        self.default_order_properties.fa_group = "TestGroupEQ"
        self.default_order_properties.fa_method = "EqualQuantity"
        self.default_order_properties.account = "DU123456"
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);

    To adjust the order properties of an order, change the DefaultOrderProperties default_order_properties or pass an order properties object to the order method . The following sections explain the FA group allocation methods.

    Equal Quantity

    This group allocation method distributes shares equally between all accounts in the group. When you use this method, you need to specify an order quantity.

    For example, say your Account Group includes four accounts and you place an order to buy 400 shares of a stock. In this case, each account receives 100 shares. If your Account Group includes six accounts, each account receives 66 shares, and then 1 share is allocated to each account until all are distributed. After you submit the order, your algorithm receives order events to track the order progress. When all the shares are bought, the order status is OrderStatus.Filled OrderStatus.FILLED . If one of the accounts in the group can't afford 10 of the shares it needs to buy, 10 shares are cancelled and you'll only end up buying 390 shares in total.

    LimitOrder(
        _symbol, quantity, limitPrice, 
        orderProperties: new InteractiveBrokersOrderProperties
        { 
            FaMethod = "EqualQuantity" 
        }
    );
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.fa_method = "EqualQuantity"
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Net Liquidation Value

    This group allocation method distributes shares based on the net liquidation value of each account. The system calculates ratios based on the net liquidation value in each account and allocates shares based on these ratios. When you use this method, you need to specify an order quantity.

    For example, say your account group includes three accounts, A, B and C with Net Liquidation values of $25,000, $50,000 and $100,000, respectively. In this case, the system calculates a ratio of 1:2:4. If you place an order for 700 shares of a stock, it allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.

    LimitOrder(_symbol, quantity, limitPrice, 
        orderProperties: new InteractiveBrokersOrderProperties
        { 
            FaMethod = "NetLiq" 
        }
    );
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.fa_method = "NetLiq"
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Available Equity

    This group allocation method distributes shares based on the amount of available equity in each account. The system calculates ratios based on the available equity in each account and allocates shares based on these ratios. When you use this method, you need to specify an order quantity.

    For example, say your account group includes three accounts, A, B and C with available equity of $25,000, $50,000 and $100,000, respectively. In this case, the system calculates a ratio of 1:2:4. If you place an order for 700 shares of a stock, it allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.

    LimitOrder(_symbol, quantity, limitPrice, 
        orderProperties: new InteractiveBrokersOrderProperties
        { 
            FaMethod = "AvailableEquity" 
        }
    );
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.fa_method = "AvailableEquity"
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

     

    Supported Models

    Kraken

    Introduction

    This page explains the KrakenBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.Kraken, AccountType.Cash);
    SetBrokerageModel(BrokerageName.Kraken, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.KRAKEN, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.KRAKEN, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The KrakenBrokerageModel supports trading Crypto .

    Orders

    The KrakenBrokerageModel supports several order types and order properties, but it doesn't support order updates.

    Order Types

    The following table describes the available order types for each asset class that the KrakenBrokerageModel supports:

    Order Type Crypto
    MarketOrder green check
    LimitOrder green check
    LimitIfTouchedOrder green check
    StopMarketOrder green check
    StopLimitOrder green check

    Order Properties

    The KrakenBrokerageModel supports custom order properties. The following table describes the members of the KrakenOrderProperties object that you can set to customize order execution:

    Property Description
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The following instructions are supported:
    • Day DAY
    • GoodTilCanceled GOOD_TIL_CANCELED
    • GoodTilDate GOOD_TIL_DATE
    PostOnly post_only A flag to signal that the order must only add liquidity to the order book and not take liquidity from the order book. If part of the order results in taking liquidity rather than providing liquidity, the order is rejected without any part of it being filled.
    FeeInBase fee_in_base A flag to signal that the order fees should be paid in the base currency, which is the default behavior when selling. This flag must be the opposite of the FeeInQuote fee_in_quote flag.
    FeeInQuote fee_in_quote A flag to signal that the order fees should be paid in the quote currency, which is the default behavior when buying. This flag must be the opposite of the FeeInBase fee_in_base flag.
    NoMarketPriceProtection A flag to signal that no Market Price Protection should be used.
    ConditionalOrder An Order that's submitted when the primary order is executed. The ConditionalOrder quantity must match the primary order quantity and the ConditionalOrder direction must be the opposite of the primary order direction. This order property is only available for live algorithms.
    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new KrakenOrderProperties
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
            PostOnly = false,
            FeeInBase = true,
            FeeInQuote = false,
            NoMarketPriceProtection = true
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new KrakenOrderProperties
                   { 
                       TimeInForce = TimeInForce.Day,
                       PostOnly = true,
                       FeeInBase = false,
                       FeeInQuote = true,
                       NoMarketPriceProtection = true
                   });
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new KrakenOrderProperties
                   { 
                       TimeInForce = TimeInForce.GoodTilDate(new DateTime(year, month, day)),
                       PostOnly = false,
                       FeeInBase = true,
                       FeeInQuote = false,
                       NoMarketPriceProtection = false,
                       ConditionalOrder = StopLimitOrder(_symbol, -quantity, stopLimitPrice, stopPrice)
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = KrakenOrderProperties()
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
        self.default_order_properties.post_only = False
        self.default_order_properties.fee_in_base = True
        self.default_order_properties.fee_in_quote = False
        self.default_order_properties.no_market_price_protection = True
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = KrakenOrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        order_properties.post_only = True
        order_properties.fee_in_base = False
        order_properties.fee_in_quote = True
        order_properties.no_market_price_protection = True
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
        order_properties.post_only = False
        order_properties.fee_in_base = True
        order_properties.fee_in_quote = False
        order_properties.no_market_price_protection = False
        order_properties.conditional_order = StopLimitOrder(self._symbol, -quantity, stop_limit_price, stop_price)
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The KrakenBrokerageModel doesn't support order updates, but you can cancel an existing order and then create a new order with the desired arguments. For more information about this workaround, see the Workaround for Brokerages That Don’t Support Updates .

    Fills

    The KrakenBrokerageModel uses the ImmediateFillModel .

    Slippage

    The KrakenBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The KrakenBrokerageModel uses the KrakenFeeModel .

    Buying Power

    The KrakenBrokerageModel uses the CashBuyingPowerModel for cash accounts and the SecurityMarginModel for margin accounts.

    If you have a margin account, the KrakenBrokerageModel allows 1x leverage for most Crypto pairs. The following table shows pairs that have additional leverage available:

    Quote Currency Base Currencies Leverage
    ADA BTC, ETH, USD, EUR 3
    BCH BTC, USD, EUR 2
    BTC USD, EUR
    5
    DASH BTC, USD, EUR 3
    EOS BTC, ETH, USD, EUR 3
    ETH BTC, USD, EUR 5
    LINK BTC, ETH, USD, EUR 3
    LTC BTC, USD, EUR 3
    REP BTC, ETH, USD, EUR 2
    TRX BTC, ETH, USD, EUR 3
    USDC USD, EUR 3
    USDT USD, EUR 2
    XMR BTC, USD, EUR 2
    XRP BTC, USD, EUR 3
    XTZ BTC, ETH, USD, EUR 2

    Settlement

    The KrakenBrokerageModel uses the ImmediateSettlementModel .

    Margin Interest Rate

    The KrakenBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the KrakenBrokerageModel is Market.Kraken Market.KRAKEN .

     

    Supported Models

    Oanda

    Introduction

    This page explains the OandaBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.OandaBrokerage, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.OANDA_BROKERAGE, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The OandaBrokerageModel supports trading Forex and CFDs .

    Orders

    The OandaBrokerageModel supports several order types, the TimeInForce order property, and order updates.

    Order Types

    The following table describes the available order types for each asset class that the OandaBrokerageModel supports:

    Order Type Forex CFD
    MarketOrder green check green check
    LimitOrder green check green check
    StopMarketOrder green check green check

    Time In Force

    The OandaBrokerageModel the GoodTilCanceled TimeInForce .

    DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled;
    LimitOrder(_symbol, quantity, limitPrice);
    self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    self.limit_order(self._symbol, quantity, limit_price)

    Updates

    The OandaBrokerageModel supports order updates .

    Fills

    The OandaBrokerageModel uses the ImmediateFillModel .

    Slippage

    The OandaBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The OandaBrokerageModel uses the ConstantFeeModel with zero fees. OANDA offers "Spread" and "Core + Commission" pricing models. Our data is the spread dataset, so we model the spread pricing. To estimate OANDA Core+Commission data, use a custom fee model and a custom fill model .

    security.SetFeeModel(new ConstantFeeModel(0.0m));
    security.set_fee_model(ConstantFeeModel(0))

    Buying Power

    The OandaBrokerageModel uses the SecurityMarginModel and allows up to 50x leverage.

    Settlement

    The OandaBrokerageModel uses the ImmediateSettlementModel for Forex trades and the AccountCurrencyImmediateSettlementModel for CFD trades.

    Margin Interest Rate

    The OandaBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the OandaBrokerageModel is Market.Oanda Market.OANDA .

     

    Supported Models

    Samco

    Introduction

    This page explains the SamcoBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.Samco, AccountType.Cash);
    SetBrokerageModel(BrokerageName.Samco, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.SAMCO, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.SAMCO, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The SamcoBrokerageModel supports trading the following asset classes:

    Orders

    The SamcoBrokerageModel supports several order types, order properties, and order updates.

    Order Types

    The following table describes the available order types for each asset class that the SamcoBrokerageModel supports:

    Order Type India Equity
    MarketOrder green check
    LimitOrder green check
    StopMarketOrder green check

    Order Properties

    The SamcoBrokerageModel supports custom order properties. The following table describes the members of the IndiaOrderProperties object that you can set to customize order execution:

    Property Description
    Exchange Select the exchange for sending the order to. The following instructions are available:
    • NSE
    • BSE
    ProductType A ProductType instruction to apply to the order. The IndiaProductType enumeration has the following members:
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The following instructions are available:
    • Day DAY
    • GoodTilCanceled GOOD_TIL_CANCELED
    • GoodTilDate GOOD_TIL_DATE
    public override void Initialize()
    {
        // Set default order properties
        DefaultOrderProperties = new IndiaOrderProperties(Exchange.NSE, IndiaOrderProperties.IndiaProductType.NRML)
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.IndiaProductType.MIS)
                   {
                       TimeInForce = TimeInForce.Day,
                   };
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.IndiaProductType.CNC)
                   {
                       TimeInForce = TimeInForce.GoodTilDate,
                   };
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = IndiaOrderProperties(Exchange.NSE, IndiaOrderProperties.india_product_type.NRML)
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.india_product_type.MIS)
        order_properties.time_in_force = TimeInForce.DAY
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties = IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.india_product_type.CNC)
        order_properties.time_in_force = TimeInForce.GOOD_TIL_DATE
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The SamcoBrokerageModel supports order updates .

    Handling Splits

    If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:

    Fills

    The SamcoBrokerageModel uses the EquityFillModel .

    Slippage

    The SamcoBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The SamcoBrokerageModel uses the SamcoFeeModel .

    Buying Power

    The SamcoBrokerageModel uses the SecurityMarginModel . If you have a margin account, the SamcoBrokerageModel allows up to 5x leverage.

    Settlement

    The SamcoBrokerageModel uses the ImmediateSettlementModel for margin accounts and the DelayedSettlementModel with the default settlement rules for cash accounts.

    // For cash accounts:
    security.SetSettlementModel(new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime));
    
    // For margin accounts:
    security.SetSettlementModel(new ImmediateSettlementModel());
    # For cash accounts:
    security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME))
    
    # For margin accounts:
    security.set_settlement_model(ImmediateSettlementModel())

    Margin Interest Rate

    The SamcoBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the SamcoBrokerageModel is Market.India Market.INDIA .

     

    Supported Models

    TD Ameritrade

    Introduction

    This page explains the TDAmeritradeBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.TDAmeritrade, AccountType.Cash);
    SetBrokerageModel(BrokerageName.TDAmeritrade, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.TD_AMERITRADE, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.TD_AMERITRADE, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The TDAmeritradeBrokerageModel supports trading US Equities .

    Orders

    The TDAmeritradeBrokerageModel supports several order types, order properties, and order updates.

    Order Types

    The following table describes the available order types for each asset class that the TDAmeritradeBrokerageModel supports:

    Order Type Equity
    MarketOrder green check
    LimitOrder green check
    StopMarketOrder green check
    StopLimitOrder green check

    Time In Force

    The TDAmeritradeBrokerageModel supports the following TimeInForce instructions:

    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled;
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new TDAmeritradeOrderProperties
                   { 
                       TimeInForce = TimeInForce.Day
                   });
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new TDAmeritradeOrderProperties
                   { 
                       TimeInForce = TimeInForce.GoodTilDate(new DateTime(year, month, day))
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = TDAmeritradeOrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The TDAmeritradeBrokerageModel supports order updates .

    Handling Splits

    If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:

    Fills

    The TDAmeritradeBrokerageModel uses the EquityFillModel .

    Slippage

    The TDAmeritradeBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The TDAmeritradeBrokerageModel uses the TDAmeritradeFeeModel .

    Buying Power

    The TDAmeritradeBrokerageModel uses the SecurityMarginModel . If you have a margin account, the TDAmeritradeBrokerageModel allows up to 2x leverage.

    Settlement

    The TDAmeritradeBrokerageModel uses the ImmediateSettlementModel for margin accounts and the DelayedSettlementModel with the default settlement rules for cash accounts.

    // For cash accounts:
    security.SetSettlementModel(new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime));
    
    // For margin accounts:
    security.SetSettlementModel(new ImmediateSettlementModel());
    # For cash accounts:
    security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME))
    
    # For margin accounts:
    security.set_settlement_model(ImmediateSettlementModel())

    Margin Interest Rate

    The TDAmeritradeBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the TDAmeritradeBrokerageModel is Market.USA .

     

    Supported Models

    Terminal Link

    Introduction

    This page explains the Terminal Link brokerage, including the asset classes it supports, its default security-level models , and it's default markets.

    Asset Classes

    Terminal Link supports trading the following asset classes:

    Orders

    Terminal Link enables you to create and manage Bloomberg™ orders.

    Order Types

    The following table describes the available order types for each asset class that Terminal Link supports:

    Order Type Equity Equity Options Futures Index Options
    MarketOrder green check green check green check green check
    LimitOrder green check green check green check green check
    StopMarketOrder green check green check green check green check
    StopLimitOrder green check green check green check green check

    Order Properties

    We model custom order properties from the Bloomberg EMSX API. The following table describes the members of the TerminalLinkOrderProperties object that you can set to customize order execution:

    Property Description
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The following instructions are supported:
    • Day DAY
    • GoodTilCanceled GOOD_TIL_CANCELED
    • GoodTilDate GOOD_TIL_DATE
    Notes The free form instructions that may be sent to the broker.
    HandlingInstruction The instructions for handling the order or route. The values can be preconfigured or a value customized by the broker.
    CustomNotes1 Custom user order notes 1. For more information about custom order notes, see Custom Notes & Free Text Fields in the EMSX API documentation
    CustomNotes2 Custom user order notes 2.
    CustomNotes3 Custom user order notes 3.
    CustomNotes4 Custom user order notes 4.
    CustomNotes5 Custom user order notes 5.
    Account The EMSX account.
    Broker The EMSX broker code.
    Strategy A StrategyParameters object that represents the EMSX order strategy details. You must append strategy parameters in the order that the EMSX API expects. The following strategy names are supported: "DMA", "DESK", "VWAP", "TWAP", "FLOAT", "HIDDEN", "VOLUMEINLINE", "CUSTOM", "TAP", "CUSTOM2", "WORKSTRIKE", "TAPNOW", "TIMED", "LIMITTICK", "STRIKE"
    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new TerminalLinkOrderProperties
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
            Strategy = new TerminalLinkOrderProperties.StrategyParameters(
                "VWAP",
                new List<TerminalLinkOrderProperties.StrategyField>
                {
                    new("09:30:00"),
                    new("10:30:00"),
                    new(),
                    new()
                }
             )
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new TerminalLinkOrderProperties
                   { 
                       TimeInForce = TimeInForce.Day,
                       Account = "account1"
                   });
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new TerminalLinkOrderProperties
                   { 
                       TimeInForce = TimeInForce.GoodTilDate(new DateTime(year, month, day)),
                       Account = "account2"
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = TerminalLinkOrderProperties()
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
        self.default_order_properties.strategy = TerminalLinkOrderProperties.strategy_parameters(
            "VWAP",
            [
                TerminalLinkOrderProperties.strategy_field("09:30:00"),
                TerminalLinkOrderProperties.strategy_field("10:30:00"),
                TerminalLinkOrderProperties.strategy_field(),
                TerminalLinkOrderProperties.strategy_field()
            ]
        )
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = TerminalLinkOrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        order_properties.account = "account1"
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
        order_properties.account = "account2"
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    For more information about the format that the Bloomberg EMSX API expects, see Create Order and Route Extended Request in the EMSX API documentation and the createOrderAndRouteWithStrat documentation on the MathWorks website.

    Get Open Orders

    Terminal Link lets you access open orders .

    Monitor Fills

    Terminal Link allows you to monitor orders as they fill through order events .

    Updates

    Terminal Link doesn't support order updates .

    Cancellations

    Terminal Link enables you to cancel open orders .

    Handling Splits

    If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:

    Fills

    To view how we model fills in backtests, see Fills .

    Slippage

    To view how we model slippage in backtests, see Slippage .

    Fees

    To view how we model fees in backtests, see Fees .

    Buying Power

    To view how we model buying power in backtests, see Buying Power .

    Settlement

    To view how we model settlements in backtests, see Settlement .

    Margin Interest Rate

    To view how we model margin interest rates in backtests, see Margin Interest Rate .

    Default Markets

    To view the default markets of each asset class when you use Terminal Link, see Default Markets .

     

    Supported Models

    Trade Station

    Introduction

    This page explains the TradeStationBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.TradeStation, AccountType.Cash);
    SetBrokerageModel(BrokerageName.TradeStation, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.TRADE_STATION, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.TRADE_STATION, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The TradeStationBrokerageModel supports trading the following asset classes:

    Orders

    The TradeStationBrokerageModel supports several order types, order properties, and order updates.

    Order Types

    The following table describes the available order types for each asset class that the TradeStationBrokerageModel supports:

    Order Type Equity Equity Options Futures
    MarketOrder green check green check green check
    LimitOrder green check green check green check
    StopMarketOrder green check green check green check
    StopLimitOrder green check green check green check

    Time In Force

    The TradeStationBrokerageModel supports the following TimeInForce instructions:

    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled;
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new TradeStationOrderProperties
                   { 
                       TimeInForce = TimeInForce.Day
                   });
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new TradeStationOrderProperties
                   { 
                       TimeInForce = TimeInForce.GoodTilDate(new DateTime(year, month, day))
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = TradeStationOrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The TradeStationBrokerageModel supports order updates .

    Handling Splits

    If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:

    Fills

    The following table shows the fill model that the TradeStationBrokerageModel uses for each SecurityType :

    SecurityType Fill Model
    Equity EquityFillModel
    Option ImmediateFillModel
    Future FutureFillModel

    Slippage

    The TradeStationBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The TradeStationBrokersBrokerageModel uses the TradeStationFeeModel with the default argument values. We model current Trade Station fees on all assets.

    Buying Power

    The TradeStationBrokerageModel sets the buying power model based on the asset class of the security. The following table shows the default buying power model of each asset class:

    Asset Class Model
    Equities SecurityMarginModel
    Equity Options OptionMarginModel
    Futures FutureMarginModel

    If you have a margin account, the TradeStationBrokerageModel allows 2x leverage for Equities and and 1x leverage for Equity Options and Futures.

    Settlement

    The following table shows which settlement model the TradeStationBrokerageModel uses based on the security type and your account type:

    Security Type Account Type Settlement Model
    Equity Cash DelayedSettlementModel with the default settlement rules
    Option Cash DelayedSettlementModel with the default settlement rules
    Future Any FutureSettlementModel

    For all other cases, the TradeStationBrokerageModel uses the ImmediateSettlementModel .

    // For US Equities with a cash account:
    security.SetSettlementModel(new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime));
    
    // For Equity Options with a cash account:
    security.SetSettlementModel(new DelayedSettlementModel(Option.DefaultSettlementDays, Option.DefaultSettlementTime));
    
    // For Futures
    security.SetSettlementModel(new FutureSettlementModel());
    
    // For remaining cases:
    security.SetSettlementModel(new ImmediateSettlementModel());
    # For US Equities with a cash account:
    security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME))
    
    # For Equity Options with a cash account:
    security.set_settlement_model(DelayedSettlementModel(Option.DEFAULT_SETTLEMENT_DAYS, Option.DEFAULT_SETTLEMENT_TIME))
    
    # For Futures
    security.set_settlement_model(FutureSettlementModel())
    
    # For remaining cases:
    security.set_settlement_model(ImmediateSettlementModel())

    Margin Interest Rate

    The TradeStationBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The following table describes the default markets of each SecurityType for the TradeStationBrokerageModel :

    SecurityType Market
    Equity USA
    Option USA
    Future CME

     

    Supported Models

    Tradier

    Introduction

    This page explains the TradierBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.TradierBrokerage, AccountType.Cash);
    SetBrokerageModel(BrokerageName.TradierBrokerage, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.TRADIER_BROKERAGE, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.TRADIER_BROKERAGE, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The TradierBrokerageModel supports trading US Equities and Equity Options .

    Orders

    The TradierBrokerageModel supports several order types, order properties, and most order updates.

    Order Types

    The following table describes the available order types for each asset class that the TradierBrokerageModel supports:

    Order Type Equity Equity Options
    MarketOrder green check green check
    LimitOrder green check green check
    StopMarketOrder green check green check
    StopLimitOrder green check green check

    Time In Force

    The TradierBrokerageModel supports the following TimeInForce instructions:

    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled;
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new OrderProperties
                   { 
                       TimeInForce = TimeInForce.Day 
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = OrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The TradierBrokerageModel supports most order updates . To update the quantity of an order, cancel the order and then submit a new order with the desired quantity. For more information about this workaround, see the Workaround for Brokerages That Don’t Support Updates .

    Extended Market Hours

    The TradierBrokerageModel doesn't support extended market hours trading. If you place an order outside of regular trading hours, the order will be processed at market open.

    Automatic Cancellations

    If you have open orders for a security when it performs a reverse split, the TradierBrokerageModel automatically cancels your orders.

    Errors

    To view the order-related error codes from Tradier, see Error Responses in their documentation.

    The TradierBrokerageModel validates your orders for the following errors before sending them to Tradier:

    Error Description
    ShortOrderIsGtc You can't short sell with the GoodTilCanceled time in force
    SellShortOrderLastPriceBelow5 You can't short sell stocks below $5
    IncorrectOrderQuantity The order quantity must be between 1 and 10,000,000 shares

    Fills

    The TradierBrokerageModel uses the EquityFillModel for Equity trades and the ImmediateFillModel for Option trades.

    Slippage

    The TradierBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The TradierBrokerageModel uses the ConstantFeeModel with zero fees.

    security.SetFeeModel(new ConstantFeeModel(0.0m));
    security.set_fee_model(ConstantFeeModel(0))

    Buying Power

    The TradierBrokerageModel uses the OptionMarginModel for Option trades and the SecurityMarginModel for Equity trades.

    If you have a margin account, the TradierBrokerageModel allows 2x leverage for Equities.

    Settlement

    The TradierBrokerageModel uses the ImmediateSettlementModel for margin accounts and the DelayedSettlementModel with the default settlement rules for cash accounts.

    // For US Equities with a cash account:
    security.SetSettlementModel(new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime));
    
    // For Equity Options with a cash account:
    security.SetSettlementModel(new DelayedSettlementModel(Option.DefaultSettlementDays, Option.DefaultSettlementTime));
    
    // For remaining cases:
    security.SetSettlementModel(new ImmediateSettlementModel());
    # For US Equities with a cash account:
    security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME))
    
    # For Equity Options with a cash account:
    security.set_settlement_model(DelayedSettlementModel(Option.DEFAULT_SETTLEMENT_DAYS, Option.DEFAULT_SETTLEMENT_TIME))
    
    # For remaining cases:
    security.set_settlement_model(ImmediateSettlementModel())

    Margin Interest Rate

    The TradierBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the TradierBrokerageModel is Market.USA .

     

    Supported Models

    Trading Technologies

    Introduction

    This page explains the TradingTechnologiesBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.TradingTechnologies, AccountType.Cash);
    SetBrokerageModel(BrokerageName.TradingTechnologies, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.TRADING_TECHNOLOGIES, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.TRADING_TECHNOLOGIES, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The TradingTechnologiesBrokerageModel supports trading Futures .

    Orders

    The TradingTechnologiesBrokerageModel supports several order types, some TimeInForce order properties, and order updates.

    Order Types

    The following table describes the available order types for each asset class that the TradingTechnologiesBrokerageModel supports:

    Order Type Futures
    MarketOrder green check
    LimitOrder green check
    StopMarketOrder green check
    StopLimitOrder green check

    The TradingTechnologiesBrokerageModel enforces the following order rules:

    Time In Force

    The TradingTechnologiesBrokerageModel supports the Day and GoodTilCanceled TimeInForce order properties.

    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties.TimeInForce = TimeInForce.GoodTilCanceled;
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new OrderProperties
                   { 
                       TimeInForce = TimeInForce.Day 
                   });
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = OrderProperties()
        order_properties.time_in_force = TimeInForce.DAY
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The TradingTechnologiesBrokerageModel supports order updates .

    Fills

    The TradingTechnologiesBrokerageModel uses the FutureFillModel .

    Slippage

    The TradingTechnologiesBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The TradingTechnologiesBrokerageModel uses the ConstantFeeModel with zero fees.

    security.SetFeeModel(new ConstantFeeModel(0.0m));
    security.set_fee_model(ConstantFeeModel(0))

    Buying Power

    The TradingTechnologiesBrokerageModel uses the FutureMarginModel .

    Settlement

    The TradingTechnologiesBrokerageModel uses the FutureSettlementModel .

    Margin Interest Rate

    The TradingTechnologiesBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the TradierBrokerageModel is Market.CME .

     

    Supported Models

    Wolverine

    Introduction

    This page explains the WolverineBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.Wolverine, AccountType.Cash);
    SetBrokerageModel(BrokerageName.Wolverine, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.WOLVERINE, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.WOLVERINE, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The WolverineBrokerageModel supports trading US Equities .

    Orders

    The WolverineBrokerageModel supports one order type, but doesn't support order updates or extended market hours trading.

    Order Types

    The WolverineBrokerageModel supports market orders .

    Updates

    The WolverineBrokerageModel doesn't support order updates.

    Extended Market Hours

    The WolverineBrokerageModel doesn't support extended market hours trading. If you place an order outside of regular trading hours, the order is invalid.

    Order Properties

    The WolverineBrokerageModel supports custom order properties. The following table describes the members of the WolverineOrderProperties object that you can set to customize order execution:

    Property Description
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The following instructions are supported:
    • Day DAY
    • GoodTilCanceled GOOD_TIL_CANCELED
    Exchange Defines the exchange name for a particular market. For example, Exchange.SMART
    ExchangePostFix The exchange post fix to apply if any. For example, if you set Exchange to Exchange.SMART , then "-INCA-TX" yields "SMART-INCA-TX"
    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new WolverineOrderProperties
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
            Exchange = Exchange.SMART,
            ExchangePostFix = "-INCA-TX"
        };
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = WolverineOrderProperties()
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
        self.default_order_properties.exchange = Exchange.SMART
        self.default_order_properties.exchange_post_fix = "-INCA-TX"

    Fills

    The WolverineBrokerageModel uses the EquityFillModel for Equity trades.

    Slippage

    The WolverineBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The WolverineBrokerageModel uses the WolverineFeeModel .

    Buying Power

    The WolverineBrokerageModel uses the SecurityMarginModel . If you have a margin account, the WolverineBrokerageModel allows up to 2x leverage.

    Settlement

    The WolverineBrokerageModel uses the ImmediateSettlementModel for margin accounts and the DelayedSettlementModel with the default settlement rules for cash accounts.

    // For cash accounts:
    security.SetSettlementModel(new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime));
    
    // For margin accounts:
    security.SetSettlementModel(new ImmediateSettlementModel());
    # For cash accounts:
    security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME))
    
    # For margin accounts:
    security.set_settlement_model(ImmediateSettlementModel())

    Margin Interest Rate

    The WolverineBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the WolverineBrokerageModel is Market.USA .

     

    Supported Models

    Zerodha

    Introduction

    This page explains the ZerodhaBrokerageModel , including the asset classes it supports, its default security-level models , and it's default markets.

    SetBrokerageModel(BrokerageName.Zerodha, AccountType.Cash);
    SetBrokerageModel(BrokerageName.Zerodha, AccountType.Margin);
    self.set_brokerage_model(BrokerageName.ZERODHA, AccountType.CASH)
    self.set_brokerage_model(BrokerageName.ZERODHA, AccountType.MARGIN)

    To view the implementation of this model, see the LEAN GitHub repository .

    Asset Classes

    The ZerodhaBrokerageModel supports trading Indian Equities .

    Orders

    We model the Zerodha API by supporting several order types, order properties, and order updates.

    Order Types

    The following table describes the available order types for each asset class that the ZerodhaBrokerageModel supports:

    Order Type India Equity
    MarketOrder green check
    LimitOrder green check
    StopMarketOrder green check
    StopLimitOrder green check

    Order Properties

    The ZerodhaBrokerageModel supports custom order properties. The following table describes the members of the IndiaOrderProperties object that you can set to customize order execution:

    Property Description
    Exchange Select the exchange for sending the order to. The following instructions are supported:
    • NSE
    • BSE
    ProductType A ProductType instruction to apply to the order. The IndiaProductType enumeration has the following members:
    TimeInForce time_in_force A TimeInForce instruction to apply to the order. The following instructions are supported:
    • Day DAY
    • GoodTilCanceled GOOD_TIL_CANCELED
    • GoodTilDate GOOD_TIL_DATE
    public override void Initialize()
    {
        // Set default order properties
        DefaultOrderProperties = new IndiaOrderProperties(Exchange.NSE, IndiaOrderProperties.IndiaProductType.NRML)
        {
            TimeInForce = TimeInForce.GoodTilCanceled,
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);
        
        // Override the default order properties
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.IndiaProductType.MIS)
                   {
                       TimeInForce = TimeInForce.Day,
                   };
        LimitOrder(_symbol, quantity, limitPrice, 
                   orderProperties: new IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.IndiaProductType.CNC)
                   {
                       TimeInForce = TimeInForce.GoodTilDate,
                   };
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = IndiaOrderProperties(Exchange.NSE, IndiaOrderProperties.india_product_type.NRML)
        self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        self.limit_order(self._symbol, quantity, limit_price)
        
        # Override the default order properties
        order_properties = IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.india_product_type.MIS)
        order_properties.time_in_force = TimeInForce.DAY
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
    
        order_properties = IndiaOrderProperties(Exchange.BSE, IndiaOrderProperties.india_product_type.CNC)
        order_properties.time_in_force = TimeInForce.GOOD_TIL_DATE
        self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Updates

    The ZerodhaBrokerageModel supports order updates .

    Handling Splits

    If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:

    Fills

    The ZerodhaBrokerageModel uses the EquityFillModel .

    Slippage

    The ZerodhaBrokerageModel uses the NullSlippageModel .

    security.set_slippage_model(NullSlippageModel.instance);
    security.set_slippage_model(NullSlippageModel.instance)

    Fees

    The ZerodhaBrokerageModel uses the ZerodhaFeeModel .

    Buying Power

    The ZerodhaBrokerageModel uses the SecurityMarginModel . If you have a margin account, the ZerodhaBrokerageModel allows up to 5x leverage.

    Settlement

    The ZerodhaBrokerageModel uses the ImmediateSettlementModel for margin accounts and the DelayedSettlementModel with the default settlement rules for cash accounts.

    // For cash accounts:
    security.SetSettlementModel(new DelayedSettlementModel(Equity.DefaultSettlementDays, Equity.DefaultSettlementTime));
    
    // For margin accounts:
    security.SetSettlementModel(new ImmediateSettlementModel());
    # For cash accounts:
    security.set_settlement_model(DelayedSettlementModel(Equity.DEFAULT_SETTLEMENT_DAYS, Equity.DEFAULT_SETTLEMENT_TIME))
    
    # For margin accounts:
    security.set_settlement_model(ImmediateSettlementModel())

    Margin Interest Rate

    The ZerodhaBrokerageModel uses the NullMarginInterestRateModel .

    Default Markets

    The default market of the ZerodhaBrokerageModel is Market.India Market.INDIA .

     

    Reality Modeling

    Brokerage Message Handler

    Introduction

    When your brokerage sends a message, you receive this information in the algorithm and can take any actions. When you place an order through your brokerage platform instead of placing it through LEAN, you can decide whether the transaction handler should process the order. By default, the transaction handler only process orders that you place through LEAN. Custom brokerage message handlers enable you to instruct the transaction handler to process orders that you create directly through your brokerage's platform.

    Set Models

    To set a brokerage message handler, in the Initialize initialize method, call the SetBrokerageMessageHandler set_brokerage_message_handler method.

    SetBrokerageMessageHandler(new MyBrokerageMessageHandler(this));
    self.set_brokerage_message_handler(MyBrokerageMessageHandler(self))

    Default Behavior

    The default brokerage message handler is the DefaultBrokerageMessageHandler . The following table describes how the DefaultBrokerageMessageHandler processes brokerage messages:

    Brokerage Message Type Action
    BrokerageMessageType. Information INFORMATION Sends a debug message for the algorithm.
    BrokerageMessageType. Warning WARNING Sends an error message for the algorithm.
    BrokerageMessageType. Error ERROR Sets the algorithm runtime error and stops it.
    BrokerageMessageType. Disconnect DISCONNECT Stops the algorithm after 15 minutes if the market is open. Otherwise, it stops five minutes after market open.
    BrokerageMessageType. Reconnect RECONNECT Cancels the disconnection process.

    The default brokerage message handler rejects orders you create through the brokerage. An example of this is when you place an order using the brokerage website or a third-party software.

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    algorithm algorithm IAlgorithm The running algorithm.
    initialDelay initial_delay TimeSpan? timedelta/NoneType The amount of time LEAN will wait after a brokerage disconnection message for a reconnection message. If the reconnection message doesn't arrive before the time limit, LEAN stops running. If you don't provide a value, it uses TimeSpan.FromMinutes(15) timedelta(minutes=15) . null None
    openThreshold open_threshold TimeSpan? timedelta/NoneType Defines how long before market open to re-check for brokerage reconnect message. If you don't provide a value, it uses TimeSpan.FromMinutes(5) timedelta(minutes=5) . null None

    To view the implementation of this model, see the LEAN GitHub repository .

    Model Structure

    Brokerage message handlers extend the IBrokerageMessageHandler interface. Extensions of the IBrokerageMessageHandler interface must define the HandleMessage handle_message and HandleOrder handle_order methods.

    The HandleMessage handle_message method processes the brokerage message event. It triggers any actions in the algorithm or notifications system required.

    The HandleOrder handle_order method defines whether the transaction handler should process a new order you placed directly through the brokerage's website or third-party software.

    // In the Initialize method, set the brokerage message handler
    SetBrokerageMessageHandler(new MyBrokerageMessageHandler(this));
    
    // Define the custom brokerage message handler
    public class MyBrokerageMessageHandler : IBrokerageMessageHandler
    {
        private readonly IAlgorithm _algorithm;
        public MyBrokerageMessageHandler(IAlgorithm algorithm) { _algorithm = algorithm; }
    
        public void HandleMessage(BrokerageMessageEvent message)
        {
            _algorithm.Debug($"{_algorithm.Time.ToStringInvariant("o")} Event: {message.Message}");
        }
    
        public bool HandleOrder(NewBrokerageOrderNotificationEventArgs eventArgs)
        {
            return false;
        }
    }
    # In the Initialize method, set the brokerage message handler
    self.set_brokerage_message_handler(MyBrokerageMessageHandler(self))
            
    # Define the custom brokerage message handler
    class MyBrokerageMessageHandler(IBrokerageMessageHandler):
            
        def __init__(self, algorithm):
            self._algorithm = algorithm
    
        def handle_message(self, message: BrokerageMessageEvent) -> None:
            self._algorithm.debug(f"{self._algorithm.time} Event: {message.message}")
    
        def handle_order(self, event_args: NewBrokerageOrderNotificationEventArgs) -> bool:
            return False

    The BrokerageMessageEvent class has the following properties:

    The NewBrokerageOrderNotificationEventArgs class has the following properties:

    Examples

    Demonstration Algorithms
    CustomBrokerageSideOrderHandlingRegressionAlgorithm.py Python CustomBrokerageSideOrderHandlingRegressionAlgorithm.cs C# CustomBrokerageMessageHandlerAlgorithm.cs C#

     

    Reality Modeling

    Buying Power

    Introduction

    Buying power models (also known as margin models) control how much buying power or leverage your portfolio has to make trades. When you place an order, LEAN uses the buying power model to determine whether the order should be submitted so you avoid placing orders that would be rejected by the brokerage. Buying power calculations can be very complex and depend on many factors, including the brokerage or even the time of day. For example, the PatternDayTradingMarginModel lets you have 4x leverage during regular trading hours and 2x leverage during pre-market and post-market trading hours.

    What is Buying Power?

    Buying power is the total amount of money you can spend in your brokerage account. It depends on the security type and account type. On one hand, Option and Future contracts are leveraged securities with specific buying power rules. On the other hand, the buying power of cash accounts is just the cash in the account while the buying power of margin accounts is leveraged by the brokerage credit.

    What is Margin?

    Margin is a credit loan from your brokerage you receive after you deposit collateral into your margin account. You need margin to place short-biased trades and you can use margin to increase your buying power, but you incur interest fees. Margin is the dollar value of the loan that the brokerage gives you. A margin requirement of 25% means that to purchase $10,000 worth of securities, you need at least $2,500 worth of collateral in your brokerage account to open the trade and you can borrow the rest on margin. Maintenance margin is the minimum equity (equity = total portfolio value - borrowed funds) you must have in your brokerage account to stay in your positions. If the value of your portfolio falls below the maintenance margin, you receive a margin call . If you receive a margin call, you either need to add more capital to your brokerage account or the brokerage will liquidate some of your holdings to reduce your exposure and their risk.

    Some securities have special margin rules. Derivatives are leveraged assets with a floating margin requirement. In particular, long Options have zero maintenance margin requirement and their initial margin requirement is only the premium that you pay upfront.

    What is Leverage?

    Leverage is using borrowed money to increase your buying power. Leverage has an inverse relationship with your margin requirement and maintenance margin. If you have a margin requirement of 50%, you can use up to 1 / 50% = 2 leverage. Trading with leverage can be risky. It can boost your returns on profitable trades but can make your losing trades more expensive. If you have $10,000 in your brokerage margin account and purchase $20,000 worth of securities, you are trading with 2x leverage. If the value of the securities in your portfolio drops by 50% when you have a 2x leverage position, you lose all of your equity.

    What Are Position Groups?

    A position group is the combination of holdings. It has lower margin requirement and maintenance margin than the sum of each position of the group. If you have a margin requirement of $29,150 to purchase an in-the-money call Option contract, and a margin requirement of $101,499 to sell an out-of-the money call Option contract, the total margin requirement is $130,649. However, these positions compose a bull call spread with a margin requirement of $0.

    Set Models

    The brokerage model of your algorithm automatically sets the buying power model for each security, but you can override it. To manually set the buying power model of a security, call the SetBuyingPowerModel set_buying_power_model method on the Security object.

    // In Initialize
    var security = AddEquity("SPY");
    security.SetBuyingPowerModel(new SecurityMarginModel(3m));
    # In Initialize
    security = self.add_equity("SPY")
    security.set_buying_power_model(SecurityMarginModel(3))

    You can also set the buying power model in a security initializer . If your algorithm has a universe, use the security initializer technique. In order to initialize single security subscriptions with the security initializer, call SetSecurityInitializer set_security_initializer before you create the subscriptions.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite some of the reality models        
            security.SetBuyingPowerModel(new SecurityMarginModel(3m));    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite some of the reality models        
            security.set_buying_power_model(SecurityMarginModel(3))

    You cannot change the position group buying power models.

    Supported Models

    The following buying power models are available:

    The following position group buying power models are available:

    Default Behavior

    The brokerage model of your algorithm automatically sets the buying power model of each security. The default brokerage model is the DefaultBrokerageModel , which sets the buying power model based on the asset class of the security. The following table shows the default buying power model of each asset class:

    Asset Class Model
    Equity Options OptionMarginModel
    Futures FutureMarginModel
    Future Options FuturesOptionsMarginModel
    Index Options OptionMarginModel
    Crypto CashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
    CryptoFuture CryptoFutureMarginModel
    Forex CashBuyingPowerModel for cash accounts or SecurityMarginModel for margin accounts
    Other SecurityMarginModel

    Model Structure

    Buying power models should extend the BuyingPowerModel class. Extensions of the BuyingPowerModel class should implement the following methods:

    // In the Initialize method, set the buying power model
    security.SetBuyingPowerModel(new MyBuyingPowerModel());
    
    // Define the custom buying power model
    class MyBuyingPowerModel : BuyingPowerModel
    {
        public MyBuyingPowerModel(
            decimal leverage = 2m,
            decimal requiredFreeBuyingPowerPercent = 0m)
            : base(leverage, requiredFreeBuyingPowerPercent)
        {
        }
    
        public override decimal GetLeverage(Security security)
        {
           return base.GetLeverage(security);
        }
    
        public override void SetLeverage(Security security, decimal leverage)
        {
            base.SetLeverage(security, leverage);
        }
    
        public override InitialMargin GetInitialMarginRequiredForOrder(
            InitialMarginRequiredForOrderParameters parameters)
        {
            return base.GetInitialMarginRequiredForOrder(parameters);
        }
    
        public override MaintenanceMargin GetMaintenanceMargin(
            MaintenanceMarginParameters parameters)
        {
            return base.GetMaintenanceMargin(parameters);
        }
    
        protected override decimal GetMarginRemaining(
            SecurityPortfolioManager portfolio,
            Security security,
            OrderDirection direction)
        {
            return base.GetMarginRemaining(portfolio, security, direction);
        }
    
        public override InitialMargin GetInitialMarginRequirement(
            InitialMarginParameters parameters)
        {
            return base.GetInitialMarginRequirement(parameters);
        }
    
        public override HasSufficientBuyingPowerForOrderResult HasSufficientBuyingPowerForOrder(HasSufficientBuyingPowerForOrderParameters parameters)
        {
            return base.HasSufficientBuyingPowerForOrder(parameters);
        }
    
        public override GetMaximumOrderQuantityResult GetMaximumOrderQuantityForDeltaBuyingPower(GetMaximumOrderQuantityForDeltaBuyingPowerParameters parameters)
        {
            return base.GetMaximumOrderQuantityForDeltaBuyingPower(parameters);
        }
    
        public override GetMaximumOrderQuantityResult GetMaximumOrderQuantityForTargetBuyingPower(GetMaximumOrderQuantityForTargetBuyingPowerParameters parameters)
        {
            return base.GetMaximumOrderQuantityForTargetBuyingPower(parameters);
        }
    
        public override ReservedBuyingPowerForPosition GetReservedBuyingPowerForPosition(
            ReservedBuyingPowerForPositionParameters parameters)
        {
            return base.GetReservedBuyingPowerForPosition(parameters);
        }
    
        public override BuyingPower GetBuyingPower(BuyingPowerParameters parameters)
        {
            return base.GetBuyingPower(parameters);
        }
    }
    # In the Initialize method, set the buying power model
    security.set_buying_power_model(MyBuyingPowerModel())
    
    # Define the custom buying power model
    class MyBuyingPowerModel(BuyingPowerModel):
        def __init__(self, 
             leverage: float = 2, 
             requiredFreeBuyingPowerPercent: float = 0):
            super().__init__(leverage, requiredFreeBuyingPowerPercent)
    
        def get_leverage(self, security: Security) -> float: 
            return super().get_leverage(security)
    
        def set_leverage(self, security: Security, leverage: float) -> None: 
            super().set_leverage(security, leverage)
    
        def get_initial_margin_required_for_order(self,
             parameters: InitialMarginRequiredForOrderParameters) -> InitialMargin:
            return super().get_initial_margin_required_for_order(parameters)
    
        def get_maintenance_margin(self,
             parameters: MaintenanceMarginParameters) -> MaintenanceMargin: 
            return super().get_maintenance_margin(parameters)
    
        def get_margin_remaining(self,
             portfolio: SecurityPortfolioManager,
             security: Security,
             direction: OrderDirection) -> float: 
            return super().get_margin_remaining(portfolio, security, direction)
    
        def get_initial_margin_requirement(self,
             parameters: InitialMarginParameters) -> InitialMargin:
            return super().get_initial_margin_requirement(parameters)
    
        def has_sufficient_buying_power_for_order(self, 
             parameters: HasSufficientBuyingPowerForOrderParameters
            ) -> HasSufficientBuyingPowerForOrderResult: 
            return super().has_sufficient_buying_power_for_order(parameters)
    
        def get_maximum_order_quantity_for_delta_buying_power(self, 
             parameters: GetMaximumOrderQuantityForDeltaBuyingPowerParameters
            ) -> GetMaximumOrderQuantityResult:
            return super().get_maximum_order_quantity_for_delta_buying_power(parameters)
    
        def get_maximum_order_quantity_for_target_buying_power(self, 
             parameters: GetMaximumOrderQuantityForTargetBuyingPowerParameters
            ) -> GetMaximumOrderQuantityResult:
            return super().get_maximum_order_quantity_for_target_buying_power(parameters)
    
        def get_reserved_buying_power_for_position(self, 
             parameters: ReservedBuyingPowerForPositionParameters
            ) -> ReservedBuyingPowerForPosition:
            return super().get_reserved_buying_power_for_position(parameters)
    
        def get_buying_power(self,
             parameters: BuyingPowerParameters) -> BuyingPower:
            return super().get_buying_power(parameters)
    

    For a full example algorithm, see this backtest this backtest .

    Disable Buying Power Models

    You can disable order margin checks and opt to let your brokerage decide to accept or reject the trades. This is helpful in live trading if you have a more permissive brokerage margin allowance that what LEAN models. The default position group buying power models are helpful for Option trading strategies. However, it can be counterproductive if it's not a supported Option strategy . To disable the validations of the default position group buying power model, use the NullSecurityPositionGroupModel . To set the NullSecurityPositionGroupModel for the portfolio, during initialization , call the SetPositions set_positions method with the SecurityPositionGroupModel. Null NULL argument.

    Portfolio.SetPositions(SecurityPositionGroupModel.Null);
    self.portfolio.set_positions(SecurityPositionGroupModel.NULL)

    To disable the validations of the default buying power model , use the NullBuyingPowerModel . To set the NullBuyingPowerModel for a security subscription, call the SetBuyingPowerModel set_buying_power_model method with the BuyingPowerModel. Null NULL argument.

    var equity = AddEquity("SPY");
    equity.SetBuyingPowerModel(BuyingPowerModel.Null);
    // Alias: 
    // equity.SetMarginModel(SecurityMarginModel.Null);
    equity = self.add_equity("SPY")
    equity.set_buying_power_model(BuyingPowerModel.NULL)
    # Alias:
    # equity.set_margin_model(SecurityMarginModel.NULL)

    You can also set the NullBuyingPowerModel in a security initializer . If your algorithm has a universe, use the security initializer technique. To set the buying power of securities in the security initializer, set the brokerage model , set the security initializer , and then create security subscriptions.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite the security buying power        
            security.SetBuyingPowerModel(BuyingPowerModel.Null);    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite the security buying power        
            security.set_buying_power_model(BuyingPowerModel.NULL)

    Set Asset Leverage

    The buying power model sets the leverage for each security in your algorithm, but you can override its leverage settings after the buying power model is set.

    To set the leverage when you create a security subscription, pass in a leverage argument.

    // In Initialize
    AddEquity("SPY", leverage: 3);
    # In Initialize
    self.add_equity("SPY", leverage=3)

    You can also set the asset leverage in a security initializer. In order to set the leverage of securities in the security initializer, call SetSecurityInitializer set_security_initializer before you create security subscriptions and before you call SetBrokerageModel set_brokerage_model . If you pass in a leverage argument when you create the security subscription, the leverage argument takes precedence over the SetLeverage set_leverage call in the security initializer.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite the security leverage        
            security.SetLeverage(3);    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite the security leverage        
            security.set_leverage(3)

    To set the leverage for all securities in a universe, set the UniverseSettings.Leverage universe_settings.leverage property.

    // In Initialize
    UniverseSettings.Leverage = 3;
    # In Initialize
    self.universe_settings.leverage = 3

    In live trading, LEAN doesn't ignore the leverage you set. However, if you set a different leverage from what your brokerage provides, it creates a mismatch between the buying power in your algorithm and the buying power the brokerage gives you. In this case, orders can pass the validations in LEAN but your brokerage may reject them.

    PDT Rule

    If all of the following statements are true, you are classified as a pattern day trader:

    Pattern day traders must maintain a minimum equity of $25,000 in their margin account to continue trading. For more information about pattern day trading, see Am I a Pattern Day Trader? on the FINRA website.

    The PatternDayTradingMarginModel doesn't enforce minimum equity rules and doesn't limit your trades, but it adjusts your available leverage based on the market state. During regular market hours, you can use up to 4x leverage. During extended market hours, you can use up to 2x leverage.

    security.MarginModel = new PatternDayTradingMarginModel();
    security.margin_model = PatternDayTradingMarginModel()

    Get Initial Margin Requirements

    The following sections explain how to check if you have enough margin remaining to cover the initial margin requirements of various order types.

    Check Requirements of Regular Orders

    Follow these steps to check if you have enough margin remaining to cover the initial margin requirements of an order:

    1. Create an InitialMarginParameters object with the security and quantity you want to trade.
    2. var parameter = new InitialMarginParameters(security, quantity);
      parameter = InitialMarginParameters(security, quantity)
    3. Call the GetInitialMarginRequirement get_initial_margin_requirement method of the security's buying power model with the InitialMarginParameters .
    4. var initialMargin = security.BuyingPowerModel.GetInitialMarginRequirement(parameter);
      initial_margin = security.buying_power_model.get_initial_margin_requirement(parameter)

      The GetInitialMarginRequirement get_initial_margin_requirement method returns an InitialMargin object, which have the following properties:

    5. Compare the margin you have remaining against the initial margin requirement of the order.
    6. if (Portfolio.MarginRemaining >= initialMargin.Value)
      {
          MarketOrder(security.Symbol, quantity);
      }
      else
      {
          Debug("You don't have sufficient margin for this order.");
      }
      if self.portfolio.margin_remaining >= initial_margin.value:
          self.market_order(security.symbol, quantity)
      else:
          self.debug("You don't have sufficient margin for this order.")

    Check Requirements of Option Strategy Orders

    Follow these steps to check if you have enough margin remaining to cover the initial margin requirements of an Option strategy :

    1. Create an OptionStrategy object with the strategy you want to trade and its buying power model.
    2. For example, create a Bull Put Spread strategy.

      var optionStrategy = OptionStrategies.BullPutSpread(_symbol, itmStrike, otmStrike, expiry);
      option_strategy = OptionStrategies.bull_put_spread(self._symbol, itm_strike, otm_strike, expiry)
    3. Create an OptionStrategyPositionGroupBuyingPowerModel object of the strategy.
    4. var buyingPowerModel = new OptionStrategyPositionGroupBuyingPowerModel(optionStrategy);
      buying_power_model = OptionStrategyPositionGroupBuyingPowerModel(option_strategy)
    5. Create a list of Position objects from the strategy legs.
    6. var positions = optionStrategy.OptionLegs.Select(leg =>
      {
          var symbol = QuantConnect.Symbol.CreateOption(_symbol.Underlying, _symbol.ID.Market, _symbol.ID.OptionStyle, leg.Right, leg.Strike, leg.Expiration);
          return new Position(symbol, leg.Quantity, 1);
      });
      def get_symbol(leg):
          return Symbol.CreateOption(
              self._symbol.underlying, self._symbol.id.market, self._symbol.id.option_style, 
              leg.right, leg.strike, leg.expiration
          )
      
      positions = [Position(get_symbol(leg), leg.quantity, 1) for leg in option_strategy.option_legs]
    7. Create a PositionGroupInitialMarginParameters objects with the portfolio and the position group.
    8. var positionGroup = new PositionGroup(buyingPowerModel, 1, positions.ToArray());
      var parameters = new PositionGroupInitialMarginParameters(Portfolio, positionGroup);
      position_group = PositionGroup(buying_power_model, 1, positions)
      parameters = PositionGroupInitialMarginParameters(self.portfolio, position_group)
    9. Call the GetInitialMarginRequirement get_initial_margin_requirement method of the strategy's buying power model with the PositionGroupInitialMarginParameters .
    10. var initialMargin = buyingPowerModel.GetInitialMarginRequirement(parameters);
      initial_margin = buying_power_model.get_initial_margin_requirement(parameters)

      The GetInitialMarginRequirement get_initial_margin_requirement method returns an InitialMargin object, which have the following properties:

    11. Compare the margin you have remaining against the initial margin requirement of the order.
    12. In this case, the initialMargin.Value initial_margin.value is the initial margin requirement for a trade size of 1. For different trade sizes, multiply the initialMargin.Value initial_margin.value by the quantity.

      var strategyQuantity = 2; 
      if (Portfolio.MarginRemaining >= strategyQuantity * initialMargin.Value)
      {
          Buy(optionStrategy, quantity);
      }
      else
      {
          Debug("You don't have sufficient margin for this order.");
      }
      strategy_quantity = 2
      if self.portfolio.margin_remaining >= strategy_quantity * initial_margin.value:
          self.buy(option_strategy, strategy_quantity)
      else:
          self.debug("You don't have sufficient margin for this order.")

    Examples

    Demonstration Algorithms
    CustomBuyingPowerModelAlgorithm.py Python CustomModelsAlgorithm.py Python NullBuyingPowerOptionBullCallSpreadAlgorithm.py Python CustomBuyingPowerModelAlgorithm.cs C# CustomModelsAlgorithm.cs C# NullBuyingPowerOptionBullCallSpreadAlgorithm.cs C#

     

    Reality Modeling

    Settlement

    Settlement

    Key Concepts

    Introduction

    After you trade an asset, the brokerage needs to settle the funds in your account. The most common type of settlement is immediate, where the funds are immediately available for trading after the transaction. In some cases, you may have delayed settlement, where you sell an asset and need to wait a few days to spend the cash you receive from the sale. A settlement model simulates these settlement rules.

    Set Models

    The brokerage model of your algorithm automatically sets the settlement model for each security, but you can override it. To manually set the settlement model of a security, call the SetSettlementModel set_settlement_model method on the Security object.

    // In Initialize
    var security = AddEquity("SPY");
    // Set a delayed settlement model that settles 7 days after the trade at 8 AM
    security.SetSettlementModel(new DelayedSettlementModel(7, TimeSpan.FromHours(8)));
    # In Initialize
    security = self.add_equity("SPY")
    # Set a delayed settlement model that settles 7 days after the trade at 8 AM
    security.set_settlement_model(DelayedSettlementModel(7, timedelta(hours=8)))

    You can also set the settlement model in a security initializer . If your algorithm has a universe, use the security initializer technique. In order to initialize single security subscriptions with the security initializer, call SetSecurityInitializer set_security_initializer before you create the subscriptions.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite some of the reality models        
            security.SetSettlementModel(new DelayedSettlementModel(7, TimeSpan.FromHours(8)));    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite some of the reality models        
            security.set_settlement_model(DelayedSettlementModel(7, timedelta(hours=8)))

    To view all the pre-built settlement models, see Supported Models .

    Default Behavior

    The brokerage model of your algorithm automatically sets the settlement model for each security. The default brokerage model is the DefaultBrokerageModel , which sets the settlement model based on the security type and your account type. The following table shows how it sets the settlement models:

    Security Type Account Type Settlement Model
    Equity Cash DelayedSettlementModel with the default settlement rules
    Option Cash DelayedSettlementModel with the default settlement rules
    Future Any FutureSettlementModel

    For all other cases, the DefaultBrokerageModel uses the ImmediateSettlementModel .

    The default delayed settlement rule for US Equity trades is T+2 at 8 AM Eastern Time (ET). For example, if you sell on Monday, the trade settles on Wednesday at 8 AM. The default delayed settlement rule for Future and Option contracts is T+1 at 8 AM.

    Model Structure

    Settlement models must extend the ISettlementModel interface. Extensions of the ISettlementModel interface must implement the Scan scan and ApplyFunds apply_funds methods. The Scan scan method is automatically called at the top of each hour and it receives a ScanSettlementModelParameters object. The ApplyFunds apply_funds method receives an ApplyFundsSettlementModelParameters object and applies the settlement rules. The ApplyFunds apply_funds method is also automatically called, but its frequency depends on the security type. The ApplyFunds apply_funds method is automatically called when you fill an order for the following security types:

    The ApplyFunds apply_funds method is automatically called when you close a position for the following security types:

    // In the Initialize method, set the custom settlement model
    security.SetSettlementModel(new MySettlementModel());
    
    // Define the custom settlement model outside of the algorithm
    public class MySettlementModel : ISettlementModel
    {
        public void ApplyFunds(ApplyFundsSettlementModelParameters applyFundsParameters)
        {
            var currency = applyFundsParameters.CashAmount.Currency;
            var amount = applyFundsParameters.CashAmount.Amount;
            applyFundsParameters.Portfolio.CashBook[currency].AddAmount(amount);
        }
    
        public void Scan(ScanSettlementModelParameters settlementParameters)
        {
        }
    
        public CashAmount GetUnsettledCash()
        {
            return new CashAmount(0, "USD");
        }
    }
    # In the Initialize method, set the custom settlement model
    security.set_settlement_model(MySettlementModel())
    
    # Define the custom settlement model outside of the algorithm
    class MySettlementModel:
        def apply_funds(self, applyFundsParameters: ApplyFundsSettlementModelParameters) -> None:
            currency = applyFundsParameters.cash_amount.currency
            amount = applyFundsParameters.cash_amount.amount
            applyFundsParameters.portfolio.cash_book[currency].add_amount(amount)
    
        def scan(self, settlementParameters: ScanSettlementModelParameters) -> None:
            pass
        
        def get_unsettled_cash(self) -> CashAmount:
            return CashAmount(0, 'USD')
    

    For a full example algorithm, see this backtest this backtest .

    ApplyFundsSettlementModelParameters objects have the following properties:

    ScanSettlementModelParameters objects have the following properties:

    You likely don't need to create a custom settlement model because the supported models already implement immediate and delayed settlement rules.

     

    Settlement

    Supported Models

    Introduction

    This page describes all of the pre-built settlement models in LEAN. For more brokerage-specific settlement models, see the brokerage model documentation . If none of these models perform exactly how you want, create a custom settlement model .

    Immediate Model

    The ImmediateSettlementModel immediately adds or removes the cash from your portfolio when your transactions fill.

    security.SetSettlementModel(new ImmediateSettlementModel());
    security.set_settlement_model(ImmediateSettlementModel())

    To view the implementation of this model, see the LEAN GitHub repository .

    Delayed Model

    The DelayedSettlementModel immediately removes the cash from your portfolio when your buy orders fill. When your sell orders fill, it adds the cash to your unsettled cash book . When the settlement period ends, the unsettled cash is added to your portfolio.

    security.SetSettlementModel(new DelayedSettlementModel(7, TimeSpan.FromHours(8)));
    security.set_settlement_model(DelayedSettlementModel(7, timedelta(hours=8)))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    numberOfDays number_of_days int The number of days required for settlement
    timeOfDay time_of_day TimeSpan timedelta The time of day used for settlement

    To view the implementation of this model, see the LEAN GitHub repository .

    Account Currency Immediate Model

    The AccountCurrencyImmediateSettlementModel applies cash settlement immediately and automatically converts the settlement cash into the account currency.

    security.SetSettlementModel(new AccountCurrencyImmediateSettlementModel());
    security.set_settlement_model(AccountCurrencyImmediateSettlementModel())

    To view the implementation of this model, see the LEAN GitHub repository .

    Future Model

    The FutureSettlementModel settles the daily profit and loss at the start of each day.

    security.SetSettlementModel(new FutureSettlementModel());
    security.set_settlement_model(FutureSettlementModel())

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Reality Modeling

    Options Models

    Options Models

    Pricing

    Introduction

    Option price models compute the theoretical price of Option contracts, their implied volatility, and their Greek values. Theoretical prices can help you detect undervalued and overvalued contracts, implied volatility can provide you insight into the upcoming volatility of the underlying security, and Greek values can help you hedge your portfolio.

    What are Greeks?

    Option Greeks measure the exposure of Option price or Option delta to the movement of different factors such as the underlying price, time, and volatility. The Greeks are a function of implied volatility. For more information about them, see The Greek Letters .

    LEAN also provides indicator implementations of Option Greeks. It provides higher flexibility on Option price model selection, volatility modeling , and allows IV smoothing through call-put pair. For details, see Option Indicators .

    What Is Implied Volatility?

    Implied volatility is the forecasted future volatility of a security. The Option price model uses the realized volatility to calculate the implied volatility. By default, it uses the formula from Brenner and Subrahmanyam (1988) as the initial guess for implied volatility.

    \[ \frac{P}{S} \sqrt{\frac{2\pi}{T}} \]

    where \(P\) is the Option contract price, \(S\) is the underlying price, and \(T\) is the time until Option expiration.

    If the volatility model of the underlying security is ready , the price model uses its value as the initial guess for implied volatility and as an input to calculate the theoretical contract prices.

    LEAN also provides an indicator implementation of implied volatility. It provides higher flexibility on Option price model selection, volatility modeling , and allows IV smoothing through call-put pair. For details, see Implied Volatility .

    Set Models

    To set the pricing model of an Option, set its PriceModel price_model property.

    If you have access to the Option object when you subscribe to the Option universe or contract, you can set the price model immediately after you create the subscription.

    // In Initialize
    UniverseSettings.Asynchronous = true;
    var option = AddOption("SPY");
    option.PriceModel = OptionPriceModels.CrankNicolsonFD();
    # In Initialize
    self.universe_settings.asynchronous = True
    option = self.add_option("SPY")
    option.price_model = OptionPriceModels.crank_nicolson_fd()

    Otherwise, set the price model in a security initializer .

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite the price model        
            if (security.Type == SecurityType.Option) // Option type
            {
                security.PriceModel = OptionPriceModels.CrankNicolsonFD();
            }    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite the price model        
            if security.type == SecurityType.OPTION: # Option type
                security.price_model = OptionPriceModels.CrankNicolsonFD()

    Supported Models

    LEAN supports the following Option price models. QLNet provides the underlying implementation of these models.

    Model American Style European Style
    AdditiveEquiprobabilities green check green check
    BaroneAdesiWhaley green check
    BinomialCoxRossRubinstein green check green check
    BinomialJarrowRudd green check green check
    BinomialJoshi green check green check
    BinomialLeisenReimer green check green check
    BinomialTian green check green check
    BinomialTrigeorgis green check green check
    BjerksundStensland green check
    BlackScholes
    green check
    CrankNicolsonFD green check green check
    Integral
    green check

    If you set the price model of an Option to a model with an incompatible style, LEAN throws an exception.

    Default Behavior

    The default Option pricing model is the BinomialCoxRossRubinstein for American Options or BlackScholes for European Options.

    Disable Pricing

    To turn off the Option price model, use the CurrentPriceOptionPriceModel . This model sets the Greeks to 0, sets the implied volatility to 0, and sets the theoretical price to the current price.

    option.PriceModel = new CurrentPriceOptionPriceModel();
    option.price_model = CurrentPriceOptionPriceModel()

    Examples

    Demonstration Algorithms
    BasicTemplateOptionsHistoryAlgorithm.py Python BasicTemplateOptionsPriceModel.py Python BasicTemplateMultiAssetAlgorithm.cs C# BasicTemplateOptionsHistoryAlgorithm.cs C#

     

    Options Models

    Volatility

    Volatility

    Key Concepts

    Introduction

    Volatility models measure the historical volatility of an asset. They are mostly used to calculate the volatility of the underlying security of an Option because the implied volatility of an Option contract needs an initial guess. The historical volatility doesn't need to be the standard deviation of the asset prices. The various volatility models in LEAN each have a unique methodology to calculate volatility.

    LEAN also provides an indicator implementation of implied volatility. It provides higher flexibility on Option price model selection, volatility modeling , and allows IV smoothing through call-put pair. For details, see Implied Volatility .

    Set Models

    To set the volatility model of the underlying security of an Option, set the VolatilityModel property of the Security object. The volatility model can have a different resolution than the underlying asset subscription.

    // In Initialize
    var underlyingSecurity= AddEquity("SPY");
    underlyingSecurity.VolatilityModel = new StandardDeviationOfReturnsVolatilityModel(30);
    # In Initialize
    underlying_security = self.add_equity("SPY")
    underlying_security.volatility_model = StandardDeviationOfReturnsVolatilityModel(30)

    You can also set the volatility model in a security initializer . If your algorithm has a universe of underlying assets, use the security initializer technique. In order to initialize single security subscriptions with the security initializer, call SetSecurityInitializer set_security_initializer before you create the subscriptions.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite the volatility model        
            if (security.Type == SecurityType.Equity)
            {
                security.VolatilityModel = new StandardDeviationOfReturnsVolatilityModel(30);
            }    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite the volatility model        
            if security.Type == SecurityType.EQUITY:
                security.VolatilityModel = StandardDeviationOfReturnsVolatilityModel(30)

    To view all the pre-built volatility models, see Supported Models .

    Default Behavior

    The default underlying volatility model for Equity Options and Index Options is the StandardDeviationOfReturnsVolatilityModel based on 30 days of daily resolution data. The default underlying volatility model for Future Options is the NullVolatilityModel .

    Model Structure

    Volatility models should extend the BaseVolatilityModel class. Extensions of the BaseVolatilityModel class must have Update update and GetHistoryRequirements get_history_requirements methods and a Volatility volatility property. The Update update method receives Security and BaseData objects and then updates the Volatility volatility . The GetHistoryRequirements get_history_requirements method receives Security and DateTime datetime objects and then returns a list of HistoryRequest objects that represent the history requests to warm up the model. Volatility models receive data at each time step in the algorithm to update their state.

    // In the Initialize method, set the custom volatility model of the underlying security
    underlyingSecurity.VolatilityModel = new MyVolatilityModel();
    
    // Define the custom volatility model outside of the algorithm
    public class MyVolatilityModel : BaseVolatilityModel
    {
        public override decimal Volatility { get; }
    
        public override void SetSubscriptionDataConfigProvider(
            ISubscriptionDataConfigProvider subscriptionDataConfigProvider)
        {
            SubscriptionDataConfigProvider = subscriptionDataConfigProvider;
        }
    
        public override void Update(Security security, BaseData data)
        {
        }
    
        public override IEnumerable<HistoryRequest> GetHistoryRequirements(
            Security security,
            DateTime utcTime)
        {
            return base.GetHistoryRequirements(security, utcTime);
        }
    
        public new IEnumerable<HistoryRequest> GetHistoryRequirements(
            Security security, 
            DateTime utcTime,
            Resolution? resolution,
            int barCount)
        {
            return base.GetHistoryRequirements(security, utcTime, resolution, barCount);
        }
    }
    # In the Initialize method, set the custom volatility model of the underlying security
    underlying_security.volatility_model = MyVolatilityModel()
    
    # Define the custom volatility model outside of the algorithm
    class MyVolatilityModel(BaseVolatilityModel):
        volatility: float = 0
    
        def set_subscription_data_config_provider(self,
            subscription_data_config_provider: ISubscriptionDataConfigProvider) -> None:
            super().set_subscription_data_config_provider(subscription_data_config_provider)
    
        def update(self, security: Security, data: BaseData) -> None:
            pass
    
        def get_history_requirements(self,
             security: Security,
             utc_time: datetime,
             resolution: resolution = None,
             bar_count: int = None) -> List[HistoryRequest]:
            return super().get_history_requirements(security, utc_time, resolution, bar_count)

    For a full example algorithm, see this backtest this backtest .

    Warm Up Models

    To use your volatility model as the inital guess for the implied volatility , warm up the volatility model of the underlying security. If you subscribe to all the Options in the Initialize initialize method, set a warm-up period to warm up their volatility models. The warm-up period should provide the volatility models with enough data to compute their values.

    // In Initialize
    SetWarmUp(30, Resolution.Daily);
    
    // In OnData
    if (IsWarmingUp) return;
    # In Initialize
    self.set_warm_up(30, Resolution.DAILY)
    
    # In OnData
    if self.is_warming_up:
        return

    If you have a dynamic universe of underlying assets and add Option contracts to your algorithm with the AddOptionContract add_option_contract , AddIndexOptionContract add_index_option_contract , or AddFutureOptionContract add_future_option_contract methods, warm up the volatility model when the underlying asset enters your universe. We recommend you do this inside a security initializer .

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices), this));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        private QCAlgorithm _algorithm;
    
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder, QCAlgorithm algorithm)
            : base(brokerageModel, securitySeeder) 
        {
            _algorithm = algorithm;
        }    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite and warm up the volatility model        
            if (security.Type == SecurityType.Equity) // Underlying asset type
            {
                security.VolatilityModel = new StandardDeviationOfReturnsVolatilityModel(30);
                foreach (var tradeBar in _algorithm.History(security.Symbol, 30, Resolution.Daily))
                {
                    security.VolatilityModel.Update(security, tradeBar);
                }
            }    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices), self))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder, algorithm: QCAlgorithm) -> None:
            super().__init__(brokerage_model, security_seeder)
            self._algorithm = algorithm
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite and warm up the volatility model        
            if security.type == SecurityType.EQUITY:  # Underlying asset type
                security.volatility_model = StandardDeviationOfReturnsVolatilityModel(30)
                trade_bars = self._algorithm.history[TradeBar](security.symbol, 30, Resolution.DAILY)
                for trade_bar in trade_bars:
                    security.volatility_model.update(security, trade_bar)

    Examples

    Demonstration Algorithms
    CustomVolatilityModelAlgorithm.py Python CustomVolatilityModelAlgorithm.cs C#

     

    Volatility

    Supported Models

    Introduction

    This page describes all of the pre-built volatility models in LEAN. If none of these models perform exactly how you want, create a custom volatility model .

    Null Model

    The NullVolatilityModel sets the volatility of the security to zero. It's the default volatility model for the underlying asset of Future Options.

    underlyingSecurity.VolatilityModel = VolatilityModel.Null;
    underlying_security.volatility_model = VolatilityModel.NULL

    To view the implementation of this model, see the LEAN GitHub repository .

    Standard Deviation of Returns Model

    The StandardDeviationOfReturnsVolatilityModel sets the volatility of the security to the annualized sample standard deviation of trailing returns. It's the default volatility model for the underlying asset of Equity Options and Index Options.

    underlyingSecurity.VolatilityModel = new StandardDeviationOfReturnsVolatilityModel(30);
    underlying_security.volatility_model = StandardDeviationOfReturnsVolatilityModel(30)

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    periods int The max number of samples to use when calculating the standard deviation of returns. This value must be greater than two.
    resolution Resolution? Resolution / NoneType The resolution of the price data used to calculate the standard deviation. This only has a material effect in live mode. For backtesting, this value does not cause any behavioral changes.
    null None
    updateFrequency update_frequency TimeSpan? timedelta / NoneType The frequency at which new values are inserted into the rolling window for the standard deviation calculation. If the value is null None , it defaults to the TimeSpan timedelta representation of resolution . If the value and resolution are null None , it defaults to a TimeSpan timedelta of one day. null None

    To view the implementation of this model, see the LEAN GitHub repository .

    Relative Standard Deviation Model

    The RelativeStandardDeviationVolatilityModel sets the volatility of the security to the relative standard deviation of its price. In symbols, the value is

    $$ \frac{|\mu|}{\sigma} $$

    where $\mu$ is the average of the samples and $\sigma$ is the standard deviation of the samples.

    underlyingSecurity.VolatilityModel = new RelativeStandardDeviationVolatilityModel(TimeSpan.FromDays(1), 10);
    underlying_security.volatility_model = RelativeStandardDeviationVolatilityModel(timedelta(days=1), 10)

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    periodSpan period_span TimeSpan timedelta The period of time to wait between each sample of the security price
    periods int The number of samples to use to calculate the volatility value

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Options Models

    Exercise

    Introduction

    If you exercise a long Option position or are assigned on your short Option position, LEAN processes an Option exercise order. The Option exercise model converts the Option exercise order into an OrderEvent .

    Set Models

    To set the exercise model of an Option, call the SetOptionExerciseModel set_option_exercise_model method of the Option object inside a security initializer .

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite the Option exercise model        
            if (security.Type == SecurityType.Option) // Option type
            {
                (security as Option).SetOptionExerciseModel(new DefaultExerciseModel());
            }    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite the Option exercise model        
            if security.Type == SecurityType.OPTION: # Option type
                security.set_option_exercise_model(DefaultExerciseModel())

    Default Behavior

    The default Option exercise model is the DefaultExerciseModel . The DefaultExerciseModel fills exercise orders to the full quantity with zero fees and applies an order tag to represent if the order is an exercise or assignment. To view the implementation of this model, see the LEAN GitHub repository .

    Model Structure

    Option exercise models should implement the IOptionExerciseModel interface. The IOptionExerciseModel interface must implement the OptionExercise option_exercise method, which receives Option and OptionExerciseOrder objects and then returns a list of OrderEvent objects that contain the order fill information.

    Option exercise models should extend the DefaultExerciseModel class. Extensions of the DefaultExerciseModel must implement the OptionExercise option_exercise method, which receives Option and OptionExerciseOrder objects and then returns a list of OrderEvent objects that contain the order fill information.

    using QuantConnect.Orders.OptionExercise;
    
    // In the security initializer, set the custom Option exercise model
    (security as Option).SetOptionExerciseModel(new MyOptionExerciseModel());
    
    // Define the custom Option exercise model outside of the algorithm
    public class MyOptionExerciseModel : IOptionExerciseModel
    {
        public override IEnumerable<OrderEvent> OptionExercise(Option option, OptionExerciseOrder order)
        {
            var inTheMoney = option.IsAutoExercised(option.Underlying.Close);
            var isAssignment = inTheMoney && option.Holdings.IsShort;
    
            yield return new OrderEvent(
                order.Id,
                option.Symbol,
                option.LocalTime.ConvertToUtc(option.Exchange.TimeZone),
                OrderStatus.Filled,
                Extensions.GetOrderDirection(order.Quantity),
                0.0m,
                order.Quantity,
                OrderFee.Zero,
                "Tag"
            ) { IsAssignment = isAssignment };
        }
    }
    # In the security initializer, set the custom Option exercise model
    security.set_option_exercise_model(MyOptionExerciseModel())
    
    # Define the custom Option exercise model outside of the algorithm
    class MyOptionExerciseModel(DefaultExerciseModel):
        def option_exercise(self, option: Option, order: OptionExerciseOrder) -> List[OrderEvent]:
            in_the_money = option.is_auto_exercised(option.underlying.close)
            is_assignment = in_the_money and option.holdings.is_short
    
            order_event = OrderEvent(
                order.id,
                option.symbol,
                Extensions.convert_to_utc(option.local_time, option.exchange.time_zone),
                OrderStatus.FILLED,
                Extensions.get_order_direction(order.quantity),
                0.0,
                order.quantity,
                OrderFee.zero,
                "Tag"
            )
            order_event.is_assignment = is_assignment
            return [ order_event ]

    For a full example algorithm, see this backtest this backtest .

    OptionExerciseOrder objects have the following properties:

    The following table describes the arguments of the OrderEvent constructor:

    Argument Details

    Argument: orderId order_id

    Id of the parent order

    Data Type: int | Default Value: -

    Argument: symbol

    Asset Symbol

    Data Type: Symbol | Default Value: -

    Argument: utcTime utc_time

    Date/time of this event

    Data Type: DateTime datetime | Default Value: -

    Argument: direction

    The direction of the order. The OrderDirection enumeration has the following members:

    Data Type: OrderDirection | Default Value: Hold

    Argument: fillPrice fill_price

    Fill price information if applicable

    Data Type: decimal float | Default Value: 0

    Argument: fillQuantity fill_quantity

    Fill quantity

    Data Type: decimal float | Default Value: 0

    Argument: orderFee order_fee

    The order fee. You can use OrderFee.Zero or create an OrderFee object with a custom fee.

    new OrderFee(new CashAmount(0.5m, "USD")); OrderFee(CashAmount(0.5, 'USD'))

    Data Type: OrderFee | Default Value: -

    Argument: message

    Message from the exchange

    Data Type: string str | Default Value: ""

    OrderEvent objects have the following attributes:

    Examples

    Demonstration Algorithms
    CustomOptionExerciseModelRegressionAlgorithm.py Python CustomOptionExerciseModelRegressionAlgorithm.cs C#

     

    Options Models

    Assignment

    Introduction

    If you sell an Option in a backtest, an assignment model can simulate an Option exercise order on behalf of the buyer and assign you to complete the requirements of the contract.

    Set Models

    To set the assignment model of an Option, call the SetOptionAssignmentModel set_option_assignment_model method of the Option object inside a security initializer .

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite the assignment model        
            if (security.Type == SecurityType.Option) // Option type
            {
                (security as Option).SetOptionAssignmentModel(new DefaultOptionAssignmentModel());
            }    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite the assignment model        
            if security.Type == SecurityType.OPTION: # Option type
                security.set_option_assignment_model(DefaultOptionAssignmentModel())

    Default Behavior

    The default Option assignment model is the DefaultOptionAssignmentModel . The DefaultOptionAssignmentModel scans your portfolio every hour. It considers exercising American-style Options if they are within 4 days of their expiration and it considers exercising European-style Options on their day of expiration. If you have sold an Option that's 5% in-the-money and the Option exercise order is profitable after the cost of fees, this model exercises the Option.

    To view the implementation of this model, see the LEAN GitHub repository .

    Model Structure

    Option assignment models should implement the IOptionAssignmentModel interface. Extensions of the IOptionAssignmentModel interface must implement the GetAssignment get_assignment method, which automatically fires at the top of each hour and returns the Option assignments to generate.

    Option assignment models should extend the NullOptionAssignmentModel class. Extensions of the NullOptionAssignmentModel class must implement the GetAssignment get_assignment method, which automatically fires at the top of each hour and returns the Option assignments to generate.

    // In the security initializer, set the custom Option assignment model
    (security as Option).SetOptionAssignmentModel(new MyOptionAssignmentModel());
    
    // Define the custom Option assignment model outside of the algorithm
    public class MyOptionAssignmentModel : IOptionAssignmentModel
    {
        public OptionAssignmentResult GetAssignment(OptionAssignmentParameters parameters)
        {
            var option = parameters.Option;
            // Check if the contract is ITM
            if ((option.Right == OptionRight.Call && option.Underlying.Price > option.StrikePrice) ||
                (option.Right == OptionRight.Put && option.Underlying.Price < option.StrikePrice))
            {
                return new OptionAssignmentResult(option.Holdings.AbsoluteQuantity, "MyTag");
            }
            return OptionAssignmentResult.Null;
        }
    }
    # In the security initializer, set the custom Option assignment model
    security.set_option_assignment_model(MyOptionAssignmentModel())
    
    # Define the custom Option assignment model outside of the algorithm
    class MyOptionAssignmentModel(NullOptionAssignmentModel):
    
        def get_assignment(self, parameters: OptionAssignmentParameters) -> OptionAssignmentResult:
            option = parameters.option
            # Check if the contract is ITM
            if option.right == OptionRight.CALL and option.underlying.price > option.strike_price
                or option.right == OptionRight.PUT and option.underlying.price < option.strike_price:
                return OptionAssignmentResult(option.holdings.absolute_quantity, "MyTag")
            return OptionAssignmentResult.NULL

    For a full example algorithm, see this backtest this backtest .

    The OptionAssignmentParameters object has the following members:

    To exercise the Option, return an OptionAssignmentResult with a positive quantity. Otherwise, return OptionAssignmentResult.Null . The OptionAssignmentResult constructor accepts the following arguments:

    Argument Data Type Description Default Value
    quantity decimal float The quantity to assign
    tag string str The order tag to use

    Disable Assignments

    To disable early Option assignments, set the Option assignment model to the NullOptionAssignmentModel .

    (security as Option).SetOptionAssignmentModel(new NullOptionAssignmentModel());
    security.set_option_assignment_model(NullOptionAssignmentModel())

    Examples

    Demonstration Algorithms
    CustomOptionAssignmentRegressionAlgorithm.py Python CustomOptionAssignmentRegressionAlgorithm.cs C#

     

    Reality Modeling

    Risk Free Interest Rate

    Risk Free Interest Rate

    Key Concepts

    Introduction

    The risk free interest rate is the hurdle rate for investments. If investors can get a rate of return with virtually no risk, an investment needs to offer the potential for a greater return to attract capital from rational investors. The risk free interest rate also impacts some performance statistics , like Sharpe and Sortino ratios. Risk free interest rate models provide the interest rate data to your algorithms to enable these calculations.

    Set Models

    To set the risk free interest rate model, in the Initialize method, call the SetRiskFreeInterestRateModel set_risk_free_interest_rate_model method.

    // In Initialize
    SetRiskFreeInterestRateModel(new ConstantRiskFreeRateInterestRateModel(0.02m));
    # In Initialize
    self.set_risk_free_interest_rate_model(ConstantRiskFreeRateInterestRateModel(0.02))

    To view all the pre-built risk free interest rate models, see Supported Models .

    Default Behavior

    The default risk free interest rate model is the InterestRateProvider , which provides the primary credit rate from the Federal Open Market Committee (FOMC).

    Model Structure

    Risk free interest rate models must extend the IRiskFreeInterestRateModel interface. Extensions of the IRiskFreeInterestRateModel interface must implement a GetInterestRate get_interest_rate method. The GetInterestRate get_interest_rate method returns the risk free interest rate for a given date.

    // In the Initialize method, set the risk free interest rate model
    SetRiskFreeInterestRateModel(new MyRiskFreeInterestRateModel());
    
    // Define the custom risk free interest rate model
    public class MyRiskFreeInterestRateModel : IRiskFreeInterestRateModel 
    {
        public decimal GetInterestRate(DateTime date) 
        {
            return 0.02m;
        }
    }
    # In the Initialize method, set the risk free interest rate model
    self.set_risk_free_interest_rate_model(MyRiskFreeInterestRateModel())
        
    # Define the custom risk free interest rate model
    class MyRiskFreeInterestRateModel:
        def get_interest_rate(self, date: datetime) -> float:
            return 0.02

    For a full example algorithm, see this backtest this backtest .

    Disable Interest Rates

    To disable the risk free interest rate, set the model to the ConstantRiskFreeRateInterestRateModel and set the risk free rate to zero.

    SetRiskFreeInterestRateModel(new ConstantRiskFreeRateInterestRateModel(0));
    self.set_risk_free_interest_rate_model(ConstantRiskFreeRateInterestRateModel(0))

    Get Interest Rate

    To get the risk free interest rate for a specific time, call the GetInterestRate get_interest_rate method with the time.

    var riskFreeInterestRate = RiskFreeInterestRateModel.GetInterestRate(Time);
    risk_free_interest_rate = self.risk_free_interest_rate_model.get_interest_rate(self.time)

    To get the average risk free interest rate for a window of time, call the GetRiskFreeRate method with the start date and end date. RiskFreeInterestRateModelExtensions.get_risk_free_rate method with the model, the start date, and end date.

    var avgRiskFreeInterestRate = RiskFreeInterestRateModel.GetRiskFreeRate(Time.AddDays(-30), Time);
    avg_risk_free_interest_rate = RiskFreeInterestRateModelExtensions.get_risk_free_rate(
        self.risk_free_interest_rate_model, 
        self.time-timedelta(7), self.time
    )

    To get the average risk free interest rate for a set of dates, call the GetAverageRiskFreeRate method with the list of dates. RiskFreeInterestRateModelExtensions.get_average_risk_free_rate method with the model and list of dates.

    var avgRiskFreeInterestRate = RiskFreeInterestRateModel.GetAverageRiskFreeRate(
        new [] {Time, Time.AddDays(-180), Time.AddDays(-365)}
    );
    avg_risk_free_interest_rate = RiskFreeInterestRateModelExtensions.get_average_risk_free_rate(
        self.risk_free_interest_rate_model, 
        [self.time, self.time-timedelta(180), self.time-timedelta(365)]
    )

     

    Risk Free Interest Rate

    Supported Models

    Introduction

    This page describes all of the pre-built risk free interest rate models in LEAN. If none of these models perform exactly how you want, create a custom risk free interest rate model .

    Constant Model

    The ConstantRiskFreeRateInterestRateModel returns a constant rate across time. It's the default risk free interest rate model.

    SetRiskFreeInterestRateModel(new ConstantRiskFreeRateInterestRateModel(0.02m));
    self.set_risk_free_interest_rate_model(ConstantRiskFreeRateInterestRateModel(0.02))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    riskFreeRate risk_free_rate decimal float The risk free interest rate

    To view the implementation of this model, see the LEAN GitHub repository .

    Function Model

    The FuncRiskFreeRateInterestRateModel calls a function you provide to get the risk free interest rate. The function you pass to the constructor effectively replaces the GetInterestRate method.

    SetRiskFreeInterestRateModel(new FuncRiskFreeRateInterestRateModel(getInterestRateFunc));
    self.set_risk_free_interest_rate_model(FuncRiskFreeRateInterestRateModel(self.get_interest_rate_func))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    getInterestRateFunc get_interest_rate_func Func<DateTime, decimal> Callable[[datetime], float] A function that returns the risk free interest rate for a given date

    To view the implementation of this model, see the LEAN GitHub repository .

    Interest Rate Provider Model

    The InterestRateProvider returns the primary credit rate from the Federal Open Market Committee (FOMC).

    SetRiskFreeInterestRateModel(new InterestRateProvider());
    self.set_risk_free_interest_rate_model(InterestRateProvider())

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Reality Modeling

    Dividend Yield

    Dividend Yield

    Key Concepts

    Introduction

    Dividends are periodic payments a company makes to its shareholders out of its earnings. The dividend yield refers to the rate of return an investor earns in the form of dividends from holding a stock.

    In the context of Option pricing models , the dividend yield is a critical factor because it affects the value of the underlying stock. When calculating the theoretical price of an Option using these models, the dividend yield is factored into the equation.

    Set Models

    To set the dividend yield model for an Option indicator , pass a DividendYieldProvider as the dividendYieldModel dividend_yield_model parameter.

    // Before creating the indicator, create the set dividend yield model
    var dividendYieldModel = new DividendYieldProvider(symbol.Underlying);
    _iv = new ImpliedVolatility(symbol, RiskFreeInterestRateModel, dividendYieldModel, OptionPricingModelType.BlackScholes);
    # Before creating the indicator, create the set dividend yield model
    dividend_yield_model = DividendYieldProvider(symbol.underlying)
    self.iv = ImpliedVolatility(symbol, self.risk_free_interest_rate_model, dividend_yield_model, OptionPricingModelType.BLACK_SCHOLES)

    To view all the pre-built dividend yield models, see Supported Models .

    Default Behavior

    For US Equity Options, the default dividend yield model is the DividendYieldProvider , which provides the continuous yield calculated from all dividend payoffs of the previous 350 days.

    For other Option types, the default dividend yield model is the ConstantDividendYieldModel with zero yield.

    Model Structure

    Dividend yield models must extend the IDividendYieldModel interface. Extensions of the IDividendYieldModel interface must implement a GetDividendYield get_dividend_yield method. The GetDividendYield get_dividend_yield method returns the dividend yield for a given date.

    // Before creating the indicator, create the dividend yield model
    var dividendYieldModel = new MyDividendYieldModel();
    _iv = new ImpliedVolatility(symbol, RiskFreeInterestRateModel, dividendYieldModel, OptionPricingModelType.BlackScholes);
    
    // Define the custom dividend yield model
    public class MyDividendYieldModel : IDividendYieldModel 
    {
        public decimal GetDividendYield(DateTime date) 
        {
            return 0.02m;
        }
    }
    # Before creating the indicator, create the dividend yield model
    dividend_yield_model = MyDividendYieldModel()
    self.iv = ImpliedVolatility(symbol, self.risk_free_interest_rate_model, dividend_yield_model, OptionPricingModelType.BLACK_SCHOLES)
        
    # Define the custom dividend yield model
    class MyDividendYieldModel:
        def get_dividend_yield(self, date: datetime) -> float:
            return 0.02

    For a full example algorithm, see this backtest this backtest .

     

    Dividend Yield

    Supported Models

    Introduction

    This page describes all of the pre-built dividend yield models in LEAN. If none of these models perform exactly how you want, create a custom dividend yield model .

    Constant Model

    The ConstantDividendYieldModel returns a constant yield across time. It's the default dividend yield model for securities that don't pay dividends.

    _dividendYieldModel = new ConstantDividendYieldModel(0.02m);
    self.dividend_yield_model = ConstantDividendYieldModel(0.02);

    The following table describes the arguments the model accepts:

    Argument Data Type Description
    dividendYield dividend_yield decimal float The dividend yield

    To view the implementation of this model, see the LEAN GitHub repository .

    Dividend Yield Provider Model

    The DividendYieldProvider uses historical dividend payments to estimate the annualized continuous dividend yield for a given date.

    var symbol = AddEquity("MSFT").Symbol;
    _dividendYieldModel = new DividendYieldProvider(symbol);
    symbol = self.add_equity("MSFT").symbol
    self.dividend_yield_model = DividendYieldProvider(symbol);

    The following table describes the arguments the model accepts:

    Argument Data Type Description
    symbol Symbol The symbol of a dividend-paying security

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Reality Modeling

    Margin Interest Rate

    Margin Interest Rate

    Key Concepts

    Introduction

    Margin interest is a cost associated with trading on margin. Margin interest rate models model margin interest cash flows by directly adding or removing cash from your portfolio.

    Set Models

    The brokerage model of your algorithm automatically sets the margin interest rate model for each security, but you can override it. To manually set the margin interest rate model of a security, assign a model to the MarginInterestRateModel property of the Security object.

    // In Initialize
    var security = AddEquity("SPY");
    security.MarginInterestRateModel = MarginInterestRateModel.Null;
    # In Initialize
    security = self.add_equity("SPY")
    security.set_margin_interest_rate_model(MarginInterestRateModel.NULL)

    You can also set the margin interest rate model in a security initializer . If your algorithm has a dynamic universe, use the security initializer technique. In order to initialize single security subscriptions with the security initializer, call SetSecurityInitializer set_security_initializer before you create the subscriptions.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite some of the reality models        
            security.MarginInterestRateModel = MarginInterestRateModel.Null;    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite some of the reality models        
            security.set_margin_interest_rate_model(MarginInterestRateModel.NULL)

    To view all the pre-built margin interest rate models, see Supported Models .

    Default Behavior

    The brokerage model of your algorithm automatically sets the margin interest rate model of each security. The default brokerage model is the DefaultBrokerageModel , which sets the NullMarginInterestRateModel .

    Model Structure

    Margin interest rate models should implement the IMarginInterestRateModel interface. Extensions of the IMarginInterestRateModel interface must implement the ApplyMarginInterestRate apply_margin_interest_rate method, which applies margin interest payments to the portfolio.

    // In the Initialize method, set the margin interest rate model
    security.SetMarginInterestRateModel(new MyMarginInterestRateModel());
    
    // Define the custom margin interest rate model
    public class MyMarginInterestRateModel : IMarginInterestRateModel 
    {
        public void ApplyMarginInterestRate(MarginInterestRateParameters marginInterestRateParameters) 
        {
            var holdings = marginInterestRateParameters.Security.Holdings;
            var positionValue = holdings.GetQuantityValue(holdings.Quantity);
            positionValue.Cash.AddAmount(-1);
        }
    }
    # In the Initialize method, set the margin interest rate model
    security.set_margin_interest_rate_model(MyMarginInterestRateModel())
    
    # Define the custom margin interest rate model
    class MyMarginInterestRateModel:
    
        def apply_margin_interest_rate(self, margin_interest_rate_parameters: MarginInterestRateParameters) -> None:
            holdings = margin_interest_rate_parameters.security.holdings
            position_value = holdings.get_quantity_value(holdings.quantity)
            position_value.cash.add_amount(-1)

    For a full example algorithm, see this backtest this backtest .

    The ApplyMarginInterestRate apply_margin_interest_rate method is automatically called at the top of each hour.

     

    Margin Interest Rate

    Supported Models

    Introduction

    This page describes the pre-built margin interest rate models in LEAN. If none of these models perform exactly how you want, create a custom margin interest rate model .

    Null Model

    The NullMarginInterestRateModel doesn't charge any margin interest. It's the default margin interest rate of the DefaultBrokerageModel .

    security.margin_interest_rate_model = MarginInterestRateModel.NULL;
    security.margin_interest_rate_model = MarginInterestRateModel.NULL

    To view the implementation of this model, see the LEAN GitHub repository .

    Binance Futures Model

    The BinanceFutureMarginInterestRateModel simulates the margin cost and payments of your Crypto Future holdings. When the funding rate is positive, the price of the perpetual contract is higher than the mark price, so traders who are long pay for short positions. Conversely, a negative funding rate indicates that perpetual prices are below the mark price, so traders who are short pay for long positions. The interest amount is

    $$ Nominal \ Value \ of \ Positions * Funding \ Rate $$

    The interest amount is periodically credited or debited from your currency holdings while you hold open positions. The interest amount is charged at 12 AM, 8 AM, 4 PM in your algorithm time zone .

    security.MarginInterestRateModel = new BinanceFutureMarginInterestRateModel();
    security.margin_interest_rate_model = BinanceFutureMarginInterestRateModel()

    To view the implementation of this model, see the LEAN GitHub repository .

    Bybit Futures Model

    The BybitFutureMarginInterestRateModel has the same behavior as the BinanceFutureMarginInterestRateModel .

    security.MarginInterestRateModel = new BybitFutureMarginInterestRateModel();
    security.margin_interest_rate_model = BybitFutureMarginInterestRateModel()

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Reality Modeling

    Margin Calls

    Introduction

    If the value of your portfolio falls below the maintenance margin, you receive a margin call. If you receive a margin call, you either need to add more capital to your brokerage account or the brokerage will liquidate some of your holdings to reduce your exposure and their risk. A margin call model monitors the margin levels of your portfolio, issues margin call warnings, and submits orders when margin calls occur.

    Set Models

    To set the margin call model, call the SetMarginCallModel set_margin_call_model method of the Portfolio portfolio object.

    // In Initialize
    Portfolio.SetMarginCallModel(new DefaultMarginCallModel(Portfolio, DefaultOrderProperties));
    
    # In Initialize
    self.portfolio.set_margin_call_model(DefaultMarginCallModel(self.portfolio, self.default_order_properties))
    

    Default Behavior

    The brokerage model of your algorithm automatically sets the margin call model for the portfolio. The default brokerage model is the DefaultBrokerageModel , which sets the DefaultMarginCallModel . The DefaultMarginCallModel issues margin call warnings when the margin remaining in your portfolio is less than or equal to 5% of the total portfolio value. When a margin call occurs, this model sorts the generated margin call orders in ascending order by their unrealized profit and then executes each order synchronously until your portfolio is within the margin requirements.

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    portfolio SecurityPortfolioManager The portfolio object to receive margin calls.
    defaultOrderProperties default_order_properties IOrderProperties The default order properties to be use in margin call orders.
    marginBuffer margin_buffer decimal float The percent margin buffer to use when checking whether the total margin used is above the total portfolio value to generate margin call orders. 0.10m 0.10 (10%)

    To view the implementation of this model, see the LEAN GitHub repository .

    Model Structure

    Margin call models must extend the DefaultMarginCallModel class. Extensions of the DefaultMarginCallModel class can override the GetMarginCallOrders get_margin_call_orders and ExecuteMarginCall execute_margin_call methods.

    The GetMarginCallOrders get_margin_call_orders method scans the portfolio and the updated data for a potential margin call situation that may get the holdings below zero. The method must return a list of SubmitOrderRequest objects that represent the margin call orders. To issue a margin call warning during this method, set the issueMarginCallWarning argument of the method to true.

    The ExecuteMarginCall execute_margin_call method receives the list of SubmitOrderRequest objects from the GetMarginCallOrders get_margin_call_orders method, executes some of them, and returns a list of OrderTicket objects.

    // In the Initialize method, set the margin call model
    Portfolio.SetMarginCallModel(new MyMarginCallModel(Portfolio, DefaultOrderProperties));
    
    // Define the custom margin call model  
    public class MyMarginCallModel : DefaultMarginCallModel
    {
        public MyMarginCallModel(
            SecurityPortfolioManager portfolio,
            IOrderProperties defaultOrderProperties)
            : base(portfolio, defaultOrderProperties)
        {
        }
    
        public override List<OrderTicket> ExecuteMarginCall(
            IEnumerable<SubmitOrderRequest> generatedMarginCallOrders)
        {
            return base.ExecuteMarginCall(generatedMarginCallOrders);
        }
    
        public List<SubmitOrderRequest> GetMarginCallOrders(out bool issueMarginCallWarning)
        {
            return base.GetMarginCallOrders(out issueMarginCallWarning);
        }
    }
    # In the Initialize method, set the margin call model
    self.portfolio.set_margin_call_model(MyMarginCallModel(self.portfolio, self.default_order_properties))
            
    # Define the custom margin call model        
    class MyMarginCallModel(DefaultMarginCallModel):
        def __init__(self,
             portfolio: SecurityPortfolioManager,
             default_order_properties: IOrderProperties):
            super().__init__(portfolio, default_order_properties)
    
        def execute_margin_call(self,
             generatedMarginCallOrders: List[SubmitOrderRequest]) -> List[OrderTicket]:
            return super().execute_margin_call(generatedMarginCallOrders)
    
        def get_margin_call_orders(self,
             issue_margin_call_warning: bool) -> List[SubmitOrderRequest]:
            return super().get_margin_call_orders(issue_margin_call_warning)
    

    For a full example algorithm, see this backtest this backtest .

    Disable Margin Calls

    To disable margin calls, set the margin call model to the NullMarginCallModel .

    Portfolio.MarginCallModel = MarginCallModel.Null;
    
    self.portfolio.margin_call_model = MarginCallModel.NULL
    

    Monitor Margin Call Events

    When the margin call model of your portfolio issues a margin call warning, we notify your algorithm through the OnMarginCallWarning on_margin_call_warning event handler.

    public override void OnMarginCallWarning()
    {
        Debug("Warning: Close to margin call");
    }
    def on_margin_call_warning(self) -> None:
        self.debug(f"Warning: Close to margin call")

    Before we send the orders that the margin call model produces, we notify your algorithm through the OnMarginCall on_margin_call event handler. This notification gives your algorithm a chance to liquidate some positions or modify the margin call orders. To modify the orders, adjust the list of SubmitOrderRequest objects the event handler receives.

    public override void OnMarginCall(List<SubmitOrderRequest> requests)
    {
        for (var i = 0; i < requests.Count; i++)
        {
            var order = requests[i];
            // liquidate an extra 10% each time you get a margin call to give yourself more padding
            var newQuantity = (int)(order.Quantity * 1.1m);
            requests[i] = new SubmitOrderRequest(order.OrderType, order.SecurityType, 
                                                order.Symbol, newQuantity, order.StopPrice, 
                                                order.LimitPrice, 0, Time, "OnMarginCall");
        }
    }
    def on_margin_call(self, requests: List[SubmitOrderRequest]) -> List[SubmitOrderRequest]:
        for i, order in enumerate(requests):
            # liquidate an extra 10% each time you get a margin call to give yourself more padding
            new_quantity = int(order.quantity * 1.1)
            requests[i] = SubmitOrderRequest(order.order_type, order.security_type, 
                                            order.symbol, new_quantity, order.stop_price, 
                                            order.limit_price, 0, self.time, "OnMarginCall")
        return requests

    Submit Order Request

    If you receive a margin call or create a margin call model, you'll need to work with SubmitOrderRequest objects. These objects have the following properties:

    The following table describes the arguments of the SubmitOrderRequest constructor:

    Argument Data Type Description Default Value
    orderType order_type OrderType The order type to be submitted
    securityType security_type SecurityType The security type of the asset
    symbol Symbol The symbol to be traded
    quantity decimal float The number of units to order
    stopPrice stop_price decimal float The stop price for stop orders
    limitPrice limit_price decimal float The limit price for limit orders
    triggerPrice trigger_price decimal float The trigger price for limit if touched orders
    time DateTime datetime The time this request was created
    tag string str A custom tag for this request
    properties IOrderProperties The order properties for this request null None

    Examples

    Demonstration Algorithms
    MarginCallEventsAlgorithm.py Python MarginCallEventsAlgorithm.cs C#

     

    Reality Modeling

    Short Availability

    Short Availability

    Key Concepts

    Introduction

    To short a security, you need to borrow shares from another investor or organization that owns the shares. A shortable provider is a model that tracks the number of shares that are available for you to borrow. A shortable provider can make your backtest results more realistic because it doesn't let you place a short trade if there are no shares available for you to borrow.

    Set Providers

    The brokerage model of your algorithm automatically sets the settlement model for each security, but you can override it. To manually set the shortable provider of a security, call the SetShortableProvider set_shortable_provider method on the Security object.

    // In Initialize
    var security = AddEquity("SPY");
    security.SetShortableProvider(new LocalDiskShortableProvider("axos"));
    # In Initialize
    security = self.add_equity("SPY")
    security.set_shortable_provider(LocalDiskShortableProvider("axos"))

    You can also set the shortable provider in a security initializer. If your algorithm has a universe, use the security initializer technique. In order to initialize single security subscriptions with the security initializer, call SetSecurityInitializer set_security_initializer before you create the subscriptions.

    // In Initialize
    SetSecurityInitializer(CustomSecurityInitializer);
    AddEquity("SPY");
    
    private void CustomSecurityInitializer(Security security)
    {
        security.SetShortableProvider(new LocalDiskShortableProvider("axos"));
    }
    
    # In Initialize
    self.set_security_initializer(self.custom_security_initializer)
    self.add_equity("SPY")
    
    def custom_security_initializer(self, security: Security) -> None:
        security.set_shortable_provider(LocalDiskShortableProvider("axos"))
    

    If you call the SetSecurityInitializer set_security_initializer method, it overwrites the default security initializer. The default security initializer uses the security-level reality models of the brokerage model to set the following reality models of each security:

    To extend upon the default security initializer instead of overwriting it, create a custom BrokerageModelSecurityInitializer .

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite some of the reality models        
            security.SetShortableProvider(new LocalDiskShortableProvider("axos"));    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite some of the reality models        
            security.set_shortable_provider(LocalDiskShortableProvider("axos"))

    To view all the pre-built shortable providers, see Supported Providers .

    Default Behavior

    The brokerage model of your algorithm automatically sets the shortable provider for each security. The default brokerage model is the DefaultBrokerageModel , which uses the NullShortableProvider .

    Provider Structure

    Shortable providers must implement the IShortableProvider interface. Shortable providers that implement the IShortableProvider interface must implement the FeeRate fee_rate , RebateRate rebate_rate , and ShortableQuantity shortable_quantity methods. These methods receives a Symbol and the local time of the algorithm. The FeeRate fee_rate method returns the borrow fee rate. The RebateRate rebate_rate method returns the borrow rebate rate. The ShortableQuantity shortable_quantity returns the shortable quantity.

    // In the Initialize method, set the shortable provider
    security.SetShortableProvider(new MyShortableProvider());
    
    // Define the custom shortable provider  
    class MyShortableProvider : IShortableProvider
    {
        public decimal FeeRate(Symbol symbol, DateTime localTime)
        {
            return 0.0025m;
        }
    
        public decimal RebateRate(Symbol symbol, DateTime localTime)
        {
            return 0.0507m;
        }
    
        public long? ShortableQuantity(Symbol symbol, DateTime localTime)
        {
            return 10000;
        }
    }
    # In the Initialize method, set the shortable provider
    security.set_shortable_provider(MyShortableProvider())
    
    # Define the custom shortable provider 
    class MyShortableProvider(NullShortableProvider):
    
        def fee_rate(self, symbol: Symbol, local_time: datetime) -> float:
            return 0.0025
    
        def rebate_rate(self, symbol: Symbol, local_time: datetime) -> float:
            return 0.0507
        
        def shortable_quantity(self, symbol: Symbol, local_time: datetime) -> float:
            return 10000
    

    For a full example algorithm, see this backtest this backtest .

    Order Failures

    If you place an order to short more shares than are available to borrow, LEAN rejects the order and applies the following tag: "Order exceeds maximum shortable quantity for Symbol ticker (requested short: quantity )".

    Borrowing Costs

    In live trading, your brokerage charges an interest fee when you borrow shares to short a security. In backtesting, we don't currently simulate short interest fees. You can evaluate the borrowing cost with the FeeRate fee_rate and RebateRate rebate_rate methods.

    To get valid borrowing rates, use the InteractiveBrokersShortableProvider .

    Examples

    Demonstration Algorithms
    InteractiveBrokersShortableProviderAlgorithm.py Python CustomShortableProviderRegressionAlgorithm.py Python AllShortableSymbolsCoarseSelectionRegressionAlgorithm.py Python InteractiveBrokersShortableProviderAlgorithm.cs C# CustomShortableProviderRegressionAlgorithm.cs C# AllShortableSymbolsCoarseSelectionRegressionAlgorithm.cs C#

     

    Short Availability

    Supported Providers

    Introduction

    This page describes all of the pre-built shortable providers in LEAN. If none of these models perform exactly how you want, create a custom shortable provider .

    Null Provider

    The NullShortableProvider doesn't provide shortable data, so it allows you to infinitely short assets. It's the shortable provider of the DefaultBrokerageModel .

    security.SetShortableProvider(new NullShortableProvider());
    security.set_shortable_provider(NullShortableProvider())

    To view the implementation of this model, see the LEAN GitHub repository .

    Local Disk Provider

    The LocalDiskShortableProvider sources short availability data from the local disk of a specific brokerage.

    security.SetShortableProvider(new LocalDiskShortableProvider("axos"));
    security.set_shortable_provider(LocalDiskShortableProvider("axos"))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    brokerage string str Brokerage to read data

    To view the implementation of this model, see the LEAN GitHub repository .

    Interactive Brokers Provider

    The InteractiveBrokersShortableProvider sources short availability data from Interactive Brokers.

    security.SetShortableProvider(new InteractiveBrokersShortableProvider());
    security.set_shortable_provider(InteractiveBrokersShortableProvider())

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Scheduled Events

    Introduction

    Scheduled Events let you trigger code to run at specific times of day, regardless of your algorithm's data subscriptions. It's easier and more reliable to execute time-based events with Scheduled Events than checking the current algorithm time in the OnData on_data event handler.

    Create Scheduled Events

    To create a Scheduled Event, call the Schedule.On schedule.on method. The method expects a DateRules object, a TimeRules object, and a function to execute. The following examples demonstrate some common Scheduled Events.

    Schedule Events Before Market Open

    You may want to train a model or fetch historical data before the market opens. The following example demonstrates how to set a Scheduled Event for 10 minutes before the market opens.

    Schedule.On(DateRules.EveryDay("SPY"),
                TimeRules.AfterMarketOpen("SPY", -10),
                BeforeMarketOpen);
    self.schedule.on(self.date_rules.every_day("SPY"),
                     self.time_rules.after_market_open("SPY", -10),
                     self.before_market_open)

    Schedule Events on the Last Trading Day of the Week

    You may want to rebalance your portfolio on the last trading day of each week and factor in market holidays. The following example demonstrates how to set a Scheduled Event for the last trading day of each week 30 minutes before the market closes.

    Schedule.On(DateRules.WeekEnd("SPY"),
                TimeRules.BeforeMarketClose("SPY", 30),
                Rebalance);
    self.schedule.on(self.date_rules.week_end("SPY"),
                     self.time_rules.before_market_close("SPY", 30),
                     self.rebalance)

    Schedule Events on Regular Intervals Throughout the Trading Day

    You may want to perform some action on a regular interval through each trading day. The following example demonstrates how to set a Scheduled Event for every 30 minutes through the trading day for SPY.

    Schedule.On(DateRules.EveryDay("SPY"),
                TimeRules.Every(TimeSpan.FromMinutes(30)),
                SomeAction);
    self.schedule.on(self.date_rules.every_day("SPY"),
                     self.time_rules.every(timedelta(minutes=30)),
                     self.some_action)

    Date Rules

    The following table describes the supported DateRules :

    Member Description
    self.date_rules.set_default_time_zone(time_zone: DateTimeZone) DateRules.SetDefaultTimeZone(DateTimeZone timeZone); Sets the time zone for the DateRules object used in all methods in this table. The default time zone is the algorithm time zone .
    self.date_rules.on(year: int, month: int, day: int) DateRules.On(int year, int month, int day) Trigger an event on a specific date.
    self.date_rules.every_day() DateRules.EveryDay() Trigger an event every day.
    self.date_rules.every_day(symbol: Symbol) DateRules.EveryDay(Symbol symbol) Trigger an event every day a specific symbol is trading.
    self.date_rules.every(days: List[DayOfWeek]) DateRules.Every(params DayOfWeek[] days) Trigger an event on specific days throughout the week. To view the DayOfWeek enum members, see DayOfWeek Enum in the .NET documentation.
    self.date_rules.month_start(days_offset: int = 0) DateRules.MonthStart(int daysOffset = 0) Trigger an event on the first day of each month plus an offset.
    self.date_rules.month_start(symbol: Symbol, daysOffset: int = 0) DateRules.MonthStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each month for a specific symbol plus an offset.
    self.date_rules.month_end(days_offset: int = 0) DateRules.MonthEnd(int daysOffset = 0) Trigger an event on the last day of each month minus an offset.
    self.date_rules.month_end(symbol: Symbol, daysOffset: int = 0) DateRules.MonthEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each month for a specific symbol minus an offset.
    self.date_rules.week_start(days_offset: int = 0) DateRules.WeekStart(int daysOffset = 0) Trigger an event on the first day of each week plus an offset.
    self.date_rules.week_start(symbol: Symbol, days_offset: int = 0) DateRules.WeekStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each week for a specific symbol plus an offset.
    self.date_rules.week_end(days_offset: int = 0) DateRules.WeekEnd(int daysOffset = 0) Trigger an event on the last day of each week minus an offset.
    self.date_rules.week_end(symbol: Symbol, days_offset: int = 0) DateRules.WeekEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each week for a specific symbol minus an offset.
    self.date_rules.today DateRules.Today Trigger an event once today.
    self.date_rules.tomorrow DateRules.Tomorrow Trigger an event once tomorrow.

    To define custom date rules, create a FuncDateRule object. The FuncDateRule constructor expects a name argument of type string str and a getDatesFunction get_dates_function argument of type Func<DateTime, DateTime, IEnumerable<DateTime>> Callable[[datetime, datetime], List[datetime]] . The getDatesFunction get_dates_function function receives the start and end dates of the algorithm and returns a list of dates for the date rule. In live trading, the end date is 12/31/2025. The following example demonstrates how to define a date rule that represents the 10th day of each month:

    var dateRule = new FuncDateRule(
        name: "10th_day_of_the_month",
        getDatesFunction: (start, end) => Enumerable.Range(start.Year, end.Year - start.Year + 1)
            .SelectMany(year => Enumerable.Range(1, 12).Select(month => new DateTime(year, month, 10)))
    );
    date_rule = FuncDateRule(
        name="10th_day_of_the_month", 
        get_dates_function=lambda start, end: [
            datetime(year, month, 10) 
            for year in range(start.year, end.year) for month in range(1,12)
        ]
    ) 

    Time Rules

    The following table describes the supported TimeRules :

    Member Description
    self.time_rules.set_default_time_zone(time_zone: DateTimeZone) TimeRules.SetDefaultTimeZone(DateTimeZone timeZone) Sets the time zone for the TimeRules object used in all methods in this table, except when a different time zone is given. The default time zone is the algorithm time zone .
    self.time_rules.after_market_open(symbol: Symbol, minutes_after_open: float = 0, extended_market_open: bool = False) TimeRules.AfterMarketOpen(Symbol symbol, double minutesAfterOpen = 0, bool extendedMarketOpen = false) Trigger an event a few minutes after market open for a specific symbol (default is 0). This rule doesn't work for Crypto securities or custom data.
    self.time_rules.before_market_close(symbol: Symbol, minutes_after_open: float = 0, extended_market_open: bool = False) TimeRules.BeforeMarketClose(Symbol symbol, double minutesBeforeClose = 0, bool extendedMarketOpen = false) Trigger an event a few minutes before market close for a specific symbol (default is 0). This rule doesn't work for Crypto securities or custom data.
    self.time_rules.every(interval: timedelta) TimeRules.Every(TimeSpan interval) Trigger an event every period interval starting at midnight.
    self.time_rules.now TimeRules.Now Trigger an event at the current time of day.
    self.time_rules.midnight TimeRules.Midnight Trigger an event at midnight.
    self.time_rules.noon TimeRules.Noon Trigger an event at noon.
    self.time_rules.at(hour: int, minute: int, second: int = 0) TimeRules.At(int hour, int minute, int second = 0) Trigger an event at a specific time of day (e.g. 13:10).
    self.time_rules.at(hour: int, minute: int, second: int, time_zone: DateTimeZone) TimeRules.At(int hour, int minute, int second, DateTimeZone timeZone) Trigger an event at a specific time of day in the given time zone (e.g. 13:10 UTC).

    To define custom time rules, create a FuncTimeRule object. The FuncTimeRule constructor expects a name argument of type string str and a createUtcEventTimesFunction create_utc_event_times_function argument of type Func<IEnumerable<DateTime>, IEnumerable<DateTime>> Callable[[List[datetime]], List[datetime]] . The function receives the list of dates from the date rule and then returns a list of DateTime datetime that define the time rule.

    var timeRule = new FuncTimeRule(
        name: "CustomTimeRule",
        createUtcEventTimesFunction: dates => dates.Select(d => d.AddHours(10)));
    time_rule = FuncTimeRule(
        name="CustomTimeRule", 
        create_utc_event_times_function=lambda dates: [d + timedelta(hours=10) for d in dates]
    )

    Remove Scheduled Events

    If you no longer need a Scheduled Event in your algorithm, remove it so your algorithm doesn't execute unnecessary functions. To remove a Scheduled Event, save a reference to the Scheduled Event when you create it and then call the Remove remove method to remove it.

    // Create a Scheduled Event
    var scheduledEvent = Schedule.On(DateRules.EveryDay("SPY"),
                                     TimeRules.AfterMarketOpen("SPY", 10),
                                     tenMinutesAfterOpen);
    
    // Remove the Scheduled Event
    Schedule.Remove(scheduledEvent);
    
    # Create a Scheduled Event
    scheduled_event = self.schedule.on(self.date_rules.every_day("SPY"),
                                       self.time_rules.after_market_open("SPY", 10),       
                                       self.ten_minutes_after_open)
    
    # Remove the Scheduled Event
    self.schedule.remove(scheduled_event)

    Common Errors

    Common errors with Scheduled Events include stale fills and execution timeouts.

    Stale Fills

    A common error is to subscribe to daily resolution data and set a Scheduled Event intraday to place trades. If you trade intraday with daily data, you get stale fills.

    Another common error is to set a Scheduled Event to trade immediately after the market open on illiquid securities. Illiquid securities can have no trades for the first few minutes after the market open. If you trade during this time, you get stale fills.

    Execution Timeouts

    If your Scheduled Event takes longer than 10 minutes to execute, your algorithm will timeout. To increase the amount of time that your Scheduled Event can run, replace your Scheduled Event with a training session .

    Execution Sequence

    The algorithm manager calls events in the following order:

    1. Scheduled Events
    2. Consolidation event handlers
    3. OnData on_data event handler

    This event flow is important to note. For instance, if your consolidation handlers or OnData on_data event handler appends data to a RollingWindow and you use that RollingWindow in your Scheduled Event, when the Scheduled Event executes, the RollingWindow won't contain the most recent data.

    Live Trading Considerations

    In live trading, Scheduled Events execute in a parallel thread based on a real-time clock. If you set a Scheduled Event to fire at 10:00 AM, it executes at exactly 10:00 AM. In backtesting, Scheduled Events are part of the main algorithm manager loop, so they may not execute exactly when you set them. For example, if your algorithm subscribes to minute resolution US Equity data with regular trading hours and you set a Scheduled Event to occur at 2:00 AM, your Scheduled Event will execute at 9:31 AM when the next bar is fed into your algorithm.

    The difference between live trading and backtesting is important to note because it can affect your algorithm's behavior. There are two common scenarios to consider.

    Execution Timing and Backtest Timeouts

    Take the following scenario:

    In this scenario, the Scheduled Events each fire at the correct time and execute without error in live trading. In backtesting, all of the Scheduled Events execute at 9:31 AM when your algorithm receives the first bar of the trading day. Since all the Scheduled Events take eight minutes to execute, the algorithm tries to execute all the Scheduled Events but reaches the 10-minute timeout and the backtest stops execution.

    Live Data Delays

    In backtests, your algorithm receives data at perfect timing. If you request minute resolution data, your algorithm receives the bars at the top of each minute. In live trading, bars have a slight delay, so you may receive them milliseconds after the top of each minute. Take the following scenario:

    In live trading, the Scheduled Event executes at exactly 10:00 AM but your algorithm may receive the 9:59-10:00 AM bar at 10:00:00.01 AM. Therefore, when you check the price in the Scheduled Event, the price from the 9:58-9:59 AM bar is the latest price. In backtesting, the Scheduled Event gets the price from the 9:59-10:00 AM bar since your algorithm receives the bar at perfect timing.

    Examples

    // Schedule an event to fire at a specific date/time
    Schedule.On(DateRules.On(2013, 10, 7),
                TimeRules.At(13, 0),
                () => Log($"SpecificTime: Fired at : {Time}"));
    
    // Schedule an event to fire every trading day for a security
    // The time rule here tells it to fire at 13:00:00 UTC
    Schedule.On(DateRules.EveryDay("SPY"),
                TimeRules.At(13, 0, 0, TimeZones.Utc),
                () => Log($"EveryDay.SPY SpecificTime: Fired at: {Time}"));
                
    // Schedule an event to fire every trading day for a security
    // The time rule here tells it to fire 10 minutes after SPY's market open
    Schedule.On(DateRules.EveryDay("SPY"),
                TimeRules.AfterMarketOpen("SPY", 10),
                () => Log($"EveryDay.SPY 10 min after open: Fired at: {Time}"));
    
    // Schedule an event to fire every trading day for a security
    // The time rule here tells it to fire 10 minutes before SPY's market close
    Schedule.On(DateRules.EveryDay("SPY"),
                TimeRules.BeforeMarketClose("SPY", 10),
                () => Log($"EveryDay.SPY 10 min before close: Fired at: {Time}"));
    
    // Schedule an event to fire on certain days of the week
    Schedule.On(DateRules.Every(DayOfWeek.Monday, DayOfWeek.Friday),
                TimeRules.At(12, 0),
                () => Log($"Mon/Fri at 12pm: Fired at: {Time}"));
    
    // Schedule an event to fire once today at when this method is called (now)
    Schedule.On(DateRules.Today,
                TimeRules.Now,
                () => Log($"Now: Fired at: {Time}"));
    
    // Schedule an event to fire once tomorrow at midnight
    Schedule.On(DateRules.Tomorrow,
                TimeRules.Midnight,
                () => Log($"Tomorrow at midnight: Fired at: {Time}"));
    
    // Schedule an event to fire once today at noon
    Schedule.On(DateRules.Today,
                TimeRules.Noon,
                () => Log($"Today at noon: Fired at: {Time}"));
    
    // The scheduling methods return the ScheduledEvent object which can be used 
    // for other things here I set the event up to check the portfolio value every
    // 10 minutes, and liquidate if we have too many losses
    Schedule.On(DateRules.EveryDay(), 
                TimeRules.Every(TimeSpan.FromMinutes(10)),
                LiquidateUnrealizedLosses);
                
    // Schedule an event to fire at the beginning of the month, the symbol is optional. 
    // if specified, it will fire the first trading day for that symbol of the month,
    // if not specified it will fire on the first day of the month
    Schedule.On(DateRules.MonthStart("SPY"),
                TimeRules.AfterMarketOpen("SPY"),
                RebalancingCode);
    
    // Schedule an event to fire at the end of the month, the symbol is optional. 
    // if specified, it will fire the last trading day for that symbol of the month,
    // if not specified it will fire on the first day of the month
    Schedule.On(DateRules.MonthEnd("SPY"),
                TimeRules.BeforeMarketClose("SPY"),
                RebalancingCode);
    
    // Schedule an event to fire at the beginning of the week, the symbol is optional. 
    // if specified, it will fire the first trading day for that symbol of the week,
    // if not specified it will fire on the first day of the week
    Schedule.On(DateRules.WeekStart("SPY"),
                TimeRules.AfterMarketOpen("SPY", 5),
                RebalancingCode);
    
    // Schedule an event to fire at the end of the week, the symbol is optional. 
    // if specified, it will fire the last trading day for that symbol of the week,
    // if not specified it will fire on the first day of the week
    Schedule.On(DateRules.WeekEnd("SPY"),
                TimeRules.BeforeMarketClose("SPY", 5),
                RebalancingCode);
    
    
    // The following methods are not defined in Initialize:
    private void LiquidateUnrealizedLosses()
    {
        // if we have over 1000 dollars in unrealized losses, liquidate
        if (Portfolio.TotalUnrealizedProfit < -1000)
        {
            Log($"Liquidated due to unrealized losses at: {Time}");
            Liquidate();
        }
    }
    
    private void RebalancingCode()
    {
        // Good spot for rebalancing code?
    }            
    
    # Schedule an event to fire at a specific date/time
    self.schedule.on(self.date_rules.on(2013, 10, 7), 
                     self.time_rules.at(13, 0), 
                     lambda: self.log(f"SpecificTime: Fired at : {self.time}"))
    
    # Schedule an event to fire every trading day for a security the
    # The time rule here tells it to fire at 13:00:00 UTC
    self.schedule.on(self.date_rules.every_day("SPY"), 
                     self.time_rules.at(13, 0, 0, TimeZones.UTC),
                     lambda: self.log(f"EveryDay.SPY SpecificTime: Fired at: {self.time}"))
    
    # Schedule an event to fire every trading day for a security the
    # The time rule here tells it to fire 10 minutes after SPY's market open
    self.schedule.on(self.date_rules.every_day("SPY"), 
                     self.time_rules.after_market_open("SPY", 10),
                     lambda: self.log(f"EveryDay.SPY 10 min after open: Fired at: {self.time}"))
    
    # Schedule an event to fire every trading day for a security the
    # The time rule here tells it to fire 10 minutes before SPY's market close
    self.schedule.on(self.date_rules.every_day("SPY"),
                     self.time_rules.before_market_close("SPY", 10),
                     lambda: self.log(f"EveryDay.SPY 10 min before close: Fired at: {self.time}"))
    
    # Schedule an event to fire on certain days of the week
    self.schedule.on(self.date_rules.every(DayOfWeek.MONDAY, DayOfWeek.FRIDAY),
                     self.time_rules.at(12, 0),
                     lambda: self.log(f"Mon/Fri at 12pm: Fired at: {self.time}"))
    
    # Schedule an event to fire once today at when this method is called (now)
    self.schedule.on(self.date_rules.today,
                     self.time_rules.now,
                     lambda: self.log(f"Now: Fired at: {self.time}"))
    
    # Schedule an event to fire once tomorrow at midnight
    self.schedule.on(self.date_rules.tomorrow,
                     self.time_rules.midnight,
                     lambda: self.log(f"Tomorrow at midnight: Fired at: {self.time}"))
    
    # Schedule an event to fire once today at noon
    self.schedule.on(self.date_rules.today,
                     self.time_rules.noon,
                     lambda: self.log(f"Today at noon: Fired at: {self.time}"))
    
    # the scheduling methods return the ScheduledEvent object which can be used 
    # for other things here I set the event up to check the portfolio value every
    # 10 minutes, and liquidate if we have too many losses
    self.schedule.on(self.date_rules.every_day(), 
                     self.time_rules.every(timedelta(minutes=10)),
                     self.liquidate_unrealized_losses)
    
    # Schedule an event to fire at the beginning of the month, the symbol is optional. 
    # if specified, it will fire the first trading day for that symbol of the month,
    # if not specified it will fire on the first day of the month
    self.schedule.on(self.date_rules.month_start("SPY"),
                     self.time_rules.after_market_open("SPY"),
                     self.rebalancing_code)
    
    # Schedule an event to fire at the end of the month, the symbol is optional. 
    # if specified, it will fire the last trading day for that symbol of the month,
    # if not specified it will fire on the first day of the month
    self.schedule.on(self.date_rules.month_end("SPY"),
                     self.time_rules.before_market_close("SPY"),
                     self.rebalancing_code)
    
    # Schedule an event to fire at the beginning of the week, the symbol is optional. 
    # if specified, it will fire the first trading day for that symbol of the week,
    # if not specified it will fire on the first day of the week
    self.schedule.on(self.date_rules.week_start("SPY"),
                     self.time_rules.after_market_open("SPY", 5),
                     self.rebalancing_code)
    
    # Schedule an event to fire at the end of the week, the symbol is optional.
    # if specified, it will fire the last trading day for that symbol of the week,
    # if not specified it will fire on the first day of the week
    self.schedule.on(self.date_rules.week_end("SPY"),
                     self.time_rules.before_market_close("SPY", 5),
                     self.rebalancing_code)
    
    
    # The following methods are not defined in Initialize:
    def liquidate_unrealized_losses(self) -> None:
        ''' if we have over 1000 dollars in unrealized losses, liquidate'''
        if self.portfolio.total_unrealized_profit < -1000:
            self.log(f"Liquidated due to unrealized losses at: {self.time}")
            self.liquidate()
    
    def rebalancing_code(self) -> None:
        ''' Good spot for rebalancing code?'''
        pass
    
    Demonstration Algorithm
    ScheduledEventsAlgorithm.py Python ScheduledEventsAlgorithm.cs C#

     

    Indicators

    Indicators

    Supported Indicators

    Indicators translate a stream of data points into a numerical value you can use to detect trading opportunities. LEAN provides more than 100 pre-built technical indicators and candlestick patterns you can use in your algorithms. You can use any of the following indicators. Click one to learn more.

     

    Supported Indicators

    Candlestick Patterns

    You can use any of the following candlestick patterns. Click one to learn more.

     

    Supported Indicators

    Abandoned Baby

    Introduction

    Create a new Abandoned Baby candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using AbandonedBaby Indicator

    To create an automatic indicators for AbandonedBaby , call the AbandonedBaby helper method from the QCAlgorithm class. The AbandonedBaby method creates a AbandonedBaby object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AbandonedBabyAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AbandonedBaby _abandonedbaby;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _abandonedbaby = CandlestickPatterns.AbandonedBaby(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_abandonedbaby.IsReady)
            {
                // The current value of _abandonedbaby is represented by itself (_abandonedbaby)
                // or _abandonedbaby.Current.Value
                Plot("AbandonedBaby", "abandonedbaby", _abandonedbaby);
                
            }
        }
    }
    class AbandonedBabyAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._abandonedbaby = self.CandlestickPatterns.abandonedbaby(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._abandonedbaby.is_ready:
                # The current value of self._abandonedbaby is represented by self._abandonedbaby.current.value
                self.plot("AbandonedBaby", "abandonedbaby", self._abandonedbaby.current.value)
                
    

    The following reference table describes the AbandonedBaby method:

    abandoned_baby( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new AbandonedBaby pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    AbandonedBaby

    AbandonedBaby( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new AbandonedBaby pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    AbandonedBaby

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AbandonedBaby indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class AbandonedBabyAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AbandonedBaby _abandonedbaby;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _abandonedbaby = new AbandonedBaby();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _abandonedbaby.Update(bar);
            }
       
            if (_abandonedbaby.IsReady)
            {
                // The current value of _abandonedbaby is represented by itself (_abandonedbaby)
                // or _abandonedbaby.Current.Value
                Plot("AbandonedBaby", "abandonedbaby", _abandonedbaby);
                
            }
        }
    }
    class AbandonedBabyAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._abandonedbaby = AbandonedBaby()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._abandonedbaby.update(bar)
            if self._abandonedbaby.is_ready:
                # The current value of self._abandonedbaby is represented by self._abandonedbaby.current.value
                self.plot("AbandonedBaby", "abandonedbaby", self._abandonedbaby.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AbandonedBabyAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AbandonedBaby _abandonedbaby;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _abandonedbaby = new AbandonedBaby();
            RegisterIndicator(_symbol, _abandonedbaby, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_abandonedbaby.IsReady)
            {
                // The current value of _abandonedbaby is represented by itself (_abandonedbaby)
                // or _abandonedbaby.Current.Value
                Plot("AbandonedBaby", "abandonedbaby", _abandonedbaby);
                
            }
        }
    }
    class AbandonedBabyAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._abandonedbaby = AbandonedBaby()
            self.register_indicator(self._symbol, self._abandonedbaby, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._abandonedbaby.is_ready:
                # The current value of self._abandonedbaby is represented by self._abandonedbaby.current.value
                self.plot("AbandonedBaby", "abandonedbaby", self._abandonedbaby.current.value)
                
    

    The following reference table describes the AbandonedBaby constructor:

    AbandonedBaby

    class QuantConnect.Indicators.CandlestickPatterns.AbandonedBaby [source]

    Abandoned Baby candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AbandonedBaby

    class QuantConnect.Indicators.CandlestickPatterns.AbandonedBaby [source]

    Abandoned Baby candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Advance Block

    Introduction

    Create a new Advance Block candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using AdvanceBlock Indicator

    To create an automatic indicators for AdvanceBlock , call the AdvanceBlock helper method from the QCAlgorithm class. The AdvanceBlock method creates a AdvanceBlock object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AdvanceBlockAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AdvanceBlock _advanceblock;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _advanceblock = CandlestickPatterns.AdvanceBlock(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_advanceblock.IsReady)
            {
                // The current value of _advanceblock is represented by itself (_advanceblock)
                // or _advanceblock.Current.Value
                Plot("AdvanceBlock", "advanceblock", _advanceblock);
                
            }
        }
    }
    class AdvanceBlockAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._advanceblock = self.CandlestickPatterns.advanceblock(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._advanceblock.is_ready:
                # The current value of self._advanceblock is represented by self._advanceblock.current.value
                self.plot("AdvanceBlock", "advanceblock", self._advanceblock.current.value)
                
    

    The following reference table describes the AdvanceBlock method:

    advance_block( symbol, resolution=None, selector=None )

    Creates a new AdvanceBlock pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    AdvanceBlock

    AdvanceBlock( symbol, resolution=None, selector=None )

    Creates a new AdvanceBlock pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    AdvanceBlock

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AdvanceBlock indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class AdvanceBlockAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AdvanceBlock _advanceblock;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _advanceblock = new AdvanceBlock();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _advanceblock.Update(bar);
            }
       
            if (_advanceblock.IsReady)
            {
                // The current value of _advanceblock is represented by itself (_advanceblock)
                // or _advanceblock.Current.Value
                Plot("AdvanceBlock", "advanceblock", _advanceblock);
                
            }
        }
    }
    class AdvanceBlockAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._advanceblock = AdvanceBlock()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._advanceblock.update(bar)
            if self._advanceblock.is_ready:
                # The current value of self._advanceblock is represented by self._advanceblock.current.value
                self.plot("AdvanceBlock", "advanceblock", self._advanceblock.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AdvanceBlockAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AdvanceBlock _advanceblock;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _advanceblock = new AdvanceBlock();
            RegisterIndicator(_symbol, _advanceblock, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_advanceblock.IsReady)
            {
                // The current value of _advanceblock is represented by itself (_advanceblock)
                // or _advanceblock.Current.Value
                Plot("AdvanceBlock", "advanceblock", _advanceblock);
                
            }
        }
    }
    class AdvanceBlockAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._advanceblock = AdvanceBlock()
            self.register_indicator(self._symbol, self._advanceblock, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._advanceblock.is_ready:
                # The current value of self._advanceblock is represented by self._advanceblock.current.value
                self.plot("AdvanceBlock", "advanceblock", self._advanceblock.current.value)
                
    

    The following reference table describes the AdvanceBlock constructor:

    AdvanceBlock

    class QuantConnect.Indicators.CandlestickPatterns.AdvanceBlock [source]

    Advance Block candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AdvanceBlock

    class QuantConnect.Indicators.CandlestickPatterns.AdvanceBlock [source]

    Advance Block candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Belt Hold

    Introduction

    Create a new Belt-hold candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using BeltHold Indicator

    To create an automatic indicators for BeltHold , call the BeltHold helper method from the QCAlgorithm class. The BeltHold method creates a BeltHold object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class BeltHoldAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BeltHold _belthold;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _belthold = CandlestickPatterns.BeltHold(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_belthold.IsReady)
            {
                // The current value of _belthold is represented by itself (_belthold)
                // or _belthold.Current.Value
                Plot("BeltHold", "belthold", _belthold);
                
            }
        }
    }
    class BeltHoldAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._belthold = self.CandlestickPatterns.belthold(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._belthold.is_ready:
                # The current value of self._belthold is represented by self._belthold.current.value
                self.plot("BeltHold", "belthold", self._belthold.current.value)
                
    

    The following reference table describes the BeltHold method:

    belt_hold( symbol, resolution=None, selector=None )

    Creates a new BeltHold pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    BeltHold

    BeltHold( symbol, resolution=None, selector=None )

    Creates a new BeltHold pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    BeltHold

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a BeltHold indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class BeltHoldAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BeltHold _belthold;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _belthold = new BeltHold();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _belthold.Update(bar);
            }
       
            if (_belthold.IsReady)
            {
                // The current value of _belthold is represented by itself (_belthold)
                // or _belthold.Current.Value
                Plot("BeltHold", "belthold", _belthold);
                
            }
        }
    }
    class BeltHoldAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._belthold = BeltHold()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._belthold.update(bar)
            if self._belthold.is_ready:
                # The current value of self._belthold is represented by self._belthold.current.value
                self.plot("BeltHold", "belthold", self._belthold.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class BeltHoldAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BeltHold _belthold;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _belthold = new BeltHold();
            RegisterIndicator(_symbol, _belthold, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_belthold.IsReady)
            {
                // The current value of _belthold is represented by itself (_belthold)
                // or _belthold.Current.Value
                Plot("BeltHold", "belthold", _belthold);
                
            }
        }
    }
    class BeltHoldAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._belthold = BeltHold()
            self.register_indicator(self._symbol, self._belthold, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._belthold.is_ready:
                # The current value of self._belthold is represented by self._belthold.current.value
                self.plot("BeltHold", "belthold", self._belthold.current.value)
                
    

    The following reference table describes the BeltHold constructor:

    BeltHold

    class QuantConnect.Indicators.CandlestickPatterns.BeltHold [source]

    Belt-hold candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    BeltHold

    class QuantConnect.Indicators.CandlestickPatterns.BeltHold [source]

    Belt-hold candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Breakaway

    Introduction

    Create a new Breakaway candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Breakaway Indicator

    To create an automatic indicators for Breakaway , call the Breakaway helper method from the QCAlgorithm class. The Breakaway method creates a Breakaway object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class BreakawayAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Breakaway _breakaway;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _breakaway = CandlestickPatterns.Breakaway(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_breakaway.IsReady)
            {
                // The current value of _breakaway is represented by itself (_breakaway)
                // or _breakaway.Current.Value
                Plot("Breakaway", "breakaway", _breakaway);
                
            }
        }
    }
    class BreakawayAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._breakaway = self.CandlestickPatterns.breakaway(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._breakaway.is_ready:
                # The current value of self._breakaway is represented by self._breakaway.current.value
                self.plot("Breakaway", "breakaway", self._breakaway.current.value)
                
    

    The following reference table describes the Breakaway method:

    breakaway( symbol, resolution=None, selector=None )

    Creates a new Breakaway pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Breakaway

    Breakaway( symbol, resolution=None, selector=None )

    Creates a new Breakaway pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Breakaway

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Breakaway indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class BreakawayAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Breakaway _breakaway;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _breakaway = new Breakaway();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _breakaway.Update(bar);
            }
       
            if (_breakaway.IsReady)
            {
                // The current value of _breakaway is represented by itself (_breakaway)
                // or _breakaway.Current.Value
                Plot("Breakaway", "breakaway", _breakaway);
                
            }
        }
    }
    class BreakawayAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._breakaway = Breakaway()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._breakaway.update(bar)
            if self._breakaway.is_ready:
                # The current value of self._breakaway is represented by self._breakaway.current.value
                self.plot("Breakaway", "breakaway", self._breakaway.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class BreakawayAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Breakaway _breakaway;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _breakaway = new Breakaway();
            RegisterIndicator(_symbol, _breakaway, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_breakaway.IsReady)
            {
                // The current value of _breakaway is represented by itself (_breakaway)
                // or _breakaway.Current.Value
                Plot("Breakaway", "breakaway", _breakaway);
                
            }
        }
    }
    class BreakawayAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._breakaway = Breakaway()
            self.register_indicator(self._symbol, self._breakaway, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._breakaway.is_ready:
                # The current value of self._breakaway is represented by self._breakaway.current.value
                self.plot("Breakaway", "breakaway", self._breakaway.current.value)
                
    

    The following reference table describes the Breakaway constructor:

    Breakaway

    class QuantConnect.Indicators.CandlestickPatterns.Breakaway [source]

    Breakaway candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Breakaway

    class QuantConnect.Indicators.CandlestickPatterns.Breakaway [source]

    Breakaway candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Closing Marubozu

    Introduction

    Create a new Closing Marubozu candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ClosingMarubozu Indicator

    To create an automatic indicators for ClosingMarubozu , call the ClosingMarubozu helper method from the QCAlgorithm class. The ClosingMarubozu method creates a ClosingMarubozu object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ClosingMarubozuAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ClosingMarubozu _closingmarubozu;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _closingmarubozu = CandlestickPatterns.ClosingMarubozu(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_closingmarubozu.IsReady)
            {
                // The current value of _closingmarubozu is represented by itself (_closingmarubozu)
                // or _closingmarubozu.Current.Value
                Plot("ClosingMarubozu", "closingmarubozu", _closingmarubozu);
                
            }
        }
    }
    class ClosingMarubozuAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._closingmarubozu = self.CandlestickPatterns.closingmarubozu(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._closingmarubozu.is_ready:
                # The current value of self._closingmarubozu is represented by self._closingmarubozu.current.value
                self.plot("ClosingMarubozu", "closingmarubozu", self._closingmarubozu.current.value)
                
    

    The following reference table describes the ClosingMarubozu method:

    closing_marubozu( symbol, resolution=None, selector=None )

    Creates a new ClosingMarubozu pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ClosingMarubozu

    ClosingMarubozu( symbol, resolution=None, selector=None )

    Creates a new ClosingMarubozu pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ClosingMarubozu

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ClosingMarubozu indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ClosingMarubozuAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ClosingMarubozu _closingmarubozu;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _closingmarubozu = new ClosingMarubozu();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _closingmarubozu.Update(bar);
            }
       
            if (_closingmarubozu.IsReady)
            {
                // The current value of _closingmarubozu is represented by itself (_closingmarubozu)
                // or _closingmarubozu.Current.Value
                Plot("ClosingMarubozu", "closingmarubozu", _closingmarubozu);
                
            }
        }
    }
    class ClosingMarubozuAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._closingmarubozu = ClosingMarubozu()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._closingmarubozu.update(bar)
            if self._closingmarubozu.is_ready:
                # The current value of self._closingmarubozu is represented by self._closingmarubozu.current.value
                self.plot("ClosingMarubozu", "closingmarubozu", self._closingmarubozu.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ClosingMarubozuAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ClosingMarubozu _closingmarubozu;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _closingmarubozu = new ClosingMarubozu();
            RegisterIndicator(_symbol, _closingmarubozu, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_closingmarubozu.IsReady)
            {
                // The current value of _closingmarubozu is represented by itself (_closingmarubozu)
                // or _closingmarubozu.Current.Value
                Plot("ClosingMarubozu", "closingmarubozu", _closingmarubozu);
                
            }
        }
    }
    class ClosingMarubozuAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._closingmarubozu = ClosingMarubozu()
            self.register_indicator(self._symbol, self._closingmarubozu, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._closingmarubozu.is_ready:
                # The current value of self._closingmarubozu is represented by self._closingmarubozu.current.value
                self.plot("ClosingMarubozu", "closingmarubozu", self._closingmarubozu.current.value)
                
    

    The following reference table describes the ClosingMarubozu constructor:

    ClosingMarubozu

    class QuantConnect.Indicators.CandlestickPatterns.ClosingMarubozu [source]

    Closing Marubozu candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ClosingMarubozu

    class QuantConnect.Indicators.CandlestickPatterns.ClosingMarubozu [source]

    Closing Marubozu candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Concealed Baby Swallow

    Introduction

    Create a new Concealed Baby Swallow candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ConcealedBabySwallow Indicator

    To create an automatic indicators for ConcealedBabySwallow , call the ConcealedBabySwallow helper method from the QCAlgorithm class. The ConcealedBabySwallow method creates a ConcealedBabySwallow object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ConcealedBabySwallowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ConcealedBabySwallow _concealedbabyswallow;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _concealedbabyswallow = CandlestickPatterns.ConcealedBabySwallow(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_concealedbabyswallow.IsReady)
            {
                // The current value of _concealedbabyswallow is represented by itself (_concealedbabyswallow)
                // or _concealedbabyswallow.Current.Value
                Plot("ConcealedBabySwallow", "concealedbabyswallow", _concealedbabyswallow);
                
            }
        }
    }
    class ConcealedBabySwallowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._concealedbabyswallow = self.CandlestickPatterns.concealedbabyswallow(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._concealedbabyswallow.is_ready:
                # The current value of self._concealedbabyswallow is represented by self._concealedbabyswallow.current.value
                self.plot("ConcealedBabySwallow", "concealedbabyswallow", self._concealedbabyswallow.current.value)
                
    

    The following reference table describes the ConcealedBabySwallow method:

    concealed_baby_swallow( symbol, resolution=None, selector=None )

    Creates a new ConcealedBabySwallow pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ConcealedBabySwallow

    ConcealedBabySwallow( symbol, resolution=None, selector=None )

    Creates a new ConcealedBabySwallow pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ConcealedBabySwallow

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ConcealedBabySwallow indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ConcealedBabySwallowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ConcealedBabySwallow _concealedbabyswallow;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _concealedbabyswallow = new ConcealedBabySwallow();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _concealedbabyswallow.Update(bar);
            }
       
            if (_concealedbabyswallow.IsReady)
            {
                // The current value of _concealedbabyswallow is represented by itself (_concealedbabyswallow)
                // or _concealedbabyswallow.Current.Value
                Plot("ConcealedBabySwallow", "concealedbabyswallow", _concealedbabyswallow);
                
            }
        }
    }
    class ConcealedBabySwallowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._concealedbabyswallow = ConcealedBabySwallow()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._concealedbabyswallow.update(bar)
            if self._concealedbabyswallow.is_ready:
                # The current value of self._concealedbabyswallow is represented by self._concealedbabyswallow.current.value
                self.plot("ConcealedBabySwallow", "concealedbabyswallow", self._concealedbabyswallow.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ConcealedBabySwallowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ConcealedBabySwallow _concealedbabyswallow;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _concealedbabyswallow = new ConcealedBabySwallow();
            RegisterIndicator(_symbol, _concealedbabyswallow, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_concealedbabyswallow.IsReady)
            {
                // The current value of _concealedbabyswallow is represented by itself (_concealedbabyswallow)
                // or _concealedbabyswallow.Current.Value
                Plot("ConcealedBabySwallow", "concealedbabyswallow", _concealedbabyswallow);
                
            }
        }
    }
    class ConcealedBabySwallowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._concealedbabyswallow = ConcealedBabySwallow()
            self.register_indicator(self._symbol, self._concealedbabyswallow, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._concealedbabyswallow.is_ready:
                # The current value of self._concealedbabyswallow is represented by self._concealedbabyswallow.current.value
                self.plot("ConcealedBabySwallow", "concealedbabyswallow", self._concealedbabyswallow.current.value)
                
    

    The following reference table describes the ConcealedBabySwallow constructor:

    ConcealedBabySwallow

    class QuantConnect.Indicators.CandlestickPatterns.ConcealedBabySwallow [source]

    Concealed Baby Swallow candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ConcealedBabySwallow

    class QuantConnect.Indicators.CandlestickPatterns.ConcealedBabySwallow [source]

    Concealed Baby Swallow candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Counterattack

    Introduction

    Create a new Counterattack candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Counterattack Indicator

    To create an automatic indicators for Counterattack , call the Counterattack helper method from the QCAlgorithm class. The Counterattack method creates a Counterattack object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class CounterattackAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Counterattack _counterattack;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _counterattack = CandlestickPatterns.Counterattack(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_counterattack.IsReady)
            {
                // The current value of _counterattack is represented by itself (_counterattack)
                // or _counterattack.Current.Value
                Plot("Counterattack", "counterattack", _counterattack);
                
            }
        }
    }
    class CounterattackAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._counterattack = self.CandlestickPatterns.counterattack(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._counterattack.is_ready:
                # The current value of self._counterattack is represented by self._counterattack.current.value
                self.plot("Counterattack", "counterattack", self._counterattack.current.value)
                
    

    The following reference table describes the Counterattack method:

    counterattack( symbol, resolution=None, selector=None )

    Creates a new Counterattack pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Counterattack

    Counterattack( symbol, resolution=None, selector=None )

    Creates a new Counterattack pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Counterattack

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Counterattack indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class CounterattackAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Counterattack _counterattack;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _counterattack = new Counterattack();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _counterattack.Update(bar);
            }
       
            if (_counterattack.IsReady)
            {
                // The current value of _counterattack is represented by itself (_counterattack)
                // or _counterattack.Current.Value
                Plot("Counterattack", "counterattack", _counterattack);
                
            }
        }
    }
    class CounterattackAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._counterattack = Counterattack()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._counterattack.update(bar)
            if self._counterattack.is_ready:
                # The current value of self._counterattack is represented by self._counterattack.current.value
                self.plot("Counterattack", "counterattack", self._counterattack.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class CounterattackAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Counterattack _counterattack;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _counterattack = new Counterattack();
            RegisterIndicator(_symbol, _counterattack, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_counterattack.IsReady)
            {
                // The current value of _counterattack is represented by itself (_counterattack)
                // or _counterattack.Current.Value
                Plot("Counterattack", "counterattack", _counterattack);
                
            }
        }
    }
    class CounterattackAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._counterattack = Counterattack()
            self.register_indicator(self._symbol, self._counterattack, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._counterattack.is_ready:
                # The current value of self._counterattack is represented by self._counterattack.current.value
                self.plot("Counterattack", "counterattack", self._counterattack.current.value)
                
    

    The following reference table describes the Counterattack constructor:

    Counterattack

    class QuantConnect.Indicators.CandlestickPatterns.Counterattack [source]

    Counterattack candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Counterattack

    class QuantConnect.Indicators.CandlestickPatterns.Counterattack [source]

    Counterattack candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Dark Cloud Cover

    Introduction

    Create a new Dark Cloud Cover candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using DarkCloudCover Indicator

    To create an automatic indicators for DarkCloudCover , call the DarkCloudCover helper method from the QCAlgorithm class. The DarkCloudCover method creates a DarkCloudCover object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class DarkCloudCoverAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DarkCloudCover _darkcloudcover;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _darkcloudcover = CandlestickPatterns.DarkCloudCover(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_darkcloudcover.IsReady)
            {
                // The current value of _darkcloudcover is represented by itself (_darkcloudcover)
                // or _darkcloudcover.Current.Value
                Plot("DarkCloudCover", "darkcloudcover", _darkcloudcover);
                
            }
        }
    }
    class DarkCloudCoverAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._darkcloudcover = self.CandlestickPatterns.darkcloudcover(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._darkcloudcover.is_ready:
                # The current value of self._darkcloudcover is represented by self._darkcloudcover.current.value
                self.plot("DarkCloudCover", "darkcloudcover", self._darkcloudcover.current.value)
                
    

    The following reference table describes the DarkCloudCover method:

    dark_cloud_cover( symbol, penetration=0.5, resolution=None, selector=None )

    Creates a new DarkCloudCover pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    DarkCloudCover

    DarkCloudCover( symbol, penetration=0.5, resolution=None, selector=None )

    Creates a new DarkCloudCover pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    DarkCloudCover

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a DarkCloudCover indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class DarkCloudCoverAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DarkCloudCover _darkcloudcover;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _darkcloudcover = new DarkCloudCover();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _darkcloudcover.Update(bar);
            }
       
            if (_darkcloudcover.IsReady)
            {
                // The current value of _darkcloudcover is represented by itself (_darkcloudcover)
                // or _darkcloudcover.Current.Value
                Plot("DarkCloudCover", "darkcloudcover", _darkcloudcover);
                
            }
        }
    }
    class DarkCloudCoverAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._darkcloudcover = DarkCloudCover()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._darkcloudcover.update(bar)
            if self._darkcloudcover.is_ready:
                # The current value of self._darkcloudcover is represented by self._darkcloudcover.current.value
                self.plot("DarkCloudCover", "darkcloudcover", self._darkcloudcover.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class DarkCloudCoverAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DarkCloudCover _darkcloudcover;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _darkcloudcover = new DarkCloudCover();
            RegisterIndicator(_symbol, _darkcloudcover, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_darkcloudcover.IsReady)
            {
                // The current value of _darkcloudcover is represented by itself (_darkcloudcover)
                // or _darkcloudcover.Current.Value
                Plot("DarkCloudCover", "darkcloudcover", _darkcloudcover);
                
            }
        }
    }
    class DarkCloudCoverAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._darkcloudcover = DarkCloudCover()
            self.register_indicator(self._symbol, self._darkcloudcover, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._darkcloudcover.is_ready:
                # The current value of self._darkcloudcover is represented by self._darkcloudcover.current.value
                self.plot("DarkCloudCover", "darkcloudcover", self._darkcloudcover.current.value)
                
    

    The following reference table describes the DarkCloudCover constructor:

    DarkCloudCover

    class QuantConnect.Indicators.CandlestickPatterns.DarkCloudCover [source]

    Dark Cloud Cover candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DarkCloudCover

    class QuantConnect.Indicators.CandlestickPatterns.DarkCloudCover [source]

    Dark Cloud Cover candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Doji

    Introduction

    Create a new Doji candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Doji Indicator

    To create an automatic indicators for Doji , call the Doji helper method from the QCAlgorithm class. The Doji method creates a Doji object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class DojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Doji _doji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _doji = CandlestickPatterns.Doji(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_doji.IsReady)
            {
                // The current value of _doji is represented by itself (_doji)
                // or _doji.Current.Value
                Plot("Doji", "doji", _doji);
                
            }
        }
    }
    class DojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._doji = self.CandlestickPatterns.doji(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._doji.is_ready:
                # The current value of self._doji is represented by self._doji.current.value
                self.plot("Doji", "doji", self._doji.current.value)
                
    

    The following reference table describes the Doji method:

    doji( symbol, resolution=None, selector=None )

    Creates a new Doji pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Doji

    Doji( symbol, resolution=None, selector=None )

    Creates a new Doji pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Doji

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Doji indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class DojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Doji _doji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _doji = new Doji();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _doji.Update(bar);
            }
       
            if (_doji.IsReady)
            {
                // The current value of _doji is represented by itself (_doji)
                // or _doji.Current.Value
                Plot("Doji", "doji", _doji);
                
            }
        }
    }
    class DojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._doji = Doji()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._doji.update(bar)
            if self._doji.is_ready:
                # The current value of self._doji is represented by self._doji.current.value
                self.plot("Doji", "doji", self._doji.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class DojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Doji _doji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _doji = new Doji();
            RegisterIndicator(_symbol, _doji, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_doji.IsReady)
            {
                // The current value of _doji is represented by itself (_doji)
                // or _doji.Current.Value
                Plot("Doji", "doji", _doji);
                
            }
        }
    }
    class DojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._doji = Doji()
            self.register_indicator(self._symbol, self._doji, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._doji.is_ready:
                # The current value of self._doji is represented by self._doji.current.value
                self.plot("Doji", "doji", self._doji.current.value)
                
    

    The following reference table describes the Doji constructor:

    Doji

    class QuantConnect.Indicators.CandlestickPatterns.Doji [source]

    Doji candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Doji

    class QuantConnect.Indicators.CandlestickPatterns.Doji [source]

    Doji candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Doji Star

    Introduction

    Create a new Doji Star candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using DojiStar Indicator

    To create an automatic indicators for DojiStar , call the DojiStar helper method from the QCAlgorithm class. The DojiStar method creates a DojiStar object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class DojiStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DojiStar _dojistar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dojistar = CandlestickPatterns.DojiStar(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_dojistar.IsReady)
            {
                // The current value of _dojistar is represented by itself (_dojistar)
                // or _dojistar.Current.Value
                Plot("DojiStar", "dojistar", _dojistar);
                
            }
        }
    }
    class DojiStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dojistar = self.CandlestickPatterns.dojistar(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._dojistar.is_ready:
                # The current value of self._dojistar is represented by self._dojistar.current.value
                self.plot("DojiStar", "dojistar", self._dojistar.current.value)
                
    

    The following reference table describes the DojiStar method:

    doji_star( symbol, resolution=None, selector=None )

    Creates a new DojiStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    DojiStar

    DojiStar( symbol, resolution=None, selector=None )

    Creates a new DojiStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    DojiStar

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a DojiStar indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class DojiStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DojiStar _dojistar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dojistar = new DojiStar();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _dojistar.Update(bar);
            }
       
            if (_dojistar.IsReady)
            {
                // The current value of _dojistar is represented by itself (_dojistar)
                // or _dojistar.Current.Value
                Plot("DojiStar", "dojistar", _dojistar);
                
            }
        }
    }
    class DojiStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dojistar = DojiStar()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._dojistar.update(bar)
            if self._dojistar.is_ready:
                # The current value of self._dojistar is represented by self._dojistar.current.value
                self.plot("DojiStar", "dojistar", self._dojistar.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class DojiStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DojiStar _dojistar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dojistar = new DojiStar();
            RegisterIndicator(_symbol, _dojistar, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_dojistar.IsReady)
            {
                // The current value of _dojistar is represented by itself (_dojistar)
                // or _dojistar.Current.Value
                Plot("DojiStar", "dojistar", _dojistar);
                
            }
        }
    }
    class DojiStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dojistar = DojiStar()
            self.register_indicator(self._symbol, self._dojistar, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._dojistar.is_ready:
                # The current value of self._dojistar is represented by self._dojistar.current.value
                self.plot("DojiStar", "dojistar", self._dojistar.current.value)
                
    

    The following reference table describes the DojiStar constructor:

    DojiStar

    class QuantConnect.Indicators.CandlestickPatterns.DojiStar [source]

    Doji Star candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DojiStar

    class QuantConnect.Indicators.CandlestickPatterns.DojiStar [source]

    Doji Star candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Dragonfly Doji

    Introduction

    Create a new Dragonfly Doji candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using DragonflyDoji Indicator

    To create an automatic indicators for DragonflyDoji , call the DragonflyDoji helper method from the QCAlgorithm class. The DragonflyDoji method creates a DragonflyDoji object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class DragonflyDojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DragonflyDoji _dragonflydoji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dragonflydoji = CandlestickPatterns.DragonflyDoji(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_dragonflydoji.IsReady)
            {
                // The current value of _dragonflydoji is represented by itself (_dragonflydoji)
                // or _dragonflydoji.Current.Value
                Plot("DragonflyDoji", "dragonflydoji", _dragonflydoji);
                
            }
        }
    }
    class DragonflyDojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dragonflydoji = self.CandlestickPatterns.dragonflydoji(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._dragonflydoji.is_ready:
                # The current value of self._dragonflydoji is represented by self._dragonflydoji.current.value
                self.plot("DragonflyDoji", "dragonflydoji", self._dragonflydoji.current.value)
                
    

    The following reference table describes the DragonflyDoji method:

    dragonfly_doji( symbol, resolution=None, selector=None )

    Creates a new DragonflyDoji pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    DragonflyDoji

    DragonflyDoji( symbol, resolution=None, selector=None )

    Creates a new DragonflyDoji pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    DragonflyDoji

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a DragonflyDoji indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class DragonflyDojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DragonflyDoji _dragonflydoji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dragonflydoji = new DragonflyDoji();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _dragonflydoji.Update(bar);
            }
       
            if (_dragonflydoji.IsReady)
            {
                // The current value of _dragonflydoji is represented by itself (_dragonflydoji)
                // or _dragonflydoji.Current.Value
                Plot("DragonflyDoji", "dragonflydoji", _dragonflydoji);
                
            }
        }
    }
    class DragonflyDojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dragonflydoji = DragonflyDoji()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._dragonflydoji.update(bar)
            if self._dragonflydoji.is_ready:
                # The current value of self._dragonflydoji is represented by self._dragonflydoji.current.value
                self.plot("DragonflyDoji", "dragonflydoji", self._dragonflydoji.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class DragonflyDojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DragonflyDoji _dragonflydoji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dragonflydoji = new DragonflyDoji();
            RegisterIndicator(_symbol, _dragonflydoji, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_dragonflydoji.IsReady)
            {
                // The current value of _dragonflydoji is represented by itself (_dragonflydoji)
                // or _dragonflydoji.Current.Value
                Plot("DragonflyDoji", "dragonflydoji", _dragonflydoji);
                
            }
        }
    }
    class DragonflyDojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dragonflydoji = DragonflyDoji()
            self.register_indicator(self._symbol, self._dragonflydoji, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._dragonflydoji.is_ready:
                # The current value of self._dragonflydoji is represented by self._dragonflydoji.current.value
                self.plot("DragonflyDoji", "dragonflydoji", self._dragonflydoji.current.value)
                
    

    The following reference table describes the DragonflyDoji constructor:

    DragonflyDoji

    class QuantConnect.Indicators.CandlestickPatterns.DragonflyDoji [source]

    Dragonfly Doji candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DragonflyDoji

    class QuantConnect.Indicators.CandlestickPatterns.DragonflyDoji [source]

    Dragonfly Doji candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Engulfing

    Introduction

    Create a new Engulfing candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Engulfing Indicator

    To create an automatic indicators for Engulfing , call the Engulfing helper method from the QCAlgorithm class. The Engulfing method creates a Engulfing object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class EngulfingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Engulfing _engulfing;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _engulfing = CandlestickPatterns.Engulfing(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_engulfing.IsReady)
            {
                // The current value of _engulfing is represented by itself (_engulfing)
                // or _engulfing.Current.Value
                Plot("Engulfing", "engulfing", _engulfing);
                
            }
        }
    }
    class EngulfingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._engulfing = self.CandlestickPatterns.engulfing(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._engulfing.is_ready:
                # The current value of self._engulfing is represented by self._engulfing.current.value
                self.plot("Engulfing", "engulfing", self._engulfing.current.value)
                
    

    The following reference table describes the Engulfing method:

    engulfing( symbol, resolution=None, selector=None )

    Creates a new Engulfing pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Engulfing

    Engulfing( symbol, resolution=None, selector=None )

    Creates a new Engulfing pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Engulfing

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Engulfing indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class EngulfingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Engulfing _engulfing;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _engulfing = new Engulfing();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _engulfing.Update(bar);
            }
       
            if (_engulfing.IsReady)
            {
                // The current value of _engulfing is represented by itself (_engulfing)
                // or _engulfing.Current.Value
                Plot("Engulfing", "engulfing", _engulfing);
                
            }
        }
    }
    class EngulfingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._engulfing = Engulfing()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._engulfing.update(bar)
            if self._engulfing.is_ready:
                # The current value of self._engulfing is represented by self._engulfing.current.value
                self.plot("Engulfing", "engulfing", self._engulfing.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class EngulfingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Engulfing _engulfing;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _engulfing = new Engulfing();
            RegisterIndicator(_symbol, _engulfing, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_engulfing.IsReady)
            {
                // The current value of _engulfing is represented by itself (_engulfing)
                // or _engulfing.Current.Value
                Plot("Engulfing", "engulfing", _engulfing);
                
            }
        }
    }
    class EngulfingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._engulfing = Engulfing()
            self.register_indicator(self._symbol, self._engulfing, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._engulfing.is_ready:
                # The current value of self._engulfing is represented by self._engulfing.current.value
                self.plot("Engulfing", "engulfing", self._engulfing.current.value)
                
    

    The following reference table describes the Engulfing constructor:

    Engulfing

    class QuantConnect.Indicators.CandlestickPatterns.Engulfing [source]

    Engulfing candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Engulfing

    class QuantConnect.Indicators.CandlestickPatterns.Engulfing [source]

    Engulfing candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Evening Doji Star

    Introduction

    Create a new Evening Doji Star candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using EveningDojiStar Indicator

    To create an automatic indicators for EveningDojiStar , call the EveningDojiStar helper method from the QCAlgorithm class. The EveningDojiStar method creates a EveningDojiStar object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class EveningDojiStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private EveningDojiStar _eveningdojistar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _eveningdojistar = CandlestickPatterns.EveningDojiStar(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_eveningdojistar.IsReady)
            {
                // The current value of _eveningdojistar is represented by itself (_eveningdojistar)
                // or _eveningdojistar.Current.Value
                Plot("EveningDojiStar", "eveningdojistar", _eveningdojistar);
                
            }
        }
    }
    class EveningDojiStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._eveningdojistar = self.CandlestickPatterns.eveningdojistar(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._eveningdojistar.is_ready:
                # The current value of self._eveningdojistar is represented by self._eveningdojistar.current.value
                self.plot("EveningDojiStar", "eveningdojistar", self._eveningdojistar.current.value)
                
    

    The following reference table describes the EveningDojiStar method:

    evening_doji_star( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new EveningDojiStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    EveningDojiStar

    EveningDojiStar( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new EveningDojiStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    EveningDojiStar

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a EveningDojiStar indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class EveningDojiStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private EveningDojiStar _eveningdojistar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _eveningdojistar = new EveningDojiStar();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _eveningdojistar.Update(bar);
            }
       
            if (_eveningdojistar.IsReady)
            {
                // The current value of _eveningdojistar is represented by itself (_eveningdojistar)
                // or _eveningdojistar.Current.Value
                Plot("EveningDojiStar", "eveningdojistar", _eveningdojistar);
                
            }
        }
    }
    class EveningDojiStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._eveningdojistar = EveningDojiStar()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._eveningdojistar.update(bar)
            if self._eveningdojistar.is_ready:
                # The current value of self._eveningdojistar is represented by self._eveningdojistar.current.value
                self.plot("EveningDojiStar", "eveningdojistar", self._eveningdojistar.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class EveningDojiStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private EveningDojiStar _eveningdojistar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _eveningdojistar = new EveningDojiStar();
            RegisterIndicator(_symbol, _eveningdojistar, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_eveningdojistar.IsReady)
            {
                // The current value of _eveningdojistar is represented by itself (_eveningdojistar)
                // or _eveningdojistar.Current.Value
                Plot("EveningDojiStar", "eveningdojistar", _eveningdojistar);
                
            }
        }
    }
    class EveningDojiStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._eveningdojistar = EveningDojiStar()
            self.register_indicator(self._symbol, self._eveningdojistar, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._eveningdojistar.is_ready:
                # The current value of self._eveningdojistar is represented by self._eveningdojistar.current.value
                self.plot("EveningDojiStar", "eveningdojistar", self._eveningdojistar.current.value)
                
    

    The following reference table describes the EveningDojiStar constructor:

    EveningDojiStar

    class QuantConnect.Indicators.CandlestickPatterns.EveningDojiStar [source]

    Evening Doji Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    EveningDojiStar

    class QuantConnect.Indicators.CandlestickPatterns.EveningDojiStar [source]

    Evening Doji Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Evening Star

    Introduction

    Create a new Evening Star candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using EveningStar Indicator

    To create an automatic indicators for EveningStar , call the EveningStar helper method from the QCAlgorithm class. The EveningStar method creates a EveningStar object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class EveningStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private EveningStar _eveningstar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _eveningstar = CandlestickPatterns.EveningStar(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_eveningstar.IsReady)
            {
                // The current value of _eveningstar is represented by itself (_eveningstar)
                // or _eveningstar.Current.Value
                Plot("EveningStar", "eveningstar", _eveningstar);
                
            }
        }
    }
    class EveningStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._eveningstar = self.CandlestickPatterns.eveningstar(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._eveningstar.is_ready:
                # The current value of self._eveningstar is represented by self._eveningstar.current.value
                self.plot("EveningStar", "eveningstar", self._eveningstar.current.value)
                
    

    The following reference table describes the EveningStar method:

    evening_star( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new EveningStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    EveningStar

    EveningStar( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new EveningStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    EveningStar

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a EveningStar indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class EveningStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private EveningStar _eveningstar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _eveningstar = new EveningStar();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _eveningstar.Update(bar);
            }
       
            if (_eveningstar.IsReady)
            {
                // The current value of _eveningstar is represented by itself (_eveningstar)
                // or _eveningstar.Current.Value
                Plot("EveningStar", "eveningstar", _eveningstar);
                
            }
        }
    }
    class EveningStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._eveningstar = EveningStar()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._eveningstar.update(bar)
            if self._eveningstar.is_ready:
                # The current value of self._eveningstar is represented by self._eveningstar.current.value
                self.plot("EveningStar", "eveningstar", self._eveningstar.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class EveningStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private EveningStar _eveningstar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _eveningstar = new EveningStar();
            RegisterIndicator(_symbol, _eveningstar, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_eveningstar.IsReady)
            {
                // The current value of _eveningstar is represented by itself (_eveningstar)
                // or _eveningstar.Current.Value
                Plot("EveningStar", "eveningstar", _eveningstar);
                
            }
        }
    }
    class EveningStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._eveningstar = EveningStar()
            self.register_indicator(self._symbol, self._eveningstar, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._eveningstar.is_ready:
                # The current value of self._eveningstar is represented by self._eveningstar.current.value
                self.plot("EveningStar", "eveningstar", self._eveningstar.current.value)
                
    

    The following reference table describes the EveningStar constructor:

    EveningStar

    class QuantConnect.Indicators.CandlestickPatterns.EveningStar [source]

    Evening Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    EveningStar

    class QuantConnect.Indicators.CandlestickPatterns.EveningStar [source]

    Evening Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Gap Side By Side White

    Introduction

    Create a new Up/Down-gap side-by-side white lines candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using GapSideBySideWhite Indicator

    To create an automatic indicators for GapSideBySideWhite , call the GapSideBySideWhite helper method from the QCAlgorithm class. The GapSideBySideWhite method creates a GapSideBySideWhite object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class GapSideBySideWhiteAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private GapSideBySideWhite _gapsidebysidewhite;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _gapsidebysidewhite = CandlestickPatterns.GapSideBySideWhite(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_gapsidebysidewhite.IsReady)
            {
                // The current value of _gapsidebysidewhite is represented by itself (_gapsidebysidewhite)
                // or _gapsidebysidewhite.Current.Value
                Plot("GapSideBySideWhite", "gapsidebysidewhite", _gapsidebysidewhite);
                
            }
        }
    }
    class GapSideBySideWhiteAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._gapsidebysidewhite = self.CandlestickPatterns.gapsidebysidewhite(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._gapsidebysidewhite.is_ready:
                # The current value of self._gapsidebysidewhite is represented by self._gapsidebysidewhite.current.value
                self.plot("GapSideBySideWhite", "gapsidebysidewhite", self._gapsidebysidewhite.current.value)
                
    

    The following reference table describes the GapSideBySideWhite method:

    gap_side_by_side_white( symbol, resolution=None, selector=None )

    Creates a new GapSideBySideWhite pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    GapSideBySideWhite

    GapSideBySideWhite( symbol, resolution=None, selector=None )

    Creates a new GapSideBySideWhite pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    GapSideBySideWhite

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a GapSideBySideWhite indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class GapSideBySideWhiteAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private GapSideBySideWhite _gapsidebysidewhite;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _gapsidebysidewhite = new GapSideBySideWhite();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _gapsidebysidewhite.Update(bar);
            }
       
            if (_gapsidebysidewhite.IsReady)
            {
                // The current value of _gapsidebysidewhite is represented by itself (_gapsidebysidewhite)
                // or _gapsidebysidewhite.Current.Value
                Plot("GapSideBySideWhite", "gapsidebysidewhite", _gapsidebysidewhite);
                
            }
        }
    }
    class GapSideBySideWhiteAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._gapsidebysidewhite = GapSideBySideWhite()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._gapsidebysidewhite.update(bar)
            if self._gapsidebysidewhite.is_ready:
                # The current value of self._gapsidebysidewhite is represented by self._gapsidebysidewhite.current.value
                self.plot("GapSideBySideWhite", "gapsidebysidewhite", self._gapsidebysidewhite.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class GapSideBySideWhiteAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private GapSideBySideWhite _gapsidebysidewhite;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _gapsidebysidewhite = new GapSideBySideWhite();
            RegisterIndicator(_symbol, _gapsidebysidewhite, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_gapsidebysidewhite.IsReady)
            {
                // The current value of _gapsidebysidewhite is represented by itself (_gapsidebysidewhite)
                // or _gapsidebysidewhite.Current.Value
                Plot("GapSideBySideWhite", "gapsidebysidewhite", _gapsidebysidewhite);
                
            }
        }
    }
    class GapSideBySideWhiteAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._gapsidebysidewhite = GapSideBySideWhite()
            self.register_indicator(self._symbol, self._gapsidebysidewhite, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._gapsidebysidewhite.is_ready:
                # The current value of self._gapsidebysidewhite is represented by self._gapsidebysidewhite.current.value
                self.plot("GapSideBySideWhite", "gapsidebysidewhite", self._gapsidebysidewhite.current.value)
                
    

    The following reference table describes the GapSideBySideWhite constructor:

    GapSideBySideWhite

    class QuantConnect.Indicators.CandlestickPatterns.GapSideBySideWhite [source]

    Up/Down-gap side-by-side white lines candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    GapSideBySideWhite

    class QuantConnect.Indicators.CandlestickPatterns.GapSideBySideWhite [source]

    Up/Down-gap side-by-side white lines candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Gravestone Doji

    Introduction

    Create a new Gravestone Doji candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using GravestoneDoji Indicator

    To create an automatic indicators for GravestoneDoji , call the GravestoneDoji helper method from the QCAlgorithm class. The GravestoneDoji method creates a GravestoneDoji object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class GravestoneDojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private GravestoneDoji _gravestonedoji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _gravestonedoji = CandlestickPatterns.GravestoneDoji(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_gravestonedoji.IsReady)
            {
                // The current value of _gravestonedoji is represented by itself (_gravestonedoji)
                // or _gravestonedoji.Current.Value
                Plot("GravestoneDoji", "gravestonedoji", _gravestonedoji);
                
            }
        }
    }
    class GravestoneDojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._gravestonedoji = self.CandlestickPatterns.gravestonedoji(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._gravestonedoji.is_ready:
                # The current value of self._gravestonedoji is represented by self._gravestonedoji.current.value
                self.plot("GravestoneDoji", "gravestonedoji", self._gravestonedoji.current.value)
                
    

    The following reference table describes the GravestoneDoji method:

    gravestone_doji( symbol, resolution=None, selector=None )

    Creates a new GravestoneDoji pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    GravestoneDoji

    GravestoneDoji( symbol, resolution=None, selector=None )

    Creates a new GravestoneDoji pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    GravestoneDoji

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a GravestoneDoji indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class GravestoneDojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private GravestoneDoji _gravestonedoji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _gravestonedoji = new GravestoneDoji();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _gravestonedoji.Update(bar);
            }
       
            if (_gravestonedoji.IsReady)
            {
                // The current value of _gravestonedoji is represented by itself (_gravestonedoji)
                // or _gravestonedoji.Current.Value
                Plot("GravestoneDoji", "gravestonedoji", _gravestonedoji);
                
            }
        }
    }
    class GravestoneDojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._gravestonedoji = GravestoneDoji()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._gravestonedoji.update(bar)
            if self._gravestonedoji.is_ready:
                # The current value of self._gravestonedoji is represented by self._gravestonedoji.current.value
                self.plot("GravestoneDoji", "gravestonedoji", self._gravestonedoji.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class GravestoneDojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private GravestoneDoji _gravestonedoji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _gravestonedoji = new GravestoneDoji();
            RegisterIndicator(_symbol, _gravestonedoji, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_gravestonedoji.IsReady)
            {
                // The current value of _gravestonedoji is represented by itself (_gravestonedoji)
                // or _gravestonedoji.Current.Value
                Plot("GravestoneDoji", "gravestonedoji", _gravestonedoji);
                
            }
        }
    }
    class GravestoneDojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._gravestonedoji = GravestoneDoji()
            self.register_indicator(self._symbol, self._gravestonedoji, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._gravestonedoji.is_ready:
                # The current value of self._gravestonedoji is represented by self._gravestonedoji.current.value
                self.plot("GravestoneDoji", "gravestonedoji", self._gravestonedoji.current.value)
                
    

    The following reference table describes the GravestoneDoji constructor:

    GravestoneDoji

    class QuantConnect.Indicators.CandlestickPatterns.GravestoneDoji [source]

    Gravestone Doji candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    GravestoneDoji

    class QuantConnect.Indicators.CandlestickPatterns.GravestoneDoji [source]

    Gravestone Doji candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Hammer

    Introduction

    Create a new Hammer candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Hammer Indicator

    To create an automatic indicators for Hammer , call the Hammer helper method from the QCAlgorithm class. The Hammer method creates a Hammer object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HammerAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Hammer _hammer;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hammer = CandlestickPatterns.Hammer(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_hammer.IsReady)
            {
                // The current value of _hammer is represented by itself (_hammer)
                // or _hammer.Current.Value
                Plot("Hammer", "hammer", _hammer);
                
            }
        }
    }
    class HammerAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hammer = self.CandlestickPatterns.hammer(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._hammer.is_ready:
                # The current value of self._hammer is represented by self._hammer.current.value
                self.plot("Hammer", "hammer", self._hammer.current.value)
                
    

    The following reference table describes the Hammer method:

    hammer( symbol, resolution=None, selector=None )

    Creates a new Hammer pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Hammer

    Hammer( symbol, resolution=None, selector=None )

    Creates a new Hammer pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Hammer

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Hammer indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class HammerAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Hammer _hammer;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hammer = new Hammer();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _hammer.Update(bar);
            }
       
            if (_hammer.IsReady)
            {
                // The current value of _hammer is represented by itself (_hammer)
                // or _hammer.Current.Value
                Plot("Hammer", "hammer", _hammer);
                
            }
        }
    }
    class HammerAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hammer = Hammer()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._hammer.update(bar)
            if self._hammer.is_ready:
                # The current value of self._hammer is represented by self._hammer.current.value
                self.plot("Hammer", "hammer", self._hammer.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HammerAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Hammer _hammer;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hammer = new Hammer();
            RegisterIndicator(_symbol, _hammer, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_hammer.IsReady)
            {
                // The current value of _hammer is represented by itself (_hammer)
                // or _hammer.Current.Value
                Plot("Hammer", "hammer", _hammer);
                
            }
        }
    }
    class HammerAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hammer = Hammer()
            self.register_indicator(self._symbol, self._hammer, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._hammer.is_ready:
                # The current value of self._hammer is represented by self._hammer.current.value
                self.plot("Hammer", "hammer", self._hammer.current.value)
                
    

    The following reference table describes the Hammer constructor:

    Hammer

    class QuantConnect.Indicators.CandlestickPatterns.Hammer [source]

    Hammer candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Hammer

    class QuantConnect.Indicators.CandlestickPatterns.Hammer [source]

    Hammer candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Hanging Man

    Introduction

    Create a new Hanging Man candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using HangingMan Indicator

    To create an automatic indicators for HangingMan , call the HangingMan helper method from the QCAlgorithm class. The HangingMan method creates a HangingMan object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HangingManAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HangingMan _hangingman;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hangingman = CandlestickPatterns.HangingMan(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_hangingman.IsReady)
            {
                // The current value of _hangingman is represented by itself (_hangingman)
                // or _hangingman.Current.Value
                Plot("HangingMan", "hangingman", _hangingman);
                
            }
        }
    }
    class HangingManAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hangingman = self.CandlestickPatterns.hangingman(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._hangingman.is_ready:
                # The current value of self._hangingman is represented by self._hangingman.current.value
                self.plot("HangingMan", "hangingman", self._hangingman.current.value)
                
    

    The following reference table describes the HangingMan method:

    hanging_man( symbol, resolution=None, selector=None )

    Creates a new HangingMan pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HangingMan

    HangingMan( symbol, resolution=None, selector=None )

    Creates a new HangingMan pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HangingMan

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a HangingMan indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class HangingManAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HangingMan _hangingman;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hangingman = new HangingMan();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _hangingman.Update(bar);
            }
       
            if (_hangingman.IsReady)
            {
                // The current value of _hangingman is represented by itself (_hangingman)
                // or _hangingman.Current.Value
                Plot("HangingMan", "hangingman", _hangingman);
                
            }
        }
    }
    class HangingManAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hangingman = HangingMan()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._hangingman.update(bar)
            if self._hangingman.is_ready:
                # The current value of self._hangingman is represented by self._hangingman.current.value
                self.plot("HangingMan", "hangingman", self._hangingman.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HangingManAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HangingMan _hangingman;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hangingman = new HangingMan();
            RegisterIndicator(_symbol, _hangingman, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_hangingman.IsReady)
            {
                // The current value of _hangingman is represented by itself (_hangingman)
                // or _hangingman.Current.Value
                Plot("HangingMan", "hangingman", _hangingman);
                
            }
        }
    }
    class HangingManAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hangingman = HangingMan()
            self.register_indicator(self._symbol, self._hangingman, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._hangingman.is_ready:
                # The current value of self._hangingman is represented by self._hangingman.current.value
                self.plot("HangingMan", "hangingman", self._hangingman.current.value)
                
    

    The following reference table describes the HangingMan constructor:

    HangingMan

    class QuantConnect.Indicators.CandlestickPatterns.HangingMan [source]

    Hanging Man candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HangingMan

    class QuantConnect.Indicators.CandlestickPatterns.HangingMan [source]

    Hanging Man candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Harami

    Introduction

    Create a new Harami candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Harami Indicator

    To create an automatic indicators for Harami , call the Harami helper method from the QCAlgorithm class. The Harami method creates a Harami object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HaramiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Harami _harami;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _harami = CandlestickPatterns.Harami(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_harami.IsReady)
            {
                // The current value of _harami is represented by itself (_harami)
                // or _harami.Current.Value
                Plot("Harami", "harami", _harami);
                
            }
        }
    }
    class HaramiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._harami = self.CandlestickPatterns.harami(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._harami.is_ready:
                # The current value of self._harami is represented by self._harami.current.value
                self.plot("Harami", "harami", self._harami.current.value)
                
    

    The following reference table describes the Harami method:

    harami( symbol, resolution=None, selector=None )

    Creates a new Harami pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Harami

    Harami( symbol, resolution=None, selector=None )

    Creates a new Harami pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Harami

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Harami indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class HaramiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Harami _harami;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _harami = new Harami();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _harami.Update(bar);
            }
       
            if (_harami.IsReady)
            {
                // The current value of _harami is represented by itself (_harami)
                // or _harami.Current.Value
                Plot("Harami", "harami", _harami);
                
            }
        }
    }
    class HaramiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._harami = Harami()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._harami.update(bar)
            if self._harami.is_ready:
                # The current value of self._harami is represented by self._harami.current.value
                self.plot("Harami", "harami", self._harami.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HaramiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Harami _harami;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _harami = new Harami();
            RegisterIndicator(_symbol, _harami, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_harami.IsReady)
            {
                // The current value of _harami is represented by itself (_harami)
                // or _harami.Current.Value
                Plot("Harami", "harami", _harami);
                
            }
        }
    }
    class HaramiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._harami = Harami()
            self.register_indicator(self._symbol, self._harami, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._harami.is_ready:
                # The current value of self._harami is represented by self._harami.current.value
                self.plot("Harami", "harami", self._harami.current.value)
                
    

    The following reference table describes the Harami constructor:

    Harami

    class QuantConnect.Indicators.CandlestickPatterns.Harami [source]

    Harami candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Harami

    class QuantConnect.Indicators.CandlestickPatterns.Harami [source]

    Harami candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Harami Cross

    Introduction

    Create a new Harami Cross candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using HaramiCross Indicator

    To create an automatic indicators for HaramiCross , call the HaramiCross helper method from the QCAlgorithm class. The HaramiCross method creates a HaramiCross object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HaramiCrossAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HaramiCross _haramicross;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _haramicross = CandlestickPatterns.HaramiCross(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_haramicross.IsReady)
            {
                // The current value of _haramicross is represented by itself (_haramicross)
                // or _haramicross.Current.Value
                Plot("HaramiCross", "haramicross", _haramicross);
                
            }
        }
    }
    class HaramiCrossAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._haramicross = self.CandlestickPatterns.haramicross(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._haramicross.is_ready:
                # The current value of self._haramicross is represented by self._haramicross.current.value
                self.plot("HaramiCross", "haramicross", self._haramicross.current.value)
                
    

    The following reference table describes the HaramiCross method:

    harami_cross( symbol, resolution=None, selector=None )

    Creates a new HaramiCross pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HaramiCross

    HaramiCross( symbol, resolution=None, selector=None )

    Creates a new HaramiCross pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HaramiCross

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a HaramiCross indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class HaramiCrossAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HaramiCross _haramicross;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _haramicross = new HaramiCross();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _haramicross.Update(bar);
            }
       
            if (_haramicross.IsReady)
            {
                // The current value of _haramicross is represented by itself (_haramicross)
                // or _haramicross.Current.Value
                Plot("HaramiCross", "haramicross", _haramicross);
                
            }
        }
    }
    class HaramiCrossAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._haramicross = HaramiCross()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._haramicross.update(bar)
            if self._haramicross.is_ready:
                # The current value of self._haramicross is represented by self._haramicross.current.value
                self.plot("HaramiCross", "haramicross", self._haramicross.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HaramiCrossAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HaramiCross _haramicross;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _haramicross = new HaramiCross();
            RegisterIndicator(_symbol, _haramicross, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_haramicross.IsReady)
            {
                // The current value of _haramicross is represented by itself (_haramicross)
                // or _haramicross.Current.Value
                Plot("HaramiCross", "haramicross", _haramicross);
                
            }
        }
    }
    class HaramiCrossAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._haramicross = HaramiCross()
            self.register_indicator(self._symbol, self._haramicross, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._haramicross.is_ready:
                # The current value of self._haramicross is represented by self._haramicross.current.value
                self.plot("HaramiCross", "haramicross", self._haramicross.current.value)
                
    

    The following reference table describes the HaramiCross constructor:

    HaramiCross

    class QuantConnect.Indicators.CandlestickPatterns.HaramiCross [source]

    Harami Cross candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HaramiCross

    class QuantConnect.Indicators.CandlestickPatterns.HaramiCross [source]

    Harami Cross candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    High Wave Candle

    Introduction

    Create a new High-Wave Candle candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using HighWaveCandle Indicator

    To create an automatic indicators for HighWaveCandle , call the HighWaveCandle helper method from the QCAlgorithm class. The HighWaveCandle method creates a HighWaveCandle object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HighWaveCandleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HighWaveCandle _highwavecandle;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _highwavecandle = CandlestickPatterns.HighWaveCandle(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_highwavecandle.IsReady)
            {
                // The current value of _highwavecandle is represented by itself (_highwavecandle)
                // or _highwavecandle.Current.Value
                Plot("HighWaveCandle", "highwavecandle", _highwavecandle);
                
            }
        }
    }
    class HighWaveCandleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._highwavecandle = self.CandlestickPatterns.highwavecandle(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._highwavecandle.is_ready:
                # The current value of self._highwavecandle is represented by self._highwavecandle.current.value
                self.plot("HighWaveCandle", "highwavecandle", self._highwavecandle.current.value)
                
    

    The following reference table describes the HighWaveCandle method:

    high_wave_candle( symbol, resolution=None, selector=None )

    Creates a new HighWaveCandle pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HighWaveCandle

    HighWaveCandle( symbol, resolution=None, selector=None )

    Creates a new HighWaveCandle pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HighWaveCandle

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a HighWaveCandle indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class HighWaveCandleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HighWaveCandle _highwavecandle;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _highwavecandle = new HighWaveCandle();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _highwavecandle.Update(bar);
            }
       
            if (_highwavecandle.IsReady)
            {
                // The current value of _highwavecandle is represented by itself (_highwavecandle)
                // or _highwavecandle.Current.Value
                Plot("HighWaveCandle", "highwavecandle", _highwavecandle);
                
            }
        }
    }
    class HighWaveCandleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._highwavecandle = HighWaveCandle()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._highwavecandle.update(bar)
            if self._highwavecandle.is_ready:
                # The current value of self._highwavecandle is represented by self._highwavecandle.current.value
                self.plot("HighWaveCandle", "highwavecandle", self._highwavecandle.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HighWaveCandleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HighWaveCandle _highwavecandle;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _highwavecandle = new HighWaveCandle();
            RegisterIndicator(_symbol, _highwavecandle, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_highwavecandle.IsReady)
            {
                // The current value of _highwavecandle is represented by itself (_highwavecandle)
                // or _highwavecandle.Current.Value
                Plot("HighWaveCandle", "highwavecandle", _highwavecandle);
                
            }
        }
    }
    class HighWaveCandleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._highwavecandle = HighWaveCandle()
            self.register_indicator(self._symbol, self._highwavecandle, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._highwavecandle.is_ready:
                # The current value of self._highwavecandle is represented by self._highwavecandle.current.value
                self.plot("HighWaveCandle", "highwavecandle", self._highwavecandle.current.value)
                
    

    The following reference table describes the HighWaveCandle constructor:

    HighWaveCandle

    class QuantConnect.Indicators.CandlestickPatterns.HighWaveCandle [source]

    High-Wave Candle candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HighWaveCandle

    class QuantConnect.Indicators.CandlestickPatterns.HighWaveCandle [source]

    High-Wave Candle candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Hikkake

    Introduction

    Create a new Hikkake candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Hikkake Indicator

    To create an automatic indicators for Hikkake , call the Hikkake helper method from the QCAlgorithm class. The Hikkake method creates a Hikkake object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HikkakeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Hikkake _hikkake;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hikkake = CandlestickPatterns.Hikkake(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_hikkake.IsReady)
            {
                // The current value of _hikkake is represented by itself (_hikkake)
                // or _hikkake.Current.Value
                Plot("Hikkake", "hikkake", _hikkake);
                
            }
        }
    }
    class HikkakeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hikkake = self.CandlestickPatterns.hikkake(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._hikkake.is_ready:
                # The current value of self._hikkake is represented by self._hikkake.current.value
                self.plot("Hikkake", "hikkake", self._hikkake.current.value)
                
    

    The following reference table describes the Hikkake method:

    hikkake( symbol, resolution=None, selector=None )

    Creates a new Hikkake pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Hikkake

    Hikkake( symbol, resolution=None, selector=None )

    Creates a new Hikkake pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Hikkake

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Hikkake indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class HikkakeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Hikkake _hikkake;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hikkake = new Hikkake();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _hikkake.Update(bar);
            }
       
            if (_hikkake.IsReady)
            {
                // The current value of _hikkake is represented by itself (_hikkake)
                // or _hikkake.Current.Value
                Plot("Hikkake", "hikkake", _hikkake);
                
            }
        }
    }
    class HikkakeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hikkake = Hikkake()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._hikkake.update(bar)
            if self._hikkake.is_ready:
                # The current value of self._hikkake is represented by self._hikkake.current.value
                self.plot("Hikkake", "hikkake", self._hikkake.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HikkakeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Hikkake _hikkake;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hikkake = new Hikkake();
            RegisterIndicator(_symbol, _hikkake, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_hikkake.IsReady)
            {
                // The current value of _hikkake is represented by itself (_hikkake)
                // or _hikkake.Current.Value
                Plot("Hikkake", "hikkake", _hikkake);
                
            }
        }
    }
    class HikkakeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hikkake = Hikkake()
            self.register_indicator(self._symbol, self._hikkake, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._hikkake.is_ready:
                # The current value of self._hikkake is represented by self._hikkake.current.value
                self.plot("Hikkake", "hikkake", self._hikkake.current.value)
                
    

    The following reference table describes the Hikkake constructor:

    Hikkake

    class QuantConnect.Indicators.CandlestickPatterns.Hikkake [source]

    Hikkake candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Hikkake

    class QuantConnect.Indicators.CandlestickPatterns.Hikkake [source]

    Hikkake candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Hikkake Modified

    Introduction

    Create a new Hikkake Modified candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using HikkakeModified Indicator

    To create an automatic indicators for HikkakeModified , call the HikkakeModified helper method from the QCAlgorithm class. The HikkakeModified method creates a HikkakeModified object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HikkakeModifiedAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HikkakeModified _hikkakemodified;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hikkakemodified = CandlestickPatterns.HikkakeModified(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_hikkakemodified.IsReady)
            {
                // The current value of _hikkakemodified is represented by itself (_hikkakemodified)
                // or _hikkakemodified.Current.Value
                Plot("HikkakeModified", "hikkakemodified", _hikkakemodified);
                
            }
        }
    }
    class HikkakeModifiedAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hikkakemodified = self.CandlestickPatterns.hikkakemodified(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._hikkakemodified.is_ready:
                # The current value of self._hikkakemodified is represented by self._hikkakemodified.current.value
                self.plot("HikkakeModified", "hikkakemodified", self._hikkakemodified.current.value)
                
    

    The following reference table describes the HikkakeModified method:

    hikkake_modified( symbol, resolution=None, selector=None )

    Creates a new HikkakeModified pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HikkakeModified

    HikkakeModified( symbol, resolution=None, selector=None )

    Creates a new HikkakeModified pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HikkakeModified

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a HikkakeModified indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class HikkakeModifiedAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HikkakeModified _hikkakemodified;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hikkakemodified = new HikkakeModified();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _hikkakemodified.Update(bar);
            }
       
            if (_hikkakemodified.IsReady)
            {
                // The current value of _hikkakemodified is represented by itself (_hikkakemodified)
                // or _hikkakemodified.Current.Value
                Plot("HikkakeModified", "hikkakemodified", _hikkakemodified);
                
            }
        }
    }
    class HikkakeModifiedAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hikkakemodified = HikkakeModified()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._hikkakemodified.update(bar)
            if self._hikkakemodified.is_ready:
                # The current value of self._hikkakemodified is represented by self._hikkakemodified.current.value
                self.plot("HikkakeModified", "hikkakemodified", self._hikkakemodified.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HikkakeModifiedAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HikkakeModified _hikkakemodified;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hikkakemodified = new HikkakeModified();
            RegisterIndicator(_symbol, _hikkakemodified, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_hikkakemodified.IsReady)
            {
                // The current value of _hikkakemodified is represented by itself (_hikkakemodified)
                // or _hikkakemodified.Current.Value
                Plot("HikkakeModified", "hikkakemodified", _hikkakemodified);
                
            }
        }
    }
    class HikkakeModifiedAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hikkakemodified = HikkakeModified()
            self.register_indicator(self._symbol, self._hikkakemodified, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._hikkakemodified.is_ready:
                # The current value of self._hikkakemodified is represented by self._hikkakemodified.current.value
                self.plot("HikkakeModified", "hikkakemodified", self._hikkakemodified.current.value)
                
    

    The following reference table describes the HikkakeModified constructor:

    HikkakeModified

    class QuantConnect.Indicators.CandlestickPatterns.HikkakeModified [source]

    Hikkake Modified candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HikkakeModified

    class QuantConnect.Indicators.CandlestickPatterns.HikkakeModified [source]

    Hikkake Modified candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Homing Pigeon

    Introduction

    Create a new Homing Pigeon candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using HomingPigeon Indicator

    To create an automatic indicators for HomingPigeon , call the HomingPigeon helper method from the QCAlgorithm class. The HomingPigeon method creates a HomingPigeon object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HomingPigeonAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HomingPigeon _homingpigeon;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _homingpigeon = CandlestickPatterns.HomingPigeon(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_homingpigeon.IsReady)
            {
                // The current value of _homingpigeon is represented by itself (_homingpigeon)
                // or _homingpigeon.Current.Value
                Plot("HomingPigeon", "homingpigeon", _homingpigeon);
                
            }
        }
    }
    class HomingPigeonAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._homingpigeon = self.CandlestickPatterns.homingpigeon(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._homingpigeon.is_ready:
                # The current value of self._homingpigeon is represented by self._homingpigeon.current.value
                self.plot("HomingPigeon", "homingpigeon", self._homingpigeon.current.value)
                
    

    The following reference table describes the HomingPigeon method:

    homing_pigeon( symbol, resolution=None, selector=None )

    Creates a new HomingPigeon pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HomingPigeon

    HomingPigeon( symbol, resolution=None, selector=None )

    Creates a new HomingPigeon pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    HomingPigeon

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a HomingPigeon indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class HomingPigeonAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HomingPigeon _homingpigeon;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _homingpigeon = new HomingPigeon();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _homingpigeon.Update(bar);
            }
       
            if (_homingpigeon.IsReady)
            {
                // The current value of _homingpigeon is represented by itself (_homingpigeon)
                // or _homingpigeon.Current.Value
                Plot("HomingPigeon", "homingpigeon", _homingpigeon);
                
            }
        }
    }
    class HomingPigeonAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._homingpigeon = HomingPigeon()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._homingpigeon.update(bar)
            if self._homingpigeon.is_ready:
                # The current value of self._homingpigeon is represented by self._homingpigeon.current.value
                self.plot("HomingPigeon", "homingpigeon", self._homingpigeon.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HomingPigeonAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HomingPigeon _homingpigeon;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _homingpigeon = new HomingPigeon();
            RegisterIndicator(_symbol, _homingpigeon, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_homingpigeon.IsReady)
            {
                // The current value of _homingpigeon is represented by itself (_homingpigeon)
                // or _homingpigeon.Current.Value
                Plot("HomingPigeon", "homingpigeon", _homingpigeon);
                
            }
        }
    }
    class HomingPigeonAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._homingpigeon = HomingPigeon()
            self.register_indicator(self._symbol, self._homingpigeon, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._homingpigeon.is_ready:
                # The current value of self._homingpigeon is represented by self._homingpigeon.current.value
                self.plot("HomingPigeon", "homingpigeon", self._homingpigeon.current.value)
                
    

    The following reference table describes the HomingPigeon constructor:

    HomingPigeon

    class QuantConnect.Indicators.CandlestickPatterns.HomingPigeon [source]

    Homing Pigeon candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HomingPigeon

    class QuantConnect.Indicators.CandlestickPatterns.HomingPigeon [source]

    Homing Pigeon candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Identical Three Crows

    Introduction

    Create a new Identical Three Crows candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using IdenticalThreeCrows Indicator

    To create an automatic indicators for IdenticalThreeCrows , call the IdenticalThreeCrows helper method from the QCAlgorithm class. The IdenticalThreeCrows method creates a IdenticalThreeCrows object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class IdenticalThreeCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private IdenticalThreeCrows _identicalthreecrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _identicalthreecrows = CandlestickPatterns.IdenticalThreeCrows(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_identicalthreecrows.IsReady)
            {
                // The current value of _identicalthreecrows is represented by itself (_identicalthreecrows)
                // or _identicalthreecrows.Current.Value
                Plot("IdenticalThreeCrows", "identicalthreecrows", _identicalthreecrows);
                
            }
        }
    }
    class IdenticalThreeCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._identicalthreecrows = self.CandlestickPatterns.identicalthreecrows(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._identicalthreecrows.is_ready:
                # The current value of self._identicalthreecrows is represented by self._identicalthreecrows.current.value
                self.plot("IdenticalThreeCrows", "identicalthreecrows", self._identicalthreecrows.current.value)
                
    

    The following reference table describes the IdenticalThreeCrows method:

    identical_three_crows( symbol, resolution=None, selector=None )

    Creates a new IdenticalThreeCrows pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    IdenticalThreeCrows

    IdenticalThreeCrows( symbol, resolution=None, selector=None )

    Creates a new IdenticalThreeCrows pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    IdenticalThreeCrows

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a IdenticalThreeCrows indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class IdenticalThreeCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private IdenticalThreeCrows _identicalthreecrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _identicalthreecrows = new IdenticalThreeCrows();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _identicalthreecrows.Update(bar);
            }
       
            if (_identicalthreecrows.IsReady)
            {
                // The current value of _identicalthreecrows is represented by itself (_identicalthreecrows)
                // or _identicalthreecrows.Current.Value
                Plot("IdenticalThreeCrows", "identicalthreecrows", _identicalthreecrows);
                
            }
        }
    }
    class IdenticalThreeCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._identicalthreecrows = IdenticalThreeCrows()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._identicalthreecrows.update(bar)
            if self._identicalthreecrows.is_ready:
                # The current value of self._identicalthreecrows is represented by self._identicalthreecrows.current.value
                self.plot("IdenticalThreeCrows", "identicalthreecrows", self._identicalthreecrows.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class IdenticalThreeCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private IdenticalThreeCrows _identicalthreecrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _identicalthreecrows = new IdenticalThreeCrows();
            RegisterIndicator(_symbol, _identicalthreecrows, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_identicalthreecrows.IsReady)
            {
                // The current value of _identicalthreecrows is represented by itself (_identicalthreecrows)
                // or _identicalthreecrows.Current.Value
                Plot("IdenticalThreeCrows", "identicalthreecrows", _identicalthreecrows);
                
            }
        }
    }
    class IdenticalThreeCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._identicalthreecrows = IdenticalThreeCrows()
            self.register_indicator(self._symbol, self._identicalthreecrows, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._identicalthreecrows.is_ready:
                # The current value of self._identicalthreecrows is represented by self._identicalthreecrows.current.value
                self.plot("IdenticalThreeCrows", "identicalthreecrows", self._identicalthreecrows.current.value)
                
    

    The following reference table describes the IdenticalThreeCrows constructor:

    IdenticalThreeCrows

    class QuantConnect.Indicators.CandlestickPatterns.IdenticalThreeCrows [source]

    Identical Three Crows candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    IdenticalThreeCrows

    class QuantConnect.Indicators.CandlestickPatterns.IdenticalThreeCrows [source]

    Identical Three Crows candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    In Neck

    Introduction

    Create a new In-Neck candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using InNeck Indicator

    To create an automatic indicators for InNeck , call the InNeck helper method from the QCAlgorithm class. The InNeck method creates a InNeck object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class InNeckAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private InNeck _inneck;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _inneck = CandlestickPatterns.InNeck(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_inneck.IsReady)
            {
                // The current value of _inneck is represented by itself (_inneck)
                // or _inneck.Current.Value
                Plot("InNeck", "inneck", _inneck);
                
            }
        }
    }
    class InNeckAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._inneck = self.CandlestickPatterns.inneck(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._inneck.is_ready:
                # The current value of self._inneck is represented by self._inneck.current.value
                self.plot("InNeck", "inneck", self._inneck.current.value)
                
    

    The following reference table describes the InNeck method:

    in_neck( symbol, resolution=None, selector=None )

    Creates a new InNeck pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    InNeck

    InNeck( symbol, resolution=None, selector=None )

    Creates a new InNeck pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    InNeck

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a InNeck indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class InNeckAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private InNeck _inneck;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _inneck = new InNeck();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _inneck.Update(bar);
            }
       
            if (_inneck.IsReady)
            {
                // The current value of _inneck is represented by itself (_inneck)
                // or _inneck.Current.Value
                Plot("InNeck", "inneck", _inneck);
                
            }
        }
    }
    class InNeckAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._inneck = InNeck()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._inneck.update(bar)
            if self._inneck.is_ready:
                # The current value of self._inneck is represented by self._inneck.current.value
                self.plot("InNeck", "inneck", self._inneck.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class InNeckAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private InNeck _inneck;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _inneck = new InNeck();
            RegisterIndicator(_symbol, _inneck, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_inneck.IsReady)
            {
                // The current value of _inneck is represented by itself (_inneck)
                // or _inneck.Current.Value
                Plot("InNeck", "inneck", _inneck);
                
            }
        }
    }
    class InNeckAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._inneck = InNeck()
            self.register_indicator(self._symbol, self._inneck, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._inneck.is_ready:
                # The current value of self._inneck is represented by self._inneck.current.value
                self.plot("InNeck", "inneck", self._inneck.current.value)
                
    

    The following reference table describes the InNeck constructor:

    InNeck

    class QuantConnect.Indicators.CandlestickPatterns.InNeck [source]

    In-Neck candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    InNeck

    class QuantConnect.Indicators.CandlestickPatterns.InNeck [source]

    In-Neck candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Inverted Hammer

    Introduction

    Create a new Inverted Hammer candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using InvertedHammer Indicator

    To create an automatic indicators for InvertedHammer , call the InvertedHammer helper method from the QCAlgorithm class. The InvertedHammer method creates a InvertedHammer object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class InvertedHammerAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private InvertedHammer _invertedhammer;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _invertedhammer = CandlestickPatterns.InvertedHammer(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_invertedhammer.IsReady)
            {
                // The current value of _invertedhammer is represented by itself (_invertedhammer)
                // or _invertedhammer.Current.Value
                Plot("InvertedHammer", "invertedhammer", _invertedhammer);
                
            }
        }
    }
    class InvertedHammerAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._invertedhammer = self.CandlestickPatterns.invertedhammer(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._invertedhammer.is_ready:
                # The current value of self._invertedhammer is represented by self._invertedhammer.current.value
                self.plot("InvertedHammer", "invertedhammer", self._invertedhammer.current.value)
                
    

    The following reference table describes the InvertedHammer method:

    inverted_hammer( symbol, resolution=None, selector=None )

    Creates a new InvertedHammer pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    InvertedHammer

    InvertedHammer( symbol, resolution=None, selector=None )

    Creates a new InvertedHammer pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    InvertedHammer

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a InvertedHammer indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class InvertedHammerAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private InvertedHammer _invertedhammer;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _invertedhammer = new InvertedHammer();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _invertedhammer.Update(bar);
            }
       
            if (_invertedhammer.IsReady)
            {
                // The current value of _invertedhammer is represented by itself (_invertedhammer)
                // or _invertedhammer.Current.Value
                Plot("InvertedHammer", "invertedhammer", _invertedhammer);
                
            }
        }
    }
    class InvertedHammerAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._invertedhammer = InvertedHammer()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._invertedhammer.update(bar)
            if self._invertedhammer.is_ready:
                # The current value of self._invertedhammer is represented by self._invertedhammer.current.value
                self.plot("InvertedHammer", "invertedhammer", self._invertedhammer.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class InvertedHammerAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private InvertedHammer _invertedhammer;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _invertedhammer = new InvertedHammer();
            RegisterIndicator(_symbol, _invertedhammer, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_invertedhammer.IsReady)
            {
                // The current value of _invertedhammer is represented by itself (_invertedhammer)
                // or _invertedhammer.Current.Value
                Plot("InvertedHammer", "invertedhammer", _invertedhammer);
                
            }
        }
    }
    class InvertedHammerAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._invertedhammer = InvertedHammer()
            self.register_indicator(self._symbol, self._invertedhammer, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._invertedhammer.is_ready:
                # The current value of self._invertedhammer is represented by self._invertedhammer.current.value
                self.plot("InvertedHammer", "invertedhammer", self._invertedhammer.current.value)
                
    

    The following reference table describes the InvertedHammer constructor:

    InvertedHammer

    class QuantConnect.Indicators.CandlestickPatterns.InvertedHammer [source]

    Inverted Hammer candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    InvertedHammer

    class QuantConnect.Indicators.CandlestickPatterns.InvertedHammer [source]

    Inverted Hammer candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Kicking

    Introduction

    Create a new Kicking candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Kicking Indicator

    To create an automatic indicators for Kicking , call the Kicking helper method from the QCAlgorithm class. The Kicking method creates a Kicking object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class KickingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Kicking _kicking;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kicking = CandlestickPatterns.Kicking(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_kicking.IsReady)
            {
                // The current value of _kicking is represented by itself (_kicking)
                // or _kicking.Current.Value
                Plot("Kicking", "kicking", _kicking);
                
            }
        }
    }
    class KickingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kicking = self.CandlestickPatterns.kicking(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._kicking.is_ready:
                # The current value of self._kicking is represented by self._kicking.current.value
                self.plot("Kicking", "kicking", self._kicking.current.value)
                
    

    The following reference table describes the Kicking method:

    kicking( symbol, resolution=None, selector=None )

    Creates a new Kicking pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Kicking

    Kicking( symbol, resolution=None, selector=None )

    Creates a new Kicking pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Kicking

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Kicking indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class KickingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Kicking _kicking;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kicking = new Kicking();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _kicking.Update(bar);
            }
       
            if (_kicking.IsReady)
            {
                // The current value of _kicking is represented by itself (_kicking)
                // or _kicking.Current.Value
                Plot("Kicking", "kicking", _kicking);
                
            }
        }
    }
    class KickingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kicking = Kicking()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._kicking.update(bar)
            if self._kicking.is_ready:
                # The current value of self._kicking is represented by self._kicking.current.value
                self.plot("Kicking", "kicking", self._kicking.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class KickingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Kicking _kicking;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kicking = new Kicking();
            RegisterIndicator(_symbol, _kicking, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_kicking.IsReady)
            {
                // The current value of _kicking is represented by itself (_kicking)
                // or _kicking.Current.Value
                Plot("Kicking", "kicking", _kicking);
                
            }
        }
    }
    class KickingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kicking = Kicking()
            self.register_indicator(self._symbol, self._kicking, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._kicking.is_ready:
                # The current value of self._kicking is represented by self._kicking.current.value
                self.plot("Kicking", "kicking", self._kicking.current.value)
                
    

    The following reference table describes the Kicking constructor:

    Kicking

    class QuantConnect.Indicators.CandlestickPatterns.Kicking [source]

    Kicking candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Kicking

    class QuantConnect.Indicators.CandlestickPatterns.Kicking [source]

    Kicking candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Kicking By Length

    Introduction

    Create a new Kicking (bull/bear determined by the longer marubozu) candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using KickingByLength Indicator

    To create an automatic indicators for KickingByLength , call the KickingByLength helper method from the QCAlgorithm class. The KickingByLength method creates a KickingByLength object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class KickingByLengthAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KickingByLength _kickingbylength;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kickingbylength = CandlestickPatterns.KickingByLength(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_kickingbylength.IsReady)
            {
                // The current value of _kickingbylength is represented by itself (_kickingbylength)
                // or _kickingbylength.Current.Value
                Plot("KickingByLength", "kickingbylength", _kickingbylength);
                
            }
        }
    }
    class KickingByLengthAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kickingbylength = self.CandlestickPatterns.kickingbylength(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._kickingbylength.is_ready:
                # The current value of self._kickingbylength is represented by self._kickingbylength.current.value
                self.plot("KickingByLength", "kickingbylength", self._kickingbylength.current.value)
                
    

    The following reference table describes the KickingByLength method:

    kicking_by_length( symbol, resolution=None, selector=None )

    Creates a new KickingByLength pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    KickingByLength

    KickingByLength( symbol, resolution=None, selector=None )

    Creates a new KickingByLength pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    KickingByLength

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a KickingByLength indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class KickingByLengthAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KickingByLength _kickingbylength;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kickingbylength = new KickingByLength();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _kickingbylength.Update(bar);
            }
       
            if (_kickingbylength.IsReady)
            {
                // The current value of _kickingbylength is represented by itself (_kickingbylength)
                // or _kickingbylength.Current.Value
                Plot("KickingByLength", "kickingbylength", _kickingbylength);
                
            }
        }
    }
    class KickingByLengthAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kickingbylength = KickingByLength()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._kickingbylength.update(bar)
            if self._kickingbylength.is_ready:
                # The current value of self._kickingbylength is represented by self._kickingbylength.current.value
                self.plot("KickingByLength", "kickingbylength", self._kickingbylength.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class KickingByLengthAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KickingByLength _kickingbylength;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kickingbylength = new KickingByLength();
            RegisterIndicator(_symbol, _kickingbylength, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_kickingbylength.IsReady)
            {
                // The current value of _kickingbylength is represented by itself (_kickingbylength)
                // or _kickingbylength.Current.Value
                Plot("KickingByLength", "kickingbylength", _kickingbylength);
                
            }
        }
    }
    class KickingByLengthAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kickingbylength = KickingByLength()
            self.register_indicator(self._symbol, self._kickingbylength, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._kickingbylength.is_ready:
                # The current value of self._kickingbylength is represented by self._kickingbylength.current.value
                self.plot("KickingByLength", "kickingbylength", self._kickingbylength.current.value)
                
    

    The following reference table describes the KickingByLength constructor:

    KickingByLength

    class QuantConnect.Indicators.CandlestickPatterns.KickingByLength [source]

    Kicking (bull/bear determined by the longer marubozu) candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    KickingByLength

    class QuantConnect.Indicators.CandlestickPatterns.KickingByLength [source]

    Kicking (bull/bear determined by the longer marubozu) candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Ladder Bottom

    Introduction

    Create a new Ladder Bottom candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using LadderBottom Indicator

    To create an automatic indicators for LadderBottom , call the LadderBottom helper method from the QCAlgorithm class. The LadderBottom method creates a LadderBottom object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class LadderBottomAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LadderBottom _ladderbottom;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ladderbottom = CandlestickPatterns.LadderBottom(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_ladderbottom.IsReady)
            {
                // The current value of _ladderbottom is represented by itself (_ladderbottom)
                // or _ladderbottom.Current.Value
                Plot("LadderBottom", "ladderbottom", _ladderbottom);
                
            }
        }
    }
    class LadderBottomAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ladderbottom = self.CandlestickPatterns.ladderbottom(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._ladderbottom.is_ready:
                # The current value of self._ladderbottom is represented by self._ladderbottom.current.value
                self.plot("LadderBottom", "ladderbottom", self._ladderbottom.current.value)
                
    

    The following reference table describes the LadderBottom method:

    ladder_bottom( symbol, resolution=None, selector=None )

    Creates a new LadderBottom pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    LadderBottom

    LadderBottom( symbol, resolution=None, selector=None )

    Creates a new LadderBottom pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    LadderBottom

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a LadderBottom indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class LadderBottomAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LadderBottom _ladderbottom;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ladderbottom = new LadderBottom();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _ladderbottom.Update(bar);
            }
       
            if (_ladderbottom.IsReady)
            {
                // The current value of _ladderbottom is represented by itself (_ladderbottom)
                // or _ladderbottom.Current.Value
                Plot("LadderBottom", "ladderbottom", _ladderbottom);
                
            }
        }
    }
    class LadderBottomAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ladderbottom = LadderBottom()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._ladderbottom.update(bar)
            if self._ladderbottom.is_ready:
                # The current value of self._ladderbottom is represented by self._ladderbottom.current.value
                self.plot("LadderBottom", "ladderbottom", self._ladderbottom.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class LadderBottomAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LadderBottom _ladderbottom;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ladderbottom = new LadderBottom();
            RegisterIndicator(_symbol, _ladderbottom, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_ladderbottom.IsReady)
            {
                // The current value of _ladderbottom is represented by itself (_ladderbottom)
                // or _ladderbottom.Current.Value
                Plot("LadderBottom", "ladderbottom", _ladderbottom);
                
            }
        }
    }
    class LadderBottomAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ladderbottom = LadderBottom()
            self.register_indicator(self._symbol, self._ladderbottom, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._ladderbottom.is_ready:
                # The current value of self._ladderbottom is represented by self._ladderbottom.current.value
                self.plot("LadderBottom", "ladderbottom", self._ladderbottom.current.value)
                
    

    The following reference table describes the LadderBottom constructor:

    LadderBottom

    class QuantConnect.Indicators.CandlestickPatterns.LadderBottom [source]

    Ladder Bottom candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LadderBottom

    class QuantConnect.Indicators.CandlestickPatterns.LadderBottom [source]

    Ladder Bottom candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Long Legged Doji

    Introduction

    Create a new Long Legged Doji candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using LongLeggedDoji Indicator

    To create an automatic indicators for LongLeggedDoji , call the LongLeggedDoji helper method from the QCAlgorithm class. The LongLeggedDoji method creates a LongLeggedDoji object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class LongLeggedDojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LongLeggedDoji _longleggeddoji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _longleggeddoji = CandlestickPatterns.LongLeggedDoji(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_longleggeddoji.IsReady)
            {
                // The current value of _longleggeddoji is represented by itself (_longleggeddoji)
                // or _longleggeddoji.Current.Value
                Plot("LongLeggedDoji", "longleggeddoji", _longleggeddoji);
                
            }
        }
    }
    class LongLeggedDojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._longleggeddoji = self.CandlestickPatterns.longleggeddoji(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._longleggeddoji.is_ready:
                # The current value of self._longleggeddoji is represented by self._longleggeddoji.current.value
                self.plot("LongLeggedDoji", "longleggeddoji", self._longleggeddoji.current.value)
                
    

    The following reference table describes the LongLeggedDoji method:

    long_legged_doji( symbol, resolution=None, selector=None )

    Creates a new LongLeggedDoji pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    intLeggedDoji

    LongLeggedDoji( symbol, resolution=None, selector=None )

    Creates a new LongLeggedDoji pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    LongLeggedDoji

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a LongLeggedDoji indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class LongLeggedDojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LongLeggedDoji _longleggeddoji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _longleggeddoji = new LongLeggedDoji();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _longleggeddoji.Update(bar);
            }
       
            if (_longleggeddoji.IsReady)
            {
                // The current value of _longleggeddoji is represented by itself (_longleggeddoji)
                // or _longleggeddoji.Current.Value
                Plot("LongLeggedDoji", "longleggeddoji", _longleggeddoji);
                
            }
        }
    }
    class LongLeggedDojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._longleggeddoji = LongLeggedDoji()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._longleggeddoji.update(bar)
            if self._longleggeddoji.is_ready:
                # The current value of self._longleggeddoji is represented by self._longleggeddoji.current.value
                self.plot("LongLeggedDoji", "longleggeddoji", self._longleggeddoji.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class LongLeggedDojiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LongLeggedDoji _longleggeddoji;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _longleggeddoji = new LongLeggedDoji();
            RegisterIndicator(_symbol, _longleggeddoji, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_longleggeddoji.IsReady)
            {
                // The current value of _longleggeddoji is represented by itself (_longleggeddoji)
                // or _longleggeddoji.Current.Value
                Plot("LongLeggedDoji", "longleggeddoji", _longleggeddoji);
                
            }
        }
    }
    class LongLeggedDojiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._longleggeddoji = LongLeggedDoji()
            self.register_indicator(self._symbol, self._longleggeddoji, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._longleggeddoji.is_ready:
                # The current value of self._longleggeddoji is represented by self._longleggeddoji.current.value
                self.plot("LongLeggedDoji", "longleggeddoji", self._longleggeddoji.current.value)
                
    

    The following reference table describes the LongLeggedDoji constructor:

    LongLeggedDoji

    class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji [source]

    Long Legged Doji candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LongLeggedDoji

    class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji [source]

    Long Legged Doji candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Long Line Candle

    Introduction

    Create a new Long Line Candle candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using LongLineCandle Indicator

    To create an automatic indicators for LongLineCandle , call the LongLineCandle helper method from the QCAlgorithm class. The LongLineCandle method creates a LongLineCandle object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class LongLineCandleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LongLineCandle _longlinecandle;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _longlinecandle = CandlestickPatterns.LongLineCandle(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_longlinecandle.IsReady)
            {
                // The current value of _longlinecandle is represented by itself (_longlinecandle)
                // or _longlinecandle.Current.Value
                Plot("LongLineCandle", "longlinecandle", _longlinecandle);
                
            }
        }
    }
    class LongLineCandleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._longlinecandle = self.CandlestickPatterns.longlinecandle(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._longlinecandle.is_ready:
                # The current value of self._longlinecandle is represented by self._longlinecandle.current.value
                self.plot("LongLineCandle", "longlinecandle", self._longlinecandle.current.value)
                
    

    The following reference table describes the LongLineCandle method:

    long_line_candle( symbol, resolution=None, selector=None )

    Creates a new LongLineCandle pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    intLineCandle

    LongLineCandle( symbol, resolution=None, selector=None )

    Creates a new LongLineCandle pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    LongLineCandle

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a LongLineCandle indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class LongLineCandleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LongLineCandle _longlinecandle;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _longlinecandle = new LongLineCandle();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _longlinecandle.Update(bar);
            }
       
            if (_longlinecandle.IsReady)
            {
                // The current value of _longlinecandle is represented by itself (_longlinecandle)
                // or _longlinecandle.Current.Value
                Plot("LongLineCandle", "longlinecandle", _longlinecandle);
                
            }
        }
    }
    class LongLineCandleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._longlinecandle = LongLineCandle()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._longlinecandle.update(bar)
            if self._longlinecandle.is_ready:
                # The current value of self._longlinecandle is represented by self._longlinecandle.current.value
                self.plot("LongLineCandle", "longlinecandle", self._longlinecandle.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class LongLineCandleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LongLineCandle _longlinecandle;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _longlinecandle = new LongLineCandle();
            RegisterIndicator(_symbol, _longlinecandle, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_longlinecandle.IsReady)
            {
                // The current value of _longlinecandle is represented by itself (_longlinecandle)
                // or _longlinecandle.Current.Value
                Plot("LongLineCandle", "longlinecandle", _longlinecandle);
                
            }
        }
    }
    class LongLineCandleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._longlinecandle = LongLineCandle()
            self.register_indicator(self._symbol, self._longlinecandle, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._longlinecandle.is_ready:
                # The current value of self._longlinecandle is represented by self._longlinecandle.current.value
                self.plot("LongLineCandle", "longlinecandle", self._longlinecandle.current.value)
                
    

    The following reference table describes the LongLineCandle constructor:

    LongLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.LongLineCandle [source]

    Long Line Candle candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LongLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.LongLineCandle [source]

    Long Line Candle candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Marubozu

    Introduction

    Create a new Marubozu candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Marubozu Indicator

    To create an automatic indicators for Marubozu , call the Marubozu helper method from the QCAlgorithm class. The Marubozu method creates a Marubozu object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MarubozuAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Marubozu _marubozu;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _marubozu = CandlestickPatterns.Marubozu(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_marubozu.IsReady)
            {
                // The current value of _marubozu is represented by itself (_marubozu)
                // or _marubozu.Current.Value
                Plot("Marubozu", "marubozu", _marubozu);
                
            }
        }
    }
    class MarubozuAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._marubozu = self.CandlestickPatterns.marubozu(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._marubozu.is_ready:
                # The current value of self._marubozu is represented by self._marubozu.current.value
                self.plot("Marubozu", "marubozu", self._marubozu.current.value)
                
    

    The following reference table describes the Marubozu method:

    marubozu( symbol, resolution=None, selector=None )

    Creates a new Marubozu pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Marubozu

    Marubozu( symbol, resolution=None, selector=None )

    Creates a new Marubozu pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Marubozu

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Marubozu indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class MarubozuAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Marubozu _marubozu;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _marubozu = new Marubozu();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _marubozu.Update(bar);
            }
       
            if (_marubozu.IsReady)
            {
                // The current value of _marubozu is represented by itself (_marubozu)
                // or _marubozu.Current.Value
                Plot("Marubozu", "marubozu", _marubozu);
                
            }
        }
    }
    class MarubozuAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._marubozu = Marubozu()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._marubozu.update(bar)
            if self._marubozu.is_ready:
                # The current value of self._marubozu is represented by self._marubozu.current.value
                self.plot("Marubozu", "marubozu", self._marubozu.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MarubozuAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Marubozu _marubozu;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _marubozu = new Marubozu();
            RegisterIndicator(_symbol, _marubozu, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_marubozu.IsReady)
            {
                // The current value of _marubozu is represented by itself (_marubozu)
                // or _marubozu.Current.Value
                Plot("Marubozu", "marubozu", _marubozu);
                
            }
        }
    }
    class MarubozuAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._marubozu = Marubozu()
            self.register_indicator(self._symbol, self._marubozu, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._marubozu.is_ready:
                # The current value of self._marubozu is represented by self._marubozu.current.value
                self.plot("Marubozu", "marubozu", self._marubozu.current.value)
                
    

    The following reference table describes the Marubozu constructor:

    Marubozu

    class QuantConnect.Indicators.CandlestickPatterns.Marubozu [source]

    Marubozu candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Marubozu

    class QuantConnect.Indicators.CandlestickPatterns.Marubozu [source]

    Marubozu candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Mat Hold

    Introduction

    Create a new Mat Hold candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using MatHold Indicator

    To create an automatic indicators for MatHold , call the MatHold helper method from the QCAlgorithm class. The MatHold method creates a MatHold object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MatHoldAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MatHold _mathold;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mathold = CandlestickPatterns.MatHold(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_mathold.IsReady)
            {
                // The current value of _mathold is represented by itself (_mathold)
                // or _mathold.Current.Value
                Plot("MatHold", "mathold", _mathold);
                
            }
        }
    }
    class MatHoldAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mathold = self.CandlestickPatterns.mathold(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._mathold.is_ready:
                # The current value of self._mathold is represented by self._mathold.current.value
                self.plot("MatHold", "mathold", self._mathold.current.value)
                
    

    The following reference table describes the MatHold method:

    mat_hold( symbol, penetration=0.5, resolution=None, selector=None )

    Creates a new MatHold pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    MatHold

    MatHold( symbol, penetration=0.5, resolution=None, selector=None )

    Creates a new MatHold pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    MatHold

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MatHold indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class MatHoldAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MatHold _mathold;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mathold = new MatHold();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _mathold.Update(bar);
            }
       
            if (_mathold.IsReady)
            {
                // The current value of _mathold is represented by itself (_mathold)
                // or _mathold.Current.Value
                Plot("MatHold", "mathold", _mathold);
                
            }
        }
    }
    class MatHoldAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mathold = MatHold()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._mathold.update(bar)
            if self._mathold.is_ready:
                # The current value of self._mathold is represented by self._mathold.current.value
                self.plot("MatHold", "mathold", self._mathold.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MatHoldAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MatHold _mathold;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mathold = new MatHold();
            RegisterIndicator(_symbol, _mathold, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_mathold.IsReady)
            {
                // The current value of _mathold is represented by itself (_mathold)
                // or _mathold.Current.Value
                Plot("MatHold", "mathold", _mathold);
                
            }
        }
    }
    class MatHoldAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mathold = MatHold()
            self.register_indicator(self._symbol, self._mathold, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._mathold.is_ready:
                # The current value of self._mathold is represented by self._mathold.current.value
                self.plot("MatHold", "mathold", self._mathold.current.value)
                
    

    The following reference table describes the MatHold constructor:

    MatHold

    class QuantConnect.Indicators.CandlestickPatterns.MatHold [source]

    Mat Hold candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MatHold

    class QuantConnect.Indicators.CandlestickPatterns.MatHold [source]

    Mat Hold candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Matching Low

    Introduction

    Create a new Matching Low candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using MatchingLow Indicator

    To create an automatic indicators for MatchingLow , call the MatchingLow helper method from the QCAlgorithm class. The MatchingLow method creates a MatchingLow object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MatchingLowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MatchingLow _matchinglow;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _matchinglow = CandlestickPatterns.MatchingLow(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_matchinglow.IsReady)
            {
                // The current value of _matchinglow is represented by itself (_matchinglow)
                // or _matchinglow.Current.Value
                Plot("MatchingLow", "matchinglow", _matchinglow);
                
            }
        }
    }
    class MatchingLowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._matchinglow = self.CandlestickPatterns.matchinglow(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._matchinglow.is_ready:
                # The current value of self._matchinglow is represented by self._matchinglow.current.value
                self.plot("MatchingLow", "matchinglow", self._matchinglow.current.value)
                
    

    The following reference table describes the MatchingLow method:

    matching_low( symbol, resolution=None, selector=None )

    Creates a new MatchingLow pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    MatchingLow

    MatchingLow( symbol, resolution=None, selector=None )

    Creates a new MatchingLow pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    MatchingLow

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MatchingLow indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class MatchingLowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MatchingLow _matchinglow;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _matchinglow = new MatchingLow();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _matchinglow.Update(bar);
            }
       
            if (_matchinglow.IsReady)
            {
                // The current value of _matchinglow is represented by itself (_matchinglow)
                // or _matchinglow.Current.Value
                Plot("MatchingLow", "matchinglow", _matchinglow);
                
            }
        }
    }
    class MatchingLowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._matchinglow = MatchingLow()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._matchinglow.update(bar)
            if self._matchinglow.is_ready:
                # The current value of self._matchinglow is represented by self._matchinglow.current.value
                self.plot("MatchingLow", "matchinglow", self._matchinglow.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MatchingLowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MatchingLow _matchinglow;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _matchinglow = new MatchingLow();
            RegisterIndicator(_symbol, _matchinglow, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_matchinglow.IsReady)
            {
                // The current value of _matchinglow is represented by itself (_matchinglow)
                // or _matchinglow.Current.Value
                Plot("MatchingLow", "matchinglow", _matchinglow);
                
            }
        }
    }
    class MatchingLowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._matchinglow = MatchingLow()
            self.register_indicator(self._symbol, self._matchinglow, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._matchinglow.is_ready:
                # The current value of self._matchinglow is represented by self._matchinglow.current.value
                self.plot("MatchingLow", "matchinglow", self._matchinglow.current.value)
                
    

    The following reference table describes the MatchingLow constructor:

    MatchingLow

    class QuantConnect.Indicators.CandlestickPatterns.MatchingLow [source]

    Matching Low candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MatchingLow

    class QuantConnect.Indicators.CandlestickPatterns.MatchingLow [source]

    Matching Low candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Morning Doji Star

    Introduction

    Create a new Morning Doji Star candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using MorningDojiStar Indicator

    To create an automatic indicators for MorningDojiStar , call the MorningDojiStar helper method from the QCAlgorithm class. The MorningDojiStar method creates a MorningDojiStar object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MorningDojiStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MorningDojiStar _morningdojistar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _morningdojistar = CandlestickPatterns.MorningDojiStar(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_morningdojistar.IsReady)
            {
                // The current value of _morningdojistar is represented by itself (_morningdojistar)
                // or _morningdojistar.Current.Value
                Plot("MorningDojiStar", "morningdojistar", _morningdojistar);
                
            }
        }
    }
    class MorningDojiStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._morningdojistar = self.CandlestickPatterns.morningdojistar(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._morningdojistar.is_ready:
                # The current value of self._morningdojistar is represented by self._morningdojistar.current.value
                self.plot("MorningDojiStar", "morningdojistar", self._morningdojistar.current.value)
                
    

    The following reference table describes the MorningDojiStar method:

    morning_doji_star( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new MorningDojiStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    MorningDojiStar

    MorningDojiStar( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new MorningDojiStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    MorningDojiStar

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MorningDojiStar indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class MorningDojiStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MorningDojiStar _morningdojistar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _morningdojistar = new MorningDojiStar();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _morningdojistar.Update(bar);
            }
       
            if (_morningdojistar.IsReady)
            {
                // The current value of _morningdojistar is represented by itself (_morningdojistar)
                // or _morningdojistar.Current.Value
                Plot("MorningDojiStar", "morningdojistar", _morningdojistar);
                
            }
        }
    }
    class MorningDojiStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._morningdojistar = MorningDojiStar()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._morningdojistar.update(bar)
            if self._morningdojistar.is_ready:
                # The current value of self._morningdojistar is represented by self._morningdojistar.current.value
                self.plot("MorningDojiStar", "morningdojistar", self._morningdojistar.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MorningDojiStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MorningDojiStar _morningdojistar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _morningdojistar = new MorningDojiStar();
            RegisterIndicator(_symbol, _morningdojistar, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_morningdojistar.IsReady)
            {
                // The current value of _morningdojistar is represented by itself (_morningdojistar)
                // or _morningdojistar.Current.Value
                Plot("MorningDojiStar", "morningdojistar", _morningdojistar);
                
            }
        }
    }
    class MorningDojiStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._morningdojistar = MorningDojiStar()
            self.register_indicator(self._symbol, self._morningdojistar, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._morningdojistar.is_ready:
                # The current value of self._morningdojistar is represented by self._morningdojistar.current.value
                self.plot("MorningDojiStar", "morningdojistar", self._morningdojistar.current.value)
                
    

    The following reference table describes the MorningDojiStar constructor:

    MorningDojiStar

    class QuantConnect.Indicators.CandlestickPatterns.MorningDojiStar [source]

    Morning Doji Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MorningDojiStar

    class QuantConnect.Indicators.CandlestickPatterns.MorningDojiStar [source]

    Morning Doji Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Morning Star

    Introduction

    Create a new Morning Star candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using MorningStar Indicator

    To create an automatic indicators for MorningStar , call the MorningStar helper method from the QCAlgorithm class. The MorningStar method creates a MorningStar object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MorningStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MorningStar _morningstar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _morningstar = CandlestickPatterns.MorningStar(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_morningstar.IsReady)
            {
                // The current value of _morningstar is represented by itself (_morningstar)
                // or _morningstar.Current.Value
                Plot("MorningStar", "morningstar", _morningstar);
                
            }
        }
    }
    class MorningStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._morningstar = self.CandlestickPatterns.morningstar(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._morningstar.is_ready:
                # The current value of self._morningstar is represented by self._morningstar.current.value
                self.plot("MorningStar", "morningstar", self._morningstar.current.value)
                
    

    The following reference table describes the MorningStar method:

    morning_star( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new MorningStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    MorningStar

    MorningStar( symbol, penetration=0.3, resolution=None, selector=None )

    Creates a new MorningStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    MorningStar

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MorningStar indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class MorningStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MorningStar _morningstar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _morningstar = new MorningStar();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _morningstar.Update(bar);
            }
       
            if (_morningstar.IsReady)
            {
                // The current value of _morningstar is represented by itself (_morningstar)
                // or _morningstar.Current.Value
                Plot("MorningStar", "morningstar", _morningstar);
                
            }
        }
    }
    class MorningStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._morningstar = MorningStar()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._morningstar.update(bar)
            if self._morningstar.is_ready:
                # The current value of self._morningstar is represented by self._morningstar.current.value
                self.plot("MorningStar", "morningstar", self._morningstar.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MorningStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MorningStar _morningstar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _morningstar = new MorningStar();
            RegisterIndicator(_symbol, _morningstar, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_morningstar.IsReady)
            {
                // The current value of _morningstar is represented by itself (_morningstar)
                // or _morningstar.Current.Value
                Plot("MorningStar", "morningstar", _morningstar);
                
            }
        }
    }
    class MorningStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._morningstar = MorningStar()
            self.register_indicator(self._symbol, self._morningstar, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._morningstar.is_ready:
                # The current value of self._morningstar is represented by self._morningstar.current.value
                self.plot("MorningStar", "morningstar", self._morningstar.current.value)
                
    

    The following reference table describes the MorningStar constructor:

    MorningStar

    class QuantConnect.Indicators.CandlestickPatterns.MorningStar [source]

    Morning Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MorningStar

    class QuantConnect.Indicators.CandlestickPatterns.MorningStar [source]

    Morning Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    On Neck

    Introduction

    Create a new On-Neck candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using OnNeck Indicator

    To create an automatic indicators for OnNeck , call the OnNeck helper method from the QCAlgorithm class. The OnNeck method creates a OnNeck object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class OnNeckAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private OnNeck _onneck;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _onneck = CandlestickPatterns.OnNeck(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_onneck.IsReady)
            {
                // The current value of _onneck is represented by itself (_onneck)
                // or _onneck.Current.Value
                Plot("OnNeck", "onneck", _onneck);
                
            }
        }
    }
    class OnNeckAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._onneck = self.CandlestickPatterns.onneck(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._onneck.is_ready:
                # The current value of self._onneck is represented by self._onneck.current.value
                self.plot("OnNeck", "onneck", self._onneck.current.value)
                
    

    The following reference table describes the OnNeck method:

    on_neck( symbol, resolution=None, selector=None )

    Creates a new OnNeck pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    OnNeck

    OnNeck( symbol, resolution=None, selector=None )

    Creates a new OnNeck pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    OnNeck

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a OnNeck indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class OnNeckAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private OnNeck _onneck;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _onneck = new OnNeck();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _onneck.Update(bar);
            }
       
            if (_onneck.IsReady)
            {
                // The current value of _onneck is represented by itself (_onneck)
                // or _onneck.Current.Value
                Plot("OnNeck", "onneck", _onneck);
                
            }
        }
    }
    class OnNeckAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._onneck = OnNeck()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._onneck.update(bar)
            if self._onneck.is_ready:
                # The current value of self._onneck is represented by self._onneck.current.value
                self.plot("OnNeck", "onneck", self._onneck.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class OnNeckAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private OnNeck _onneck;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _onneck = new OnNeck();
            RegisterIndicator(_symbol, _onneck, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_onneck.IsReady)
            {
                // The current value of _onneck is represented by itself (_onneck)
                // or _onneck.Current.Value
                Plot("OnNeck", "onneck", _onneck);
                
            }
        }
    }
    class OnNeckAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._onneck = OnNeck()
            self.register_indicator(self._symbol, self._onneck, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._onneck.is_ready:
                # The current value of self._onneck is represented by self._onneck.current.value
                self.plot("OnNeck", "onneck", self._onneck.current.value)
                
    

    The following reference table describes the OnNeck constructor:

    OnNeck

    class QuantConnect.Indicators.CandlestickPatterns.OnNeck [source]

    On-Neck candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    OnNeck

    class QuantConnect.Indicators.CandlestickPatterns.OnNeck [source]

    On-Neck candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Piercing

    Introduction

    Create a new Piercing candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Piercing Indicator

    To create an automatic indicators for Piercing , call the Piercing helper method from the QCAlgorithm class. The Piercing method creates a Piercing object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class PiercingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Piercing _piercing;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _piercing = CandlestickPatterns.Piercing(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_piercing.IsReady)
            {
                // The current value of _piercing is represented by itself (_piercing)
                // or _piercing.Current.Value
                Plot("Piercing", "piercing", _piercing);
                
            }
        }
    }
    class PiercingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._piercing = self.CandlestickPatterns.piercing(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._piercing.is_ready:
                # The current value of self._piercing is represented by self._piercing.current.value
                self.plot("Piercing", "piercing", self._piercing.current.value)
                
    

    The following reference table describes the Piercing method:

    piercing( symbol, resolution=None, selector=None )

    Creates a new Piercing pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Piercing

    Piercing( symbol, resolution=None, selector=None )

    Creates a new Piercing pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Piercing

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Piercing indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class PiercingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Piercing _piercing;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _piercing = new Piercing();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _piercing.Update(bar);
            }
       
            if (_piercing.IsReady)
            {
                // The current value of _piercing is represented by itself (_piercing)
                // or _piercing.Current.Value
                Plot("Piercing", "piercing", _piercing);
                
            }
        }
    }
    class PiercingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._piercing = Piercing()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._piercing.update(bar)
            if self._piercing.is_ready:
                # The current value of self._piercing is represented by self._piercing.current.value
                self.plot("Piercing", "piercing", self._piercing.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class PiercingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Piercing _piercing;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _piercing = new Piercing();
            RegisterIndicator(_symbol, _piercing, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_piercing.IsReady)
            {
                // The current value of _piercing is represented by itself (_piercing)
                // or _piercing.Current.Value
                Plot("Piercing", "piercing", _piercing);
                
            }
        }
    }
    class PiercingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._piercing = Piercing()
            self.register_indicator(self._symbol, self._piercing, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._piercing.is_ready:
                # The current value of self._piercing is represented by self._piercing.current.value
                self.plot("Piercing", "piercing", self._piercing.current.value)
                
    

    The following reference table describes the Piercing constructor:

    Piercing

    class QuantConnect.Indicators.CandlestickPatterns.Piercing [source]

    Piercing candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Piercing

    class QuantConnect.Indicators.CandlestickPatterns.Piercing [source]

    Piercing candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Rickshaw Man

    Introduction

    Create a new Rickshaw Man candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using RickshawMan Indicator

    To create an automatic indicators for RickshawMan , call the RickshawMan helper method from the QCAlgorithm class. The RickshawMan method creates a RickshawMan object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RickshawManAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RickshawMan _rickshawman;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rickshawman = CandlestickPatterns.RickshawMan(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_rickshawman.IsReady)
            {
                // The current value of _rickshawman is represented by itself (_rickshawman)
                // or _rickshawman.Current.Value
                Plot("RickshawMan", "rickshawman", _rickshawman);
                
            }
        }
    }
    class RickshawManAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rickshawman = self.CandlestickPatterns.rickshawman(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._rickshawman.is_ready:
                # The current value of self._rickshawman is represented by self._rickshawman.current.value
                self.plot("RickshawMan", "rickshawman", self._rickshawman.current.value)
                
    

    The following reference table describes the RickshawMan method:

    rickshaw_man( symbol, resolution=None, selector=None )

    Creates a new RickshawMan pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    RickshawMan

    RickshawMan( symbol, resolution=None, selector=None )

    Creates a new RickshawMan pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    RickshawMan

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a RickshawMan indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class RickshawManAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RickshawMan _rickshawman;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rickshawman = new RickshawMan();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _rickshawman.Update(bar);
            }
       
            if (_rickshawman.IsReady)
            {
                // The current value of _rickshawman is represented by itself (_rickshawman)
                // or _rickshawman.Current.Value
                Plot("RickshawMan", "rickshawman", _rickshawman);
                
            }
        }
    }
    class RickshawManAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rickshawman = RickshawMan()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._rickshawman.update(bar)
            if self._rickshawman.is_ready:
                # The current value of self._rickshawman is represented by self._rickshawman.current.value
                self.plot("RickshawMan", "rickshawman", self._rickshawman.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RickshawManAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RickshawMan _rickshawman;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rickshawman = new RickshawMan();
            RegisterIndicator(_symbol, _rickshawman, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_rickshawman.IsReady)
            {
                // The current value of _rickshawman is represented by itself (_rickshawman)
                // or _rickshawman.Current.Value
                Plot("RickshawMan", "rickshawman", _rickshawman);
                
            }
        }
    }
    class RickshawManAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rickshawman = RickshawMan()
            self.register_indicator(self._symbol, self._rickshawman, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._rickshawman.is_ready:
                # The current value of self._rickshawman is represented by self._rickshawman.current.value
                self.plot("RickshawMan", "rickshawman", self._rickshawman.current.value)
                
    

    The following reference table describes the RickshawMan constructor:

    RickshawMan

    class QuantConnect.Indicators.CandlestickPatterns.RickshawMan [source]

    Rickshaw Man candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RickshawMan

    class QuantConnect.Indicators.CandlestickPatterns.RickshawMan [source]

    Rickshaw Man candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Rise Fall Three Methods

    Introduction

    Create a new Rising/Falling Three Methods candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using RiseFallThreeMethods Indicator

    To create an automatic indicators for RiseFallThreeMethods , call the RiseFallThreeMethods helper method from the QCAlgorithm class. The RiseFallThreeMethods method creates a RiseFallThreeMethods object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RiseFallThreeMethodsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RiseFallThreeMethods _risefallthreemethods;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _risefallthreemethods = CandlestickPatterns.RiseFallThreeMethods(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_risefallthreemethods.IsReady)
            {
                // The current value of _risefallthreemethods is represented by itself (_risefallthreemethods)
                // or _risefallthreemethods.Current.Value
                Plot("RiseFallThreeMethods", "risefallthreemethods", _risefallthreemethods);
                
            }
        }
    }
    class RiseFallThreeMethodsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._risefallthreemethods = self.CandlestickPatterns.risefallthreemethods(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._risefallthreemethods.is_ready:
                # The current value of self._risefallthreemethods is represented by self._risefallthreemethods.current.value
                self.plot("RiseFallThreeMethods", "risefallthreemethods", self._risefallthreemethods.current.value)
                
    

    The following reference table describes the RiseFallThreeMethods method:

    rise_fall_three_methods( symbol, resolution=None, selector=None )

    Creates a new RiseFallThreeMethods pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    RiseFallThreeMethods

    RiseFallThreeMethods( symbol, resolution=None, selector=None )

    Creates a new RiseFallThreeMethods pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    RiseFallThreeMethods

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a RiseFallThreeMethods indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class RiseFallThreeMethodsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RiseFallThreeMethods _risefallthreemethods;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _risefallthreemethods = new RiseFallThreeMethods();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _risefallthreemethods.Update(bar);
            }
       
            if (_risefallthreemethods.IsReady)
            {
                // The current value of _risefallthreemethods is represented by itself (_risefallthreemethods)
                // or _risefallthreemethods.Current.Value
                Plot("RiseFallThreeMethods", "risefallthreemethods", _risefallthreemethods);
                
            }
        }
    }
    class RiseFallThreeMethodsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._risefallthreemethods = RiseFallThreeMethods()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._risefallthreemethods.update(bar)
            if self._risefallthreemethods.is_ready:
                # The current value of self._risefallthreemethods is represented by self._risefallthreemethods.current.value
                self.plot("RiseFallThreeMethods", "risefallthreemethods", self._risefallthreemethods.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RiseFallThreeMethodsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RiseFallThreeMethods _risefallthreemethods;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _risefallthreemethods = new RiseFallThreeMethods();
            RegisterIndicator(_symbol, _risefallthreemethods, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_risefallthreemethods.IsReady)
            {
                // The current value of _risefallthreemethods is represented by itself (_risefallthreemethods)
                // or _risefallthreemethods.Current.Value
                Plot("RiseFallThreeMethods", "risefallthreemethods", _risefallthreemethods);
                
            }
        }
    }
    class RiseFallThreeMethodsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._risefallthreemethods = RiseFallThreeMethods()
            self.register_indicator(self._symbol, self._risefallthreemethods, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._risefallthreemethods.is_ready:
                # The current value of self._risefallthreemethods is represented by self._risefallthreemethods.current.value
                self.plot("RiseFallThreeMethods", "risefallthreemethods", self._risefallthreemethods.current.value)
                
    

    The following reference table describes the RiseFallThreeMethods constructor:

    RiseFallThreeMethods

    class QuantConnect.Indicators.CandlestickPatterns.RiseFallThreeMethods [source]

    Rising/Falling Three Methods candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RiseFallThreeMethods

    class QuantConnect.Indicators.CandlestickPatterns.RiseFallThreeMethods [source]

    Rising/Falling Three Methods candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Separating Lines

    Introduction

    Create a new Separating Lines candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using SeparatingLines Indicator

    To create an automatic indicators for SeparatingLines , call the SeparatingLines helper method from the QCAlgorithm class. The SeparatingLines method creates a SeparatingLines object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class SeparatingLinesAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SeparatingLines _separatinglines;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _separatinglines = CandlestickPatterns.SeparatingLines(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_separatinglines.IsReady)
            {
                // The current value of _separatinglines is represented by itself (_separatinglines)
                // or _separatinglines.Current.Value
                Plot("SeparatingLines", "separatinglines", _separatinglines);
                
            }
        }
    }
    class SeparatingLinesAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._separatinglines = self.CandlestickPatterns.separatinglines(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._separatinglines.is_ready:
                # The current value of self._separatinglines is represented by self._separatinglines.current.value
                self.plot("SeparatingLines", "separatinglines", self._separatinglines.current.value)
                
    

    The following reference table describes the SeparatingLines method:

    separating_lines( symbol, resolution=None, selector=None )

    Creates a new SeparatingLines pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    SeparatingLines

    SeparatingLines( symbol, resolution=None, selector=None )

    Creates a new SeparatingLines pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    SeparatingLines

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a SeparatingLines indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class SeparatingLinesAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SeparatingLines _separatinglines;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _separatinglines = new SeparatingLines();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _separatinglines.Update(bar);
            }
       
            if (_separatinglines.IsReady)
            {
                // The current value of _separatinglines is represented by itself (_separatinglines)
                // or _separatinglines.Current.Value
                Plot("SeparatingLines", "separatinglines", _separatinglines);
                
            }
        }
    }
    class SeparatingLinesAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._separatinglines = SeparatingLines()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._separatinglines.update(bar)
            if self._separatinglines.is_ready:
                # The current value of self._separatinglines is represented by self._separatinglines.current.value
                self.plot("SeparatingLines", "separatinglines", self._separatinglines.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class SeparatingLinesAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SeparatingLines _separatinglines;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _separatinglines = new SeparatingLines();
            RegisterIndicator(_symbol, _separatinglines, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_separatinglines.IsReady)
            {
                // The current value of _separatinglines is represented by itself (_separatinglines)
                // or _separatinglines.Current.Value
                Plot("SeparatingLines", "separatinglines", _separatinglines);
                
            }
        }
    }
    class SeparatingLinesAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._separatinglines = SeparatingLines()
            self.register_indicator(self._symbol, self._separatinglines, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._separatinglines.is_ready:
                # The current value of self._separatinglines is represented by self._separatinglines.current.value
                self.plot("SeparatingLines", "separatinglines", self._separatinglines.current.value)
                
    

    The following reference table describes the SeparatingLines constructor:

    SeparatingLines

    class QuantConnect.Indicators.CandlestickPatterns.SeparatingLines [source]

    Separating Lines candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SeparatingLines

    class QuantConnect.Indicators.CandlestickPatterns.SeparatingLines [source]

    Separating Lines candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Shooting Star

    Introduction

    Create a new Shooting Star candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ShootingStar Indicator

    To create an automatic indicators for ShootingStar , call the ShootingStar helper method from the QCAlgorithm class. The ShootingStar method creates a ShootingStar object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ShootingStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ShootingStar _shootingstar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _shootingstar = CandlestickPatterns.ShootingStar(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_shootingstar.IsReady)
            {
                // The current value of _shootingstar is represented by itself (_shootingstar)
                // or _shootingstar.Current.Value
                Plot("ShootingStar", "shootingstar", _shootingstar);
                
            }
        }
    }
    class ShootingStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._shootingstar = self.CandlestickPatterns.shootingstar(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._shootingstar.is_ready:
                # The current value of self._shootingstar is represented by self._shootingstar.current.value
                self.plot("ShootingStar", "shootingstar", self._shootingstar.current.value)
                
    

    The following reference table describes the ShootingStar method:

    shooting_star( symbol, resolution=None, selector=None )

    Creates a new ShootingStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ShootingStar

    ShootingStar( symbol, resolution=None, selector=None )

    Creates a new ShootingStar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ShootingStar

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ShootingStar indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ShootingStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ShootingStar _shootingstar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _shootingstar = new ShootingStar();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _shootingstar.Update(bar);
            }
       
            if (_shootingstar.IsReady)
            {
                // The current value of _shootingstar is represented by itself (_shootingstar)
                // or _shootingstar.Current.Value
                Plot("ShootingStar", "shootingstar", _shootingstar);
                
            }
        }
    }
    class ShootingStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._shootingstar = ShootingStar()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._shootingstar.update(bar)
            if self._shootingstar.is_ready:
                # The current value of self._shootingstar is represented by self._shootingstar.current.value
                self.plot("ShootingStar", "shootingstar", self._shootingstar.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ShootingStarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ShootingStar _shootingstar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _shootingstar = new ShootingStar();
            RegisterIndicator(_symbol, _shootingstar, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_shootingstar.IsReady)
            {
                // The current value of _shootingstar is represented by itself (_shootingstar)
                // or _shootingstar.Current.Value
                Plot("ShootingStar", "shootingstar", _shootingstar);
                
            }
        }
    }
    class ShootingStarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._shootingstar = ShootingStar()
            self.register_indicator(self._symbol, self._shootingstar, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._shootingstar.is_ready:
                # The current value of self._shootingstar is represented by self._shootingstar.current.value
                self.plot("ShootingStar", "shootingstar", self._shootingstar.current.value)
                
    

    The following reference table describes the ShootingStar constructor:

    ShootingStar

    class QuantConnect.Indicators.CandlestickPatterns.ShootingStar [source]

    Shooting Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ShootingStar

    class QuantConnect.Indicators.CandlestickPatterns.ShootingStar [source]

    Shooting Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Short Line Candle

    Introduction

    Create a new Short Line Candle candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ShortLineCandle Indicator

    To create an automatic indicators for ShortLineCandle , call the ShortLineCandle helper method from the QCAlgorithm class. The ShortLineCandle method creates a ShortLineCandle object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ShortLineCandleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ShortLineCandle _shortlinecandle;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _shortlinecandle = CandlestickPatterns.ShortLineCandle(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_shortlinecandle.IsReady)
            {
                // The current value of _shortlinecandle is represented by itself (_shortlinecandle)
                // or _shortlinecandle.Current.Value
                Plot("ShortLineCandle", "shortlinecandle", _shortlinecandle);
                
            }
        }
    }
    class ShortLineCandleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._shortlinecandle = self.CandlestickPatterns.shortlinecandle(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._shortlinecandle.is_ready:
                # The current value of self._shortlinecandle is represented by self._shortlinecandle.current.value
                self.plot("ShortLineCandle", "shortlinecandle", self._shortlinecandle.current.value)
                
    

    The following reference table describes the ShortLineCandle method:

    short_line_candle( symbol, resolution=None, selector=None )

    Creates a new ShortLineCandle pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    intLineCandle

    ShortLineCandle( symbol, resolution=None, selector=None )

    Creates a new ShortLineCandle pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ShortLineCandle

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ShortLineCandle indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ShortLineCandleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ShortLineCandle _shortlinecandle;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _shortlinecandle = new ShortLineCandle();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _shortlinecandle.Update(bar);
            }
       
            if (_shortlinecandle.IsReady)
            {
                // The current value of _shortlinecandle is represented by itself (_shortlinecandle)
                // or _shortlinecandle.Current.Value
                Plot("ShortLineCandle", "shortlinecandle", _shortlinecandle);
                
            }
        }
    }
    class ShortLineCandleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._shortlinecandle = ShortLineCandle()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._shortlinecandle.update(bar)
            if self._shortlinecandle.is_ready:
                # The current value of self._shortlinecandle is represented by self._shortlinecandle.current.value
                self.plot("ShortLineCandle", "shortlinecandle", self._shortlinecandle.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ShortLineCandleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ShortLineCandle _shortlinecandle;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _shortlinecandle = new ShortLineCandle();
            RegisterIndicator(_symbol, _shortlinecandle, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_shortlinecandle.IsReady)
            {
                // The current value of _shortlinecandle is represented by itself (_shortlinecandle)
                // or _shortlinecandle.Current.Value
                Plot("ShortLineCandle", "shortlinecandle", _shortlinecandle);
                
            }
        }
    }
    class ShortLineCandleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._shortlinecandle = ShortLineCandle()
            self.register_indicator(self._symbol, self._shortlinecandle, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._shortlinecandle.is_ready:
                # The current value of self._shortlinecandle is represented by self._shortlinecandle.current.value
                self.plot("ShortLineCandle", "shortlinecandle", self._shortlinecandle.current.value)
                
    

    The following reference table describes the ShortLineCandle constructor:

    ShortLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle [source]

    Short Line Candle candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ShortLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle [source]

    Short Line Candle candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Spinning Top

    Introduction

    Create a new Spinning Top candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using SpinningTop Indicator

    To create an automatic indicators for SpinningTop , call the SpinningTop helper method from the QCAlgorithm class. The SpinningTop method creates a SpinningTop object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class SpinningTopAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SpinningTop _spinningtop;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _spinningtop = CandlestickPatterns.SpinningTop(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_spinningtop.IsReady)
            {
                // The current value of _spinningtop is represented by itself (_spinningtop)
                // or _spinningtop.Current.Value
                Plot("SpinningTop", "spinningtop", _spinningtop);
                
            }
        }
    }
    class SpinningTopAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._spinningtop = self.CandlestickPatterns.spinningtop(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._spinningtop.is_ready:
                # The current value of self._spinningtop is represented by self._spinningtop.current.value
                self.plot("SpinningTop", "spinningtop", self._spinningtop.current.value)
                
    

    The following reference table describes the SpinningTop method:

    spinning_top( symbol, resolution=None, selector=None )

    Creates a new SpinningTop pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    SpinningTop

    SpinningTop( symbol, resolution=None, selector=None )

    Creates a new SpinningTop pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    SpinningTop

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a SpinningTop indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class SpinningTopAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SpinningTop _spinningtop;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _spinningtop = new SpinningTop();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _spinningtop.Update(bar);
            }
       
            if (_spinningtop.IsReady)
            {
                // The current value of _spinningtop is represented by itself (_spinningtop)
                // or _spinningtop.Current.Value
                Plot("SpinningTop", "spinningtop", _spinningtop);
                
            }
        }
    }
    class SpinningTopAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._spinningtop = SpinningTop()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._spinningtop.update(bar)
            if self._spinningtop.is_ready:
                # The current value of self._spinningtop is represented by self._spinningtop.current.value
                self.plot("SpinningTop", "spinningtop", self._spinningtop.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class SpinningTopAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SpinningTop _spinningtop;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _spinningtop = new SpinningTop();
            RegisterIndicator(_symbol, _spinningtop, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_spinningtop.IsReady)
            {
                // The current value of _spinningtop is represented by itself (_spinningtop)
                // or _spinningtop.Current.Value
                Plot("SpinningTop", "spinningtop", _spinningtop);
                
            }
        }
    }
    class SpinningTopAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._spinningtop = SpinningTop()
            self.register_indicator(self._symbol, self._spinningtop, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._spinningtop.is_ready:
                # The current value of self._spinningtop is represented by self._spinningtop.current.value
                self.plot("SpinningTop", "spinningtop", self._spinningtop.current.value)
                
    

    The following reference table describes the SpinningTop constructor:

    SpinningTop

    class QuantConnect.Indicators.CandlestickPatterns.SpinningTop [source]

    Spinning Top candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SpinningTop

    class QuantConnect.Indicators.CandlestickPatterns.SpinningTop [source]

    Spinning Top candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Stalled Pattern

    Introduction

    Create a new Stalled Pattern candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using StalledPattern Indicator

    To create an automatic indicators for StalledPattern , call the StalledPattern helper method from the QCAlgorithm class. The StalledPattern method creates a StalledPattern object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class StalledPatternAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private StalledPattern _stalledpattern;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _stalledpattern = CandlestickPatterns.StalledPattern(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_stalledpattern.IsReady)
            {
                // The current value of _stalledpattern is represented by itself (_stalledpattern)
                // or _stalledpattern.Current.Value
                Plot("StalledPattern", "stalledpattern", _stalledpattern);
                
            }
        }
    }
    class StalledPatternAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._stalledpattern = self.CandlestickPatterns.stalledpattern(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._stalledpattern.is_ready:
                # The current value of self._stalledpattern is represented by self._stalledpattern.current.value
                self.plot("StalledPattern", "stalledpattern", self._stalledpattern.current.value)
                
    

    The following reference table describes the StalledPattern method:

    stalled_pattern( symbol, resolution=None, selector=None )

    Creates a new StalledPattern pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    StalledPattern

    StalledPattern( symbol, resolution=None, selector=None )

    Creates a new StalledPattern pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    StalledPattern

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a StalledPattern indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class StalledPatternAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private StalledPattern _stalledpattern;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _stalledpattern = new StalledPattern();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _stalledpattern.Update(bar);
            }
       
            if (_stalledpattern.IsReady)
            {
                // The current value of _stalledpattern is represented by itself (_stalledpattern)
                // or _stalledpattern.Current.Value
                Plot("StalledPattern", "stalledpattern", _stalledpattern);
                
            }
        }
    }
    class StalledPatternAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._stalledpattern = StalledPattern()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._stalledpattern.update(bar)
            if self._stalledpattern.is_ready:
                # The current value of self._stalledpattern is represented by self._stalledpattern.current.value
                self.plot("StalledPattern", "stalledpattern", self._stalledpattern.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class StalledPatternAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private StalledPattern _stalledpattern;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _stalledpattern = new StalledPattern();
            RegisterIndicator(_symbol, _stalledpattern, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_stalledpattern.IsReady)
            {
                // The current value of _stalledpattern is represented by itself (_stalledpattern)
                // or _stalledpattern.Current.Value
                Plot("StalledPattern", "stalledpattern", _stalledpattern);
                
            }
        }
    }
    class StalledPatternAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._stalledpattern = StalledPattern()
            self.register_indicator(self._symbol, self._stalledpattern, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._stalledpattern.is_ready:
                # The current value of self._stalledpattern is represented by self._stalledpattern.current.value
                self.plot("StalledPattern", "stalledpattern", self._stalledpattern.current.value)
                
    

    The following reference table describes the StalledPattern constructor:

    StalledPattern

    class QuantConnect.Indicators.CandlestickPatterns.StalledPattern [source]

    Stalled Pattern candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    StalledPattern

    class QuantConnect.Indicators.CandlestickPatterns.StalledPattern [source]

    Stalled Pattern candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Stick Sandwich

    Introduction

    Create a new Stick Sandwich candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using StickSandwich Indicator

    To create an automatic indicators for StickSandwich , call the StickSandwich helper method from the QCAlgorithm class. The StickSandwich method creates a StickSandwich object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class StickSandwichAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private StickSandwich _sticksandwich;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sticksandwich = CandlestickPatterns.StickSandwich(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_sticksandwich.IsReady)
            {
                // The current value of _sticksandwich is represented by itself (_sticksandwich)
                // or _sticksandwich.Current.Value
                Plot("StickSandwich", "sticksandwich", _sticksandwich);
                
            }
        }
    }
    class StickSandwichAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sticksandwich = self.CandlestickPatterns.sticksandwich(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._sticksandwich.is_ready:
                # The current value of self._sticksandwich is represented by self._sticksandwich.current.value
                self.plot("StickSandwich", "sticksandwich", self._sticksandwich.current.value)
                
    

    The following reference table describes the StickSandwich method:

    stick_sandwich( symbol, resolution=None, selector=None )

    Creates a new StickSandwich pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    StickSandwich

    StickSandwich( symbol, resolution=None, selector=None )

    Creates a new StickSandwich pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    StickSandwich

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a StickSandwich indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class StickSandwichAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private StickSandwich _sticksandwich;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sticksandwich = new StickSandwich();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _sticksandwich.Update(bar);
            }
       
            if (_sticksandwich.IsReady)
            {
                // The current value of _sticksandwich is represented by itself (_sticksandwich)
                // or _sticksandwich.Current.Value
                Plot("StickSandwich", "sticksandwich", _sticksandwich);
                
            }
        }
    }
    class StickSandwichAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sticksandwich = StickSandwich()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._sticksandwich.update(bar)
            if self._sticksandwich.is_ready:
                # The current value of self._sticksandwich is represented by self._sticksandwich.current.value
                self.plot("StickSandwich", "sticksandwich", self._sticksandwich.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class StickSandwichAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private StickSandwich _sticksandwich;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sticksandwich = new StickSandwich();
            RegisterIndicator(_symbol, _sticksandwich, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_sticksandwich.IsReady)
            {
                // The current value of _sticksandwich is represented by itself (_sticksandwich)
                // or _sticksandwich.Current.Value
                Plot("StickSandwich", "sticksandwich", _sticksandwich);
                
            }
        }
    }
    class StickSandwichAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sticksandwich = StickSandwich()
            self.register_indicator(self._symbol, self._sticksandwich, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._sticksandwich.is_ready:
                # The current value of self._sticksandwich is represented by self._sticksandwich.current.value
                self.plot("StickSandwich", "sticksandwich", self._sticksandwich.current.value)
                
    

    The following reference table describes the StickSandwich constructor:

    StickSandwich

    class QuantConnect.Indicators.CandlestickPatterns.StickSandwich [source]

    Stick Sandwich candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    StickSandwich

    class QuantConnect.Indicators.CandlestickPatterns.StickSandwich [source]

    Stick Sandwich candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Takuri

    Introduction

    Create a new Takuri (Dragonfly Doji with very long lower shadow) candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Takuri Indicator

    To create an automatic indicators for Takuri , call the Takuri helper method from the QCAlgorithm class. The Takuri method creates a Takuri object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TakuriAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Takuri _takuri;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _takuri = CandlestickPatterns.Takuri(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_takuri.IsReady)
            {
                // The current value of _takuri is represented by itself (_takuri)
                // or _takuri.Current.Value
                Plot("Takuri", "takuri", _takuri);
                
            }
        }
    }
    class TakuriAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._takuri = self.CandlestickPatterns.takuri(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._takuri.is_ready:
                # The current value of self._takuri is represented by self._takuri.current.value
                self.plot("Takuri", "takuri", self._takuri.current.value)
                
    

    The following reference table describes the Takuri method:

    takuri( symbol, resolution=None, selector=None )

    Creates a new Takuri pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Takuri

    Takuri( symbol, resolution=None, selector=None )

    Creates a new Takuri pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Takuri

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Takuri indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class TakuriAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Takuri _takuri;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _takuri = new Takuri();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _takuri.Update(bar);
            }
       
            if (_takuri.IsReady)
            {
                // The current value of _takuri is represented by itself (_takuri)
                // or _takuri.Current.Value
                Plot("Takuri", "takuri", _takuri);
                
            }
        }
    }
    class TakuriAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._takuri = Takuri()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._takuri.update(bar)
            if self._takuri.is_ready:
                # The current value of self._takuri is represented by self._takuri.current.value
                self.plot("Takuri", "takuri", self._takuri.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TakuriAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Takuri _takuri;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _takuri = new Takuri();
            RegisterIndicator(_symbol, _takuri, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_takuri.IsReady)
            {
                // The current value of _takuri is represented by itself (_takuri)
                // or _takuri.Current.Value
                Plot("Takuri", "takuri", _takuri);
                
            }
        }
    }
    class TakuriAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._takuri = Takuri()
            self.register_indicator(self._symbol, self._takuri, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._takuri.is_ready:
                # The current value of self._takuri is represented by self._takuri.current.value
                self.plot("Takuri", "takuri", self._takuri.current.value)
                
    

    The following reference table describes the Takuri constructor:

    Takuri

    class QuantConnect.Indicators.CandlestickPatterns.Takuri [source]

    Takuri (Dragonfly Doji with very long lower shadow) candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Takuri

    class QuantConnect.Indicators.CandlestickPatterns.Takuri [source]

    Takuri (Dragonfly Doji with very long lower shadow) candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Tasuki Gap

    Introduction

    Create a new Tasuki Gap candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using TasukiGap Indicator

    To create an automatic indicators for TasukiGap , call the TasukiGap helper method from the QCAlgorithm class. The TasukiGap method creates a TasukiGap object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TasukiGapAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TasukiGap _tasukigap;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tasukigap = CandlestickPatterns.TasukiGap(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_tasukigap.IsReady)
            {
                // The current value of _tasukigap is represented by itself (_tasukigap)
                // or _tasukigap.Current.Value
                Plot("TasukiGap", "tasukigap", _tasukigap);
                
            }
        }
    }
    class TasukiGapAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tasukigap = self.CandlestickPatterns.tasukigap(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._tasukigap.is_ready:
                # The current value of self._tasukigap is represented by self._tasukigap.current.value
                self.plot("TasukiGap", "tasukigap", self._tasukigap.current.value)
                
    

    The following reference table describes the TasukiGap method:

    tasuki_gap( symbol, resolution=None, selector=None )

    Creates a new TasukiGap pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    TasukiGap

    TasukiGap( symbol, resolution=None, selector=None )

    Creates a new TasukiGap pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    TasukiGap

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a TasukiGap indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class TasukiGapAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TasukiGap _tasukigap;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tasukigap = new TasukiGap();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _tasukigap.Update(bar);
            }
       
            if (_tasukigap.IsReady)
            {
                // The current value of _tasukigap is represented by itself (_tasukigap)
                // or _tasukigap.Current.Value
                Plot("TasukiGap", "tasukigap", _tasukigap);
                
            }
        }
    }
    class TasukiGapAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tasukigap = TasukiGap()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._tasukigap.update(bar)
            if self._tasukigap.is_ready:
                # The current value of self._tasukigap is represented by self._tasukigap.current.value
                self.plot("TasukiGap", "tasukigap", self._tasukigap.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TasukiGapAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TasukiGap _tasukigap;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tasukigap = new TasukiGap();
            RegisterIndicator(_symbol, _tasukigap, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_tasukigap.IsReady)
            {
                // The current value of _tasukigap is represented by itself (_tasukigap)
                // or _tasukigap.Current.Value
                Plot("TasukiGap", "tasukigap", _tasukigap);
                
            }
        }
    }
    class TasukiGapAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tasukigap = TasukiGap()
            self.register_indicator(self._symbol, self._tasukigap, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._tasukigap.is_ready:
                # The current value of self._tasukigap is represented by self._tasukigap.current.value
                self.plot("TasukiGap", "tasukigap", self._tasukigap.current.value)
                
    

    The following reference table describes the TasukiGap constructor:

    TasukiGap

    class QuantConnect.Indicators.CandlestickPatterns.TasukiGap [source]

    Tasuki Gap candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TasukiGap

    class QuantConnect.Indicators.CandlestickPatterns.TasukiGap [source]

    Tasuki Gap candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Three Black Crows

    Introduction

    Create a new Three Black Crows candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ThreeBlackCrows Indicator

    To create an automatic indicators for ThreeBlackCrows , call the ThreeBlackCrows helper method from the QCAlgorithm class. The ThreeBlackCrows method creates a ThreeBlackCrows object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ThreeBlackCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeBlackCrows _threeblackcrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threeblackcrows = CandlestickPatterns.ThreeBlackCrows(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_threeblackcrows.IsReady)
            {
                // The current value of _threeblackcrows is represented by itself (_threeblackcrows)
                // or _threeblackcrows.Current.Value
                Plot("ThreeBlackCrows", "threeblackcrows", _threeblackcrows);
                
            }
        }
    }
    class ThreeBlackCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threeblackcrows = self.CandlestickPatterns.threeblackcrows(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._threeblackcrows.is_ready:
                # The current value of self._threeblackcrows is represented by self._threeblackcrows.current.value
                self.plot("ThreeBlackCrows", "threeblackcrows", self._threeblackcrows.current.value)
                
    

    The following reference table describes the ThreeBlackCrows method:

    three_black_crows( symbol, resolution=None, selector=None )

    Creates a new ThreeBlackCrows pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeBlackCrows

    ThreeBlackCrows( symbol, resolution=None, selector=None )

    Creates a new ThreeBlackCrows pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeBlackCrows

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ThreeBlackCrows indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ThreeBlackCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeBlackCrows _threeblackcrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threeblackcrows = new ThreeBlackCrows();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _threeblackcrows.Update(bar);
            }
       
            if (_threeblackcrows.IsReady)
            {
                // The current value of _threeblackcrows is represented by itself (_threeblackcrows)
                // or _threeblackcrows.Current.Value
                Plot("ThreeBlackCrows", "threeblackcrows", _threeblackcrows);
                
            }
        }
    }
    class ThreeBlackCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threeblackcrows = ThreeBlackCrows()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._threeblackcrows.update(bar)
            if self._threeblackcrows.is_ready:
                # The current value of self._threeblackcrows is represented by self._threeblackcrows.current.value
                self.plot("ThreeBlackCrows", "threeblackcrows", self._threeblackcrows.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ThreeBlackCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeBlackCrows _threeblackcrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threeblackcrows = new ThreeBlackCrows();
            RegisterIndicator(_symbol, _threeblackcrows, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_threeblackcrows.IsReady)
            {
                // The current value of _threeblackcrows is represented by itself (_threeblackcrows)
                // or _threeblackcrows.Current.Value
                Plot("ThreeBlackCrows", "threeblackcrows", _threeblackcrows);
                
            }
        }
    }
    class ThreeBlackCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threeblackcrows = ThreeBlackCrows()
            self.register_indicator(self._symbol, self._threeblackcrows, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._threeblackcrows.is_ready:
                # The current value of self._threeblackcrows is represented by self._threeblackcrows.current.value
                self.plot("ThreeBlackCrows", "threeblackcrows", self._threeblackcrows.current.value)
                
    

    The following reference table describes the ThreeBlackCrows constructor:

    ThreeBlackCrows

    class QuantConnect.Indicators.CandlestickPatterns.ThreeBlackCrows [source]

    Three Black Crows candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeBlackCrows

    class QuantConnect.Indicators.CandlestickPatterns.ThreeBlackCrows [source]

    Three Black Crows candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Three Inside

    Introduction

    Create a new Three Inside Up/Down candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ThreeInside Indicator

    To create an automatic indicators for ThreeInside , call the ThreeInside helper method from the QCAlgorithm class. The ThreeInside method creates a ThreeInside object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ThreeInsideAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeInside _threeinside;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threeinside = CandlestickPatterns.ThreeInside(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_threeinside.IsReady)
            {
                // The current value of _threeinside is represented by itself (_threeinside)
                // or _threeinside.Current.Value
                Plot("ThreeInside", "threeinside", _threeinside);
                
            }
        }
    }
    class ThreeInsideAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threeinside = self.CandlestickPatterns.threeinside(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._threeinside.is_ready:
                # The current value of self._threeinside is represented by self._threeinside.current.value
                self.plot("ThreeInside", "threeinside", self._threeinside.current.value)
                
    

    The following reference table describes the ThreeInside method:

    three_inside( symbol, resolution=None, selector=None )

    Creates a new ThreeInside pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeInside

    ThreeInside( symbol, resolution=None, selector=None )

    Creates a new ThreeInside pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeInside

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ThreeInside indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ThreeInsideAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeInside _threeinside;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threeinside = new ThreeInside();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _threeinside.Update(bar);
            }
       
            if (_threeinside.IsReady)
            {
                // The current value of _threeinside is represented by itself (_threeinside)
                // or _threeinside.Current.Value
                Plot("ThreeInside", "threeinside", _threeinside);
                
            }
        }
    }
    class ThreeInsideAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threeinside = ThreeInside()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._threeinside.update(bar)
            if self._threeinside.is_ready:
                # The current value of self._threeinside is represented by self._threeinside.current.value
                self.plot("ThreeInside", "threeinside", self._threeinside.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ThreeInsideAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeInside _threeinside;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threeinside = new ThreeInside();
            RegisterIndicator(_symbol, _threeinside, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_threeinside.IsReady)
            {
                // The current value of _threeinside is represented by itself (_threeinside)
                // or _threeinside.Current.Value
                Plot("ThreeInside", "threeinside", _threeinside);
                
            }
        }
    }
    class ThreeInsideAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threeinside = ThreeInside()
            self.register_indicator(self._symbol, self._threeinside, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._threeinside.is_ready:
                # The current value of self._threeinside is represented by self._threeinside.current.value
                self.plot("ThreeInside", "threeinside", self._threeinside.current.value)
                
    

    The following reference table describes the ThreeInside constructor:

    ThreeInside

    class QuantConnect.Indicators.CandlestickPatterns.ThreeInside [source]

    Three Inside Up/Down candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeInside

    class QuantConnect.Indicators.CandlestickPatterns.ThreeInside [source]

    Three Inside Up/Down candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Three Line Strike

    Introduction

    Create a new Three Line Strike candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ThreeLineStrike Indicator

    To create an automatic indicators for ThreeLineStrike , call the ThreeLineStrike helper method from the QCAlgorithm class. The ThreeLineStrike method creates a ThreeLineStrike object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ThreeLineStrikeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeLineStrike _threelinestrike;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threelinestrike = CandlestickPatterns.ThreeLineStrike(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_threelinestrike.IsReady)
            {
                // The current value of _threelinestrike is represented by itself (_threelinestrike)
                // or _threelinestrike.Current.Value
                Plot("ThreeLineStrike", "threelinestrike", _threelinestrike);
                
            }
        }
    }
    class ThreeLineStrikeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threelinestrike = self.CandlestickPatterns.threelinestrike(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._threelinestrike.is_ready:
                # The current value of self._threelinestrike is represented by self._threelinestrike.current.value
                self.plot("ThreeLineStrike", "threelinestrike", self._threelinestrike.current.value)
                
    

    The following reference table describes the ThreeLineStrike method:

    three_line_strike( symbol, resolution=None, selector=None )

    Creates a new ThreeLineStrike pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeLineStrike

    ThreeLineStrike( symbol, resolution=None, selector=None )

    Creates a new ThreeLineStrike pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeLineStrike

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ThreeLineStrike indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ThreeLineStrikeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeLineStrike _threelinestrike;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threelinestrike = new ThreeLineStrike();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _threelinestrike.Update(bar);
            }
       
            if (_threelinestrike.IsReady)
            {
                // The current value of _threelinestrike is represented by itself (_threelinestrike)
                // or _threelinestrike.Current.Value
                Plot("ThreeLineStrike", "threelinestrike", _threelinestrike);
                
            }
        }
    }
    class ThreeLineStrikeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threelinestrike = ThreeLineStrike()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._threelinestrike.update(bar)
            if self._threelinestrike.is_ready:
                # The current value of self._threelinestrike is represented by self._threelinestrike.current.value
                self.plot("ThreeLineStrike", "threelinestrike", self._threelinestrike.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ThreeLineStrikeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeLineStrike _threelinestrike;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threelinestrike = new ThreeLineStrike();
            RegisterIndicator(_symbol, _threelinestrike, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_threelinestrike.IsReady)
            {
                // The current value of _threelinestrike is represented by itself (_threelinestrike)
                // or _threelinestrike.Current.Value
                Plot("ThreeLineStrike", "threelinestrike", _threelinestrike);
                
            }
        }
    }
    class ThreeLineStrikeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threelinestrike = ThreeLineStrike()
            self.register_indicator(self._symbol, self._threelinestrike, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._threelinestrike.is_ready:
                # The current value of self._threelinestrike is represented by self._threelinestrike.current.value
                self.plot("ThreeLineStrike", "threelinestrike", self._threelinestrike.current.value)
                
    

    The following reference table describes the ThreeLineStrike constructor:

    ThreeLineStrike

    class QuantConnect.Indicators.CandlestickPatterns.ThreeLineStrike [source]

    Three Line Strike candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeLineStrike

    class QuantConnect.Indicators.CandlestickPatterns.ThreeLineStrike [source]

    Three Line Strike candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Three Outside

    Introduction

    Create a new Three Outside Up/Down candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ThreeOutside Indicator

    To create an automatic indicators for ThreeOutside , call the ThreeOutside helper method from the QCAlgorithm class. The ThreeOutside method creates a ThreeOutside object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ThreeOutsideAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeOutside _threeoutside;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threeoutside = CandlestickPatterns.ThreeOutside(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_threeoutside.IsReady)
            {
                // The current value of _threeoutside is represented by itself (_threeoutside)
                // or _threeoutside.Current.Value
                Plot("ThreeOutside", "threeoutside", _threeoutside);
                
            }
        }
    }
    class ThreeOutsideAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threeoutside = self.CandlestickPatterns.threeoutside(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._threeoutside.is_ready:
                # The current value of self._threeoutside is represented by self._threeoutside.current.value
                self.plot("ThreeOutside", "threeoutside", self._threeoutside.current.value)
                
    

    The following reference table describes the ThreeOutside method:

    three_outside( symbol, resolution=None, selector=None )

    Creates a new ThreeOutside pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeOutside

    ThreeOutside( symbol, resolution=None, selector=None )

    Creates a new ThreeOutside pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeOutside

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ThreeOutside indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ThreeOutsideAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeOutside _threeoutside;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threeoutside = new ThreeOutside();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _threeoutside.Update(bar);
            }
       
            if (_threeoutside.IsReady)
            {
                // The current value of _threeoutside is represented by itself (_threeoutside)
                // or _threeoutside.Current.Value
                Plot("ThreeOutside", "threeoutside", _threeoutside);
                
            }
        }
    }
    class ThreeOutsideAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threeoutside = ThreeOutside()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._threeoutside.update(bar)
            if self._threeoutside.is_ready:
                # The current value of self._threeoutside is represented by self._threeoutside.current.value
                self.plot("ThreeOutside", "threeoutside", self._threeoutside.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ThreeOutsideAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeOutside _threeoutside;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threeoutside = new ThreeOutside();
            RegisterIndicator(_symbol, _threeoutside, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_threeoutside.IsReady)
            {
                // The current value of _threeoutside is represented by itself (_threeoutside)
                // or _threeoutside.Current.Value
                Plot("ThreeOutside", "threeoutside", _threeoutside);
                
            }
        }
    }
    class ThreeOutsideAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threeoutside = ThreeOutside()
            self.register_indicator(self._symbol, self._threeoutside, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._threeoutside.is_ready:
                # The current value of self._threeoutside is represented by self._threeoutside.current.value
                self.plot("ThreeOutside", "threeoutside", self._threeoutside.current.value)
                
    

    The following reference table describes the ThreeOutside constructor:

    ThreeOutside

    class QuantConnect.Indicators.CandlestickPatterns.ThreeOutside [source]

    Three Outside Up/Down candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeOutside

    class QuantConnect.Indicators.CandlestickPatterns.ThreeOutside [source]

    Three Outside Up/Down candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Three Stars In South

    Introduction

    Create a new Three Stars In The South candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ThreeStarsInSouth Indicator

    To create an automatic indicators for ThreeStarsInSouth , call the ThreeStarsInSouth helper method from the QCAlgorithm class. The ThreeStarsInSouth method creates a ThreeStarsInSouth object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ThreeStarsInSouthAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeStarsInSouth _threestarsinsouth;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threestarsinsouth = CandlestickPatterns.ThreeStarsInSouth(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_threestarsinsouth.IsReady)
            {
                // The current value of _threestarsinsouth is represented by itself (_threestarsinsouth)
                // or _threestarsinsouth.Current.Value
                Plot("ThreeStarsInSouth", "threestarsinsouth", _threestarsinsouth);
                
            }
        }
    }
    class ThreeStarsInSouthAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threestarsinsouth = self.CandlestickPatterns.threestarsinsouth(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._threestarsinsouth.is_ready:
                # The current value of self._threestarsinsouth is represented by self._threestarsinsouth.current.value
                self.plot("ThreeStarsInSouth", "threestarsinsouth", self._threestarsinsouth.current.value)
                
    

    The following reference table describes the ThreeStarsInSouth method:

    three_stars_in_south( symbol, resolution=None, selector=None )

    Creates a new ThreeStarsInSouth pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeStarsInSouth

    ThreeStarsInSouth( symbol, resolution=None, selector=None )

    Creates a new ThreeStarsInSouth pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeStarsInSouth

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ThreeStarsInSouth indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ThreeStarsInSouthAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeStarsInSouth _threestarsinsouth;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threestarsinsouth = new ThreeStarsInSouth();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _threestarsinsouth.Update(bar);
            }
       
            if (_threestarsinsouth.IsReady)
            {
                // The current value of _threestarsinsouth is represented by itself (_threestarsinsouth)
                // or _threestarsinsouth.Current.Value
                Plot("ThreeStarsInSouth", "threestarsinsouth", _threestarsinsouth);
                
            }
        }
    }
    class ThreeStarsInSouthAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threestarsinsouth = ThreeStarsInSouth()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._threestarsinsouth.update(bar)
            if self._threestarsinsouth.is_ready:
                # The current value of self._threestarsinsouth is represented by self._threestarsinsouth.current.value
                self.plot("ThreeStarsInSouth", "threestarsinsouth", self._threestarsinsouth.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ThreeStarsInSouthAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeStarsInSouth _threestarsinsouth;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threestarsinsouth = new ThreeStarsInSouth();
            RegisterIndicator(_symbol, _threestarsinsouth, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_threestarsinsouth.IsReady)
            {
                // The current value of _threestarsinsouth is represented by itself (_threestarsinsouth)
                // or _threestarsinsouth.Current.Value
                Plot("ThreeStarsInSouth", "threestarsinsouth", _threestarsinsouth);
                
            }
        }
    }
    class ThreeStarsInSouthAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threestarsinsouth = ThreeStarsInSouth()
            self.register_indicator(self._symbol, self._threestarsinsouth, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._threestarsinsouth.is_ready:
                # The current value of self._threestarsinsouth is represented by self._threestarsinsouth.current.value
                self.plot("ThreeStarsInSouth", "threestarsinsouth", self._threestarsinsouth.current.value)
                
    

    The following reference table describes the ThreeStarsInSouth constructor:

    ThreeStarsInSouth

    class QuantConnect.Indicators.CandlestickPatterns.ThreeStarsInSouth [source]

    Three Stars In The South candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeStarsInSouth

    class QuantConnect.Indicators.CandlestickPatterns.ThreeStarsInSouth [source]

    Three Stars In The South candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Three White Soldiers

    Introduction

    Create a new Three Advancing White Soldiers candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using ThreeWhiteSoldiers Indicator

    To create an automatic indicators for ThreeWhiteSoldiers , call the ThreeWhiteSoldiers helper method from the QCAlgorithm class. The ThreeWhiteSoldiers method creates a ThreeWhiteSoldiers object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ThreeWhiteSoldiersAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeWhiteSoldiers _threewhitesoldiers;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threewhitesoldiers = CandlestickPatterns.ThreeWhiteSoldiers(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_threewhitesoldiers.IsReady)
            {
                // The current value of _threewhitesoldiers is represented by itself (_threewhitesoldiers)
                // or _threewhitesoldiers.Current.Value
                Plot("ThreeWhiteSoldiers", "threewhitesoldiers", _threewhitesoldiers);
                
            }
        }
    }
    class ThreeWhiteSoldiersAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threewhitesoldiers = self.CandlestickPatterns.threewhitesoldiers(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._threewhitesoldiers.is_ready:
                # The current value of self._threewhitesoldiers is represented by self._threewhitesoldiers.current.value
                self.plot("ThreeWhiteSoldiers", "threewhitesoldiers", self._threewhitesoldiers.current.value)
                
    

    The following reference table describes the ThreeWhiteSoldiers method:

    three_white_soldiers( symbol, resolution=None, selector=None )

    Creates a new ThreeWhiteSoldiers pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeWhiteSoldiers

    ThreeWhiteSoldiers( symbol, resolution=None, selector=None )

    Creates a new ThreeWhiteSoldiers pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    ThreeWhiteSoldiers

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ThreeWhiteSoldiers indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ThreeWhiteSoldiersAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeWhiteSoldiers _threewhitesoldiers;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threewhitesoldiers = new ThreeWhiteSoldiers();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _threewhitesoldiers.Update(bar);
            }
       
            if (_threewhitesoldiers.IsReady)
            {
                // The current value of _threewhitesoldiers is represented by itself (_threewhitesoldiers)
                // or _threewhitesoldiers.Current.Value
                Plot("ThreeWhiteSoldiers", "threewhitesoldiers", _threewhitesoldiers);
                
            }
        }
    }
    class ThreeWhiteSoldiersAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threewhitesoldiers = ThreeWhiteSoldiers()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._threewhitesoldiers.update(bar)
            if self._threewhitesoldiers.is_ready:
                # The current value of self._threewhitesoldiers is represented by self._threewhitesoldiers.current.value
                self.plot("ThreeWhiteSoldiers", "threewhitesoldiers", self._threewhitesoldiers.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ThreeWhiteSoldiersAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ThreeWhiteSoldiers _threewhitesoldiers;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _threewhitesoldiers = new ThreeWhiteSoldiers();
            RegisterIndicator(_symbol, _threewhitesoldiers, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_threewhitesoldiers.IsReady)
            {
                // The current value of _threewhitesoldiers is represented by itself (_threewhitesoldiers)
                // or _threewhitesoldiers.Current.Value
                Plot("ThreeWhiteSoldiers", "threewhitesoldiers", _threewhitesoldiers);
                
            }
        }
    }
    class ThreeWhiteSoldiersAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._threewhitesoldiers = ThreeWhiteSoldiers()
            self.register_indicator(self._symbol, self._threewhitesoldiers, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._threewhitesoldiers.is_ready:
                # The current value of self._threewhitesoldiers is represented by self._threewhitesoldiers.current.value
                self.plot("ThreeWhiteSoldiers", "threewhitesoldiers", self._threewhitesoldiers.current.value)
                
    

    The following reference table describes the ThreeWhiteSoldiers constructor:

    ThreeWhiteSoldiers

    class QuantConnect.Indicators.CandlestickPatterns.ThreeWhiteSoldiers [source]

    Three Advancing White Soldiers candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeWhiteSoldiers

    class QuantConnect.Indicators.CandlestickPatterns.ThreeWhiteSoldiers [source]

    Three Advancing White Soldiers candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Thrusting

    Introduction

    Create a new Thrusting candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Thrusting Indicator

    To create an automatic indicators for Thrusting , call the Thrusting helper method from the QCAlgorithm class. The Thrusting method creates a Thrusting object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ThrustingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Thrusting _thrusting;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _thrusting = CandlestickPatterns.Thrusting(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_thrusting.IsReady)
            {
                // The current value of _thrusting is represented by itself (_thrusting)
                // or _thrusting.Current.Value
                Plot("Thrusting", "thrusting", _thrusting);
                
            }
        }
    }
    class ThrustingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._thrusting = self.CandlestickPatterns.thrusting(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._thrusting.is_ready:
                # The current value of self._thrusting is represented by self._thrusting.current.value
                self.plot("Thrusting", "thrusting", self._thrusting.current.value)
                
    

    The following reference table describes the Thrusting method:

    thrusting( symbol, resolution=None, selector=None )

    Creates a new Thrusting pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Thrusting

    Thrusting( symbol, resolution=None, selector=None )

    Creates a new Thrusting pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Thrusting

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Thrusting indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ThrustingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Thrusting _thrusting;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _thrusting = new Thrusting();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _thrusting.Update(bar);
            }
       
            if (_thrusting.IsReady)
            {
                // The current value of _thrusting is represented by itself (_thrusting)
                // or _thrusting.Current.Value
                Plot("Thrusting", "thrusting", _thrusting);
                
            }
        }
    }
    class ThrustingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._thrusting = Thrusting()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._thrusting.update(bar)
            if self._thrusting.is_ready:
                # The current value of self._thrusting is represented by self._thrusting.current.value
                self.plot("Thrusting", "thrusting", self._thrusting.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ThrustingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Thrusting _thrusting;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _thrusting = new Thrusting();
            RegisterIndicator(_symbol, _thrusting, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_thrusting.IsReady)
            {
                // The current value of _thrusting is represented by itself (_thrusting)
                // or _thrusting.Current.Value
                Plot("Thrusting", "thrusting", _thrusting);
                
            }
        }
    }
    class ThrustingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._thrusting = Thrusting()
            self.register_indicator(self._symbol, self._thrusting, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._thrusting.is_ready:
                # The current value of self._thrusting is represented by self._thrusting.current.value
                self.plot("Thrusting", "thrusting", self._thrusting.current.value)
                
    

    The following reference table describes the Thrusting constructor:

    Thrusting

    class QuantConnect.Indicators.CandlestickPatterns.Thrusting [source]

    Thrusting candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Thrusting

    class QuantConnect.Indicators.CandlestickPatterns.Thrusting [source]

    Thrusting candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Tristar

    Introduction

    Create a new Tristar candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using Tristar Indicator

    To create an automatic indicators for Tristar , call the Tristar helper method from the QCAlgorithm class. The Tristar method creates a Tristar object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TristarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Tristar _tristar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tristar = CandlestickPatterns.Tristar(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_tristar.IsReady)
            {
                // The current value of _tristar is represented by itself (_tristar)
                // or _tristar.Current.Value
                Plot("Tristar", "tristar", _tristar);
                
            }
        }
    }
    class TristarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tristar = self.CandlestickPatterns.tristar(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._tristar.is_ready:
                # The current value of self._tristar is represented by self._tristar.current.value
                self.plot("Tristar", "tristar", self._tristar.current.value)
                
    

    The following reference table describes the Tristar method:

    tristar( symbol, resolution=None, selector=None )

    Creates a new Tristar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Tristar

    Tristar( symbol, resolution=None, selector=None )

    Creates a new Tristar pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    Tristar

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Tristar indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class TristarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Tristar _tristar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tristar = new Tristar();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _tristar.Update(bar);
            }
       
            if (_tristar.IsReady)
            {
                // The current value of _tristar is represented by itself (_tristar)
                // or _tristar.Current.Value
                Plot("Tristar", "tristar", _tristar);
                
            }
        }
    }
    class TristarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tristar = Tristar()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._tristar.update(bar)
            if self._tristar.is_ready:
                # The current value of self._tristar is represented by self._tristar.current.value
                self.plot("Tristar", "tristar", self._tristar.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TristarAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Tristar _tristar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tristar = new Tristar();
            RegisterIndicator(_symbol, _tristar, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_tristar.IsReady)
            {
                // The current value of _tristar is represented by itself (_tristar)
                // or _tristar.Current.Value
                Plot("Tristar", "tristar", _tristar);
                
            }
        }
    }
    class TristarAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tristar = Tristar()
            self.register_indicator(self._symbol, self._tristar, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._tristar.is_ready:
                # The current value of self._tristar is represented by self._tristar.current.value
                self.plot("Tristar", "tristar", self._tristar.current.value)
                
    

    The following reference table describes the Tristar constructor:

    Tristar

    class QuantConnect.Indicators.CandlestickPatterns.Tristar [source]

    Tristar candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Tristar

    class QuantConnect.Indicators.CandlestickPatterns.Tristar [source]

    Tristar candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Two Crows

    Introduction

    Create a new Two Crows candlestick pattern indicator to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using TwoCrows Indicator

    To create an automatic indicators for TwoCrows , call the TwoCrows helper method from the QCAlgorithm class. The TwoCrows method creates a TwoCrows object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TwoCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TwoCrows _twocrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _twocrows = CandlestickPatterns.TwoCrows(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_twocrows.IsReady)
            {
                // The current value of _twocrows is represented by itself (_twocrows)
                // or _twocrows.Current.Value
                Plot("TwoCrows", "twocrows", _twocrows);
                
            }
        }
    }
    class TwoCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._twocrows = self.CandlestickPatterns.twocrows(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._twocrows.is_ready:
                # The current value of self._twocrows is represented by self._twocrows.current.value
                self.plot("TwoCrows", "twocrows", self._twocrows.current.value)
                
    

    The following reference table describes the TwoCrows method:

    two_crows( symbol, resolution=None, selector=None )

    Creates a new TwoCrows pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    TwoCrows

    TwoCrows( symbol, resolution=None, selector=None )

    Creates a new TwoCrows pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    TwoCrows

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a TwoCrows indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class TwoCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TwoCrows _twocrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _twocrows = new TwoCrows();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _twocrows.Update(bar);
            }
       
            if (_twocrows.IsReady)
            {
                // The current value of _twocrows is represented by itself (_twocrows)
                // or _twocrows.Current.Value
                Plot("TwoCrows", "twocrows", _twocrows);
                
            }
        }
    }
    class TwoCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._twocrows = TwoCrows()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._twocrows.update(bar)
            if self._twocrows.is_ready:
                # The current value of self._twocrows is represented by self._twocrows.current.value
                self.plot("TwoCrows", "twocrows", self._twocrows.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TwoCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TwoCrows _twocrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _twocrows = new TwoCrows();
            RegisterIndicator(_symbol, _twocrows, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_twocrows.IsReady)
            {
                // The current value of _twocrows is represented by itself (_twocrows)
                // or _twocrows.Current.Value
                Plot("TwoCrows", "twocrows", _twocrows);
                
            }
        }
    }
    class TwoCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._twocrows = TwoCrows()
            self.register_indicator(self._symbol, self._twocrows, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._twocrows.is_ready:
                # The current value of self._twocrows is represented by self._twocrows.current.value
                self.plot("TwoCrows", "twocrows", self._twocrows.current.value)
                
    

    The following reference table describes the TwoCrows constructor:

    TwoCrows

    class QuantConnect.Indicators.CandlestickPatterns.TwoCrows [source]

    Two Crows candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TwoCrows

    class QuantConnect.Indicators.CandlestickPatterns.TwoCrows [source]

    Two Crows candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Unique Three River

    Introduction

    Create a new Unique Three River candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using UniqueThreeRiver Indicator

    To create an automatic indicators for UniqueThreeRiver , call the UniqueThreeRiver helper method from the QCAlgorithm class. The UniqueThreeRiver method creates a UniqueThreeRiver object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class UniqueThreeRiverAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UniqueThreeRiver _uniquethreeriver;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _uniquethreeriver = CandlestickPatterns.UniqueThreeRiver(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_uniquethreeriver.IsReady)
            {
                // The current value of _uniquethreeriver is represented by itself (_uniquethreeriver)
                // or _uniquethreeriver.Current.Value
                Plot("UniqueThreeRiver", "uniquethreeriver", _uniquethreeriver);
                
            }
        }
    }
    class UniqueThreeRiverAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._uniquethreeriver = self.CandlestickPatterns.uniquethreeriver(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._uniquethreeriver.is_ready:
                # The current value of self._uniquethreeriver is represented by self._uniquethreeriver.current.value
                self.plot("UniqueThreeRiver", "uniquethreeriver", self._uniquethreeriver.current.value)
                
    

    The following reference table describes the UniqueThreeRiver method:

    unique_three_river( symbol, resolution=None, selector=None )

    Creates a new UniqueThreeRiver pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    UniqueThreeRiver

    UniqueThreeRiver( symbol, resolution=None, selector=None )

    Creates a new UniqueThreeRiver pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    UniqueThreeRiver

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a UniqueThreeRiver indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class UniqueThreeRiverAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UniqueThreeRiver _uniquethreeriver;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _uniquethreeriver = new UniqueThreeRiver();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _uniquethreeriver.Update(bar);
            }
       
            if (_uniquethreeriver.IsReady)
            {
                // The current value of _uniquethreeriver is represented by itself (_uniquethreeriver)
                // or _uniquethreeriver.Current.Value
                Plot("UniqueThreeRiver", "uniquethreeriver", _uniquethreeriver);
                
            }
        }
    }
    class UniqueThreeRiverAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._uniquethreeriver = UniqueThreeRiver()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._uniquethreeriver.update(bar)
            if self._uniquethreeriver.is_ready:
                # The current value of self._uniquethreeriver is represented by self._uniquethreeriver.current.value
                self.plot("UniqueThreeRiver", "uniquethreeriver", self._uniquethreeriver.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class UniqueThreeRiverAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UniqueThreeRiver _uniquethreeriver;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _uniquethreeriver = new UniqueThreeRiver();
            RegisterIndicator(_symbol, _uniquethreeriver, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_uniquethreeriver.IsReady)
            {
                // The current value of _uniquethreeriver is represented by itself (_uniquethreeriver)
                // or _uniquethreeriver.Current.Value
                Plot("UniqueThreeRiver", "uniquethreeriver", _uniquethreeriver);
                
            }
        }
    }
    class UniqueThreeRiverAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._uniquethreeriver = UniqueThreeRiver()
            self.register_indicator(self._symbol, self._uniquethreeriver, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._uniquethreeriver.is_ready:
                # The current value of self._uniquethreeriver is represented by self._uniquethreeriver.current.value
                self.plot("UniqueThreeRiver", "uniquethreeriver", self._uniquethreeriver.current.value)
                
    

    The following reference table describes the UniqueThreeRiver constructor:

    UniqueThreeRiver

    class QuantConnect.Indicators.CandlestickPatterns.UniqueThreeRiver [source]

    Unique Three River candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    UniqueThreeRiver

    class QuantConnect.Indicators.CandlestickPatterns.UniqueThreeRiver [source]

    Unique Three River candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Up Down Gap Three Methods

    Introduction

    Create a new Up/Down Gap Three Methods candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using UpDownGapThreeMethods Indicator

    To create an automatic indicators for UpDownGapThreeMethods , call the UpDownGapThreeMethods helper method from the QCAlgorithm class. The UpDownGapThreeMethods method creates a UpDownGapThreeMethods object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class UpDownGapThreeMethodsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UpDownGapThreeMethods _updowngapthreemethods;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _updowngapthreemethods = CandlestickPatterns.UpDownGapThreeMethods(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_updowngapthreemethods.IsReady)
            {
                // The current value of _updowngapthreemethods is represented by itself (_updowngapthreemethods)
                // or _updowngapthreemethods.Current.Value
                Plot("UpDownGapThreeMethods", "updowngapthreemethods", _updowngapthreemethods);
                
            }
        }
    }
    class UpDownGapThreeMethodsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._updowngapthreemethods = self.CandlestickPatterns.updowngapthreemethods(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._updowngapthreemethods.is_ready:
                # The current value of self._updowngapthreemethods is represented by self._updowngapthreemethods.current.value
                self.plot("UpDownGapThreeMethods", "updowngapthreemethods", self._updowngapthreemethods.current.value)
                
    

    The following reference table describes the UpDownGapThreeMethods method:

    up_down_gap_three_methods( symbol, resolution=None, selector=None )

    Creates a new UpDownGapThreeMethods pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    UpDownGapThreeMethods

    UpDownGapThreeMethods( symbol, resolution=None, selector=None )

    Creates a new UpDownGapThreeMethods pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    UpDownGapThreeMethods

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a UpDownGapThreeMethods indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class UpDownGapThreeMethodsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UpDownGapThreeMethods _updowngapthreemethods;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _updowngapthreemethods = new UpDownGapThreeMethods();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _updowngapthreemethods.Update(bar);
            }
       
            if (_updowngapthreemethods.IsReady)
            {
                // The current value of _updowngapthreemethods is represented by itself (_updowngapthreemethods)
                // or _updowngapthreemethods.Current.Value
                Plot("UpDownGapThreeMethods", "updowngapthreemethods", _updowngapthreemethods);
                
            }
        }
    }
    class UpDownGapThreeMethodsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._updowngapthreemethods = UpDownGapThreeMethods()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._updowngapthreemethods.update(bar)
            if self._updowngapthreemethods.is_ready:
                # The current value of self._updowngapthreemethods is represented by self._updowngapthreemethods.current.value
                self.plot("UpDownGapThreeMethods", "updowngapthreemethods", self._updowngapthreemethods.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class UpDownGapThreeMethodsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UpDownGapThreeMethods _updowngapthreemethods;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _updowngapthreemethods = new UpDownGapThreeMethods();
            RegisterIndicator(_symbol, _updowngapthreemethods, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_updowngapthreemethods.IsReady)
            {
                // The current value of _updowngapthreemethods is represented by itself (_updowngapthreemethods)
                // or _updowngapthreemethods.Current.Value
                Plot("UpDownGapThreeMethods", "updowngapthreemethods", _updowngapthreemethods);
                
            }
        }
    }
    class UpDownGapThreeMethodsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._updowngapthreemethods = UpDownGapThreeMethods()
            self.register_indicator(self._symbol, self._updowngapthreemethods, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._updowngapthreemethods.is_ready:
                # The current value of self._updowngapthreemethods is represented by self._updowngapthreemethods.current.value
                self.plot("UpDownGapThreeMethods", "updowngapthreemethods", self._updowngapthreemethods.current.value)
                
    

    The following reference table describes the UpDownGapThreeMethods constructor:

    UpDownGapThreeMethods

    class QuantConnect.Indicators.CandlestickPatterns.UpDownGapThreeMethods [source]

    Up/Down Gap Three Methods candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    UpDownGapThreeMethods

    class QuantConnect.Indicators.CandlestickPatterns.UpDownGapThreeMethods [source]

    Up/Down Gap Three Methods candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Upside Gap Two Crows

    Introduction

    Create a new Upside Gap Two Crows candlestick pattern to indicate the pattern's presence.

    To view the implementation of this candlestick pattern, see the LEAN GitHub repository .

    Using UpsideGapTwoCrows Indicator

    To create an automatic indicators for UpsideGapTwoCrows , call the UpsideGapTwoCrows helper method from the QCAlgorithm class. The UpsideGapTwoCrows method creates a UpsideGapTwoCrows object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class UpsideGapTwoCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UpsideGapTwoCrows _upsidegaptwocrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _upsidegaptwocrows = CandlestickPatterns.UpsideGapTwoCrows(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_upsidegaptwocrows.IsReady)
            {
                // The current value of _upsidegaptwocrows is represented by itself (_upsidegaptwocrows)
                // or _upsidegaptwocrows.Current.Value
                Plot("UpsideGapTwoCrows", "upsidegaptwocrows", _upsidegaptwocrows);
                
            }
        }
    }
    class UpsideGapTwoCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._upsidegaptwocrows = self.CandlestickPatterns.upsidegaptwocrows(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._upsidegaptwocrows.is_ready:
                # The current value of self._upsidegaptwocrows is represented by self._upsidegaptwocrows.current.value
                self.plot("UpsideGapTwoCrows", "upsidegaptwocrows", self._upsidegaptwocrows.current.value)
                
    

    The following reference table describes the UpsideGapTwoCrows method:

    upside_gap_two_crows( symbol, resolution=None, selector=None )

    Creates a new UpsideGapTwoCrows pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    UpsideGapTwoCrows

    UpsideGapTwoCrows( symbol, resolution=None, selector=None )

    Creates a new UpsideGapTwoCrows pattern indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Return type:

    UpsideGapTwoCrows

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a UpsideGapTwoCrows indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class UpsideGapTwoCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UpsideGapTwoCrows _upsidegaptwocrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _upsidegaptwocrows = new UpsideGapTwoCrows();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _upsidegaptwocrows.Update(bar);
            }
       
            if (_upsidegaptwocrows.IsReady)
            {
                // The current value of _upsidegaptwocrows is represented by itself (_upsidegaptwocrows)
                // or _upsidegaptwocrows.Current.Value
                Plot("UpsideGapTwoCrows", "upsidegaptwocrows", _upsidegaptwocrows);
                
            }
        }
    }
    class UpsideGapTwoCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._upsidegaptwocrows = UpsideGapTwoCrows()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._upsidegaptwocrows.update(bar)
            if self._upsidegaptwocrows.is_ready:
                # The current value of self._upsidegaptwocrows is represented by self._upsidegaptwocrows.current.value
                self.plot("UpsideGapTwoCrows", "upsidegaptwocrows", self._upsidegaptwocrows.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class UpsideGapTwoCrowsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UpsideGapTwoCrows _upsidegaptwocrows;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _upsidegaptwocrows = new UpsideGapTwoCrows();
            RegisterIndicator(_symbol, _upsidegaptwocrows, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_upsidegaptwocrows.IsReady)
            {
                // The current value of _upsidegaptwocrows is represented by itself (_upsidegaptwocrows)
                // or _upsidegaptwocrows.Current.Value
                Plot("UpsideGapTwoCrows", "upsidegaptwocrows", _upsidegaptwocrows);
                
            }
        }
    }
    class UpsideGapTwoCrowsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._upsidegaptwocrows = UpsideGapTwoCrows()
            self.register_indicator(self._symbol, self._upsidegaptwocrows, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._upsidegaptwocrows.is_ready:
                # The current value of self._upsidegaptwocrows is represented by self._upsidegaptwocrows.current.value
                self.plot("UpsideGapTwoCrows", "upsidegaptwocrows", self._upsidegaptwocrows.current.value)
                
    

    The following reference table describes the UpsideGapTwoCrows constructor:

    UpsideGapTwoCrows

    class QuantConnect.Indicators.CandlestickPatterns.UpsideGapTwoCrows [source]

    Upside Gap Two Crows candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    UpsideGapTwoCrows

    class QuantConnect.Indicators.CandlestickPatterns.UpsideGapTwoCrows [source]

    Upside Gap Two Crows candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Supported Indicators

    Absolute Price Oscillator

    Introduction

    This indicator computes the Absolute Price Oscillator (APO) The Absolute Price Oscillator is calculated using the following formula: APO[i] = FastMA[i] - SlowMA[i]

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using APO Indicator

    To create an automatic indicators for AbsolutePriceOscillator , call the APO helper method from the QCAlgorithm class. The APO method creates a AbsolutePriceOscillator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AbsolutePriceOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AbsolutePriceOscillator _apo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _apo = APO(_symbol, 10, 2, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (_apo.IsReady)
            {
                // The current value of _apo is represented by itself (_apo)
                // or _apo.Current.Value
                Plot("AbsolutePriceOscillator", "apo", _apo);
                // Plot all properties of apo
                Plot("AbsolutePriceOscillator", "fast", _apo.Fast);
                Plot("AbsolutePriceOscillator", "slow", _apo.Slow);
                Plot("AbsolutePriceOscillator", "signal", _apo.Signal);
                Plot("AbsolutePriceOscillator", "histogram", _apo.Histogram);
            }
        }
    }
    class AbsolutePriceOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._apo = self.apo(self._symbol, 10, 2, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            if self._apo.is_ready:
                # The current value of self._apo is represented by self._apo.current.value
                self.plot("AbsolutePriceOscillator", "apo", self._apo.current.value)
                # Plot all attributes of self._apo
                self.plot("AbsolutePriceOscillator", "fast", self._apo.fast.current.value)
                self.plot("AbsolutePriceOscillator", "slow", self._apo.slow.current.value)
                self.plot("AbsolutePriceOscillator", "signal", self._apo.signal.current.value)
                self.plot("AbsolutePriceOscillator", "histogram", self._apo.histogram.current.value)
    

    The following reference table describes the APO method:

    apo( symbol, fast_period, slow_period, moving_average_type, resolution=None, selector=None ) [source]

    Creates a new AbsolutePriceOscillator indicator.

    Parameters:
    Returns:

    The AbsolutePriceOscillator indicator for the requested symbol over the specified period

    Return type:

    AbsolutePriceOscillator

    APO( symbol, fastPeriod, slowPeriod, movingAverageType, resolution=None, selector=None ) [source]

    Creates a new AbsolutePriceOscillator indicator.

    Parameters:
    Returns:

    The AbsolutePriceOscillator indicator for the requested symbol over the specified period

    Return type:

    AbsolutePriceOscillator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AbsolutePriceOscillator indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class AbsolutePriceOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AbsolutePriceOscillator _apo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _apo = new AbsolutePriceOscillator(10, 20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _apo.Update(bar.EndTime, bar.Close);
            }
       
            if (_apo.IsReady)
            {
                // The current value of _apo is represented by itself (_apo)
                // or _apo.Current.Value
                Plot("AbsolutePriceOscillator", "apo", _apo);
                // Plot all properties of apo
                Plot("AbsolutePriceOscillator", "fast", _apo.Fast);
                Plot("AbsolutePriceOscillator", "slow", _apo.Slow);
                Plot("AbsolutePriceOscillator", "signal", _apo.Signal);
                Plot("AbsolutePriceOscillator", "histogram", _apo.Histogram);
            }
        }
    }
    class AbsolutePriceOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._apo = AbsolutePriceOscillator(10, 20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._apo.update(bar.EndTime, bar.Close)
            if self._apo.is_ready:
                # The current value of self._apo is represented by self._apo.current.value
                self.plot("AbsolutePriceOscillator", "apo", self._apo.current.value)
                # Plot all attributes of self._apo
                self.plot("AbsolutePriceOscillator", "fast", self._apo.fast.current.value)
                self.plot("AbsolutePriceOscillator", "slow", self._apo.slow.current.value)
                self.plot("AbsolutePriceOscillator", "signal", self._apo.signal.current.value)
                self.plot("AbsolutePriceOscillator", "histogram", self._apo.histogram.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AbsolutePriceOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AbsolutePriceOscillator _apo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _apo = new AbsolutePriceOscillator(10, 20, MovingAverageType.Simple);
            RegisterIndicator(_symbol, _apo, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_apo.IsReady)
            {
                // The current value of _apo is represented by itself (_apo)
                // or _apo.Current.Value
                Plot("AbsolutePriceOscillator", "apo", _apo);
                // Plot all properties of apo
                Plot("AbsolutePriceOscillator", "fast", _apo.Fast);
                Plot("AbsolutePriceOscillator", "slow", _apo.Slow);
                Plot("AbsolutePriceOscillator", "signal", _apo.Signal);
                Plot("AbsolutePriceOscillator", "histogram", _apo.Histogram);
            }
        }
    }
    class AbsolutePriceOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._apo = AbsolutePriceOscillator(10, 20, MovingAverageType.Simple)
            self.register_indicator(self._symbol, self._apo, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._apo.is_ready:
                # The current value of self._apo is represented by self._apo.current.value
                self.plot("AbsolutePriceOscillator", "apo", self._apo.current.value)
                # Plot all attributes of self._apo
                self.plot("AbsolutePriceOscillator", "fast", self._apo.fast.current.value)
                self.plot("AbsolutePriceOscillator", "slow", self._apo.slow.current.value)
                self.plot("AbsolutePriceOscillator", "signal", self._apo.signal.current.value)
                self.plot("AbsolutePriceOscillator", "histogram", self._apo.histogram.current.value)
    

    The following reference table describes the AbsolutePriceOscillator constructor:

    AbsolutePriceOscillator

    class QuantConnect.Indicators.AbsolutePriceOscillator [source]

    This indicator computes the Absolute Price Oscillator (APO) The Absolute Price Oscillator is calculated using the following formula: APO[i] = FastMA[i] - SlowMA[i]

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property fast

    Gets the fast average indicator

    Returns:

    Gets the fast average indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property histogram

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Returns:

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property signal

    Gets the signal of the MACD

    Returns:

    Gets the signal of the MACD

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property slow

    Gets the slow average indicator

    Returns:

    Gets the slow average indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AbsolutePriceOscillator

    class QuantConnect.Indicators.AbsolutePriceOscillator [source]

    This indicator computes the Absolute Price Oscillator (APO) The Absolute Price Oscillator is calculated using the following formula: APO[i] = FastMA[i] - SlowMA[i]

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Fast

    Gets the fast average indicator

    Returns:

    Gets the fast average indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Histogram

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Returns:

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Signal

    Gets the signal of the MACD

    Returns:

    Gets the signal of the MACD

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Slow

    Gets the slow average indicator

    Returns:

    Gets the slow average indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AbsolutePriceOscillator using the plotly library.

    AbsolutePriceOscillator line plot.

     

    Supported Indicators

    Acceleration Bands

    Introduction

    The Acceleration Bands created by Price Headley plots upper and lower envelope bands around a moving average.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ABANDS Indicator

    To create an automatic indicators for AccelerationBands , call the ABANDS helper method from the QCAlgorithm class. The ABANDS method creates a AccelerationBands object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AccelerationBandsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccelerationBands _abands;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _abands = ABANDS(_symbol, 10, 4, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (_abands.IsReady)
            {
                // The current value of _abands is represented by itself (_abands)
                // or _abands.Current.Value
                Plot("AccelerationBands", "abands", _abands);
                // Plot all properties of abands
                Plot("AccelerationBands", "middleband", _abands.MiddleBand);
                Plot("AccelerationBands", "upperband", _abands.UpperBand);
                Plot("AccelerationBands", "lowerband", _abands.LowerBand);
            }
        }
    }
    class AccelerationBandsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._abands = self.abands(self._symbol, 10, 4, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            if self._abands.is_ready:
                # The current value of self._abands is represented by self._abands.current.value
                self.plot("AccelerationBands", "abands", self._abands.current.value)
                # Plot all attributes of self._abands
                self.plot("AccelerationBands", "middle_band", self._abands.middle_band.current.value)
                self.plot("AccelerationBands", "upper_band", self._abands.upper_band.current.value)
                self.plot("AccelerationBands", "lower_band", self._abands.lower_band.current.value)
    

    The following reference table describes the ABANDS method:

    abands( symbol, period, width=4.0, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new Acceleration Bands indicator.

    Parameters:
    Return type:

    AccelerationBands

    ABANDS( symbol, period, width=4.0, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new Acceleration Bands indicator.

    Parameters:
    Return type:

    AccelerationBands

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    The following table describes the MovingAverageType enumeration members:

    To avoid parameter ambiguity, use the resolution argument to set the Resolution .

    public class AccelerationBandsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccelerationBands _abands;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Hour).Symbol;
            _abands = ABANDS(_symbol, 10, 4, MovingAverageType.Simple, resolution: Resolution.Daily);
        }
    }
    class AccelerationBandsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.HOUR).Symbol
            self._abands = self.abands(self._symbol, 10, 4, MovingAverageType.Simple, resolution=Resolution.DAILY)
    

    You can manually create a AccelerationBands indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class AccelerationBandsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccelerationBands _abands;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _abands = new AccelerationBands("", 10, 4, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _abands.Update(bar.EndTime, bar.Close);
            }
       
            if (_abands.IsReady)
            {
                // The current value of _abands is represented by itself (_abands)
                // or _abands.Current.Value
                Plot("AccelerationBands", "abands", _abands);
                // Plot all properties of abands
                Plot("AccelerationBands", "middleband", _abands.MiddleBand);
                Plot("AccelerationBands", "upperband", _abands.UpperBand);
                Plot("AccelerationBands", "lowerband", _abands.LowerBand);
            }
        }
    }
    class AccelerationBandsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._abands = AccelerationBands("", 10, 4, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._abands.update(bar.EndTime, bar.Close)
            if self._abands.is_ready:
                # The current value of self._abands is represented by self._abands.current.value
                self.plot("AccelerationBands", "abands", self._abands.current.value)
                # Plot all attributes of self._abands
                self.plot("AccelerationBands", "middle_band", self._abands.middle_band.current.value)
                self.plot("AccelerationBands", "upper_band", self._abands.upper_band.current.value)
                self.plot("AccelerationBands", "lower_band", self._abands.lower_band.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AccelerationBandsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccelerationBands _abands;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _abands = new AccelerationBands("", 10, 4, MovingAverageType.Simple);
            RegisterIndicator(_symbol, _abands, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_abands.IsReady)
            {
                // The current value of _abands is represented by itself (_abands)
                // or _abands.Current.Value
                Plot("AccelerationBands", "abands", _abands);
                // Plot all properties of abands
                Plot("AccelerationBands", "middleband", _abands.MiddleBand);
                Plot("AccelerationBands", "upperband", _abands.UpperBand);
                Plot("AccelerationBands", "lowerband", _abands.LowerBand);
            }
        }
    }
    class AccelerationBandsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._abands = AccelerationBands("", 10, 4, MovingAverageType.Simple)
            self.register_indicator(self._symbol, self._abands, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._abands.is_ready:
                # The current value of self._abands is represented by self._abands.current.value
                self.plot("AccelerationBands", "abands", self._abands.current.value)
                # Plot all attributes of self._abands
                self.plot("AccelerationBands", "middle_band", self._abands.middle_band.current.value)
                self.plot("AccelerationBands", "upper_band", self._abands.upper_band.current.value)
                self.plot("AccelerationBands", "lower_band", self._abands.lower_band.current.value)
    

    The following reference table describes the AccelerationBands constructor:

    AccelerationBands

    class QuantConnect.Indicators.AccelerationBands [source]

    The Acceleration Bands created by Price Headley plots upper and lower envelope bands around a moving average.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property lower_band

    Gets the lower acceleration band (Low * (1 - Width * (High - Low)/ (High + Low)))

    Returns:

    Gets the lower acceleration band (Low * (1 - Width * (High - Low)/ (High + Low)))

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property middle_band

    Gets the middle acceleration band (moving average)

    Returns:

    Gets the middle acceleration band (moving average)

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property moving_average_type

    Gets the type of moving average

    Returns:

    Gets the type of moving average

    Return type:

    MovingAverageType

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property upper_band

    Gets the upper acceleration band (High * ( 1 + Width * (High - Low) / (High + Low)))

    Returns:

    Gets the upper acceleration band (High * ( 1 + Width * (High - Low) / (High + Low)))

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AccelerationBands

    class QuantConnect.Indicators.AccelerationBands [source]

    The Acceleration Bands created by Price Headley plots upper and lower envelope bands around a moving average.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property LowerBand

    Gets the lower acceleration band (Low * (1 - Width * (High - Low)/ (High + Low)))

    Returns:

    Gets the lower acceleration band (Low * (1 - Width * (High - Low)/ (High + Low)))

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property MiddleBand

    Gets the middle acceleration band (moving average)

    Returns:

    Gets the middle acceleration band (moving average)

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property MovingAverageType

    Gets the type of moving average

    Returns:

    Gets the type of moving average

    Return type:

    MovingAverageType

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property UpperBand

    Gets the upper acceleration band (High * ( 1 + Width * (High - Low) / (High + Low)))

    Returns:

    Gets the upper acceleration band (High * ( 1 + Width * (High - Low) / (High + Low)))

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AccelerationBands using the plotly library.

    AccelerationBands line plot.

     

    Supported Indicators

    Accumulation Distribution

    Introduction

    This indicator computes the Accumulation/Distribution (AD) The Accumulation/Distribution is calculated using the following formula: AD = AD + ((Close - Low) - (High - Close)) / (High - Low) * Volume

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using AD Indicator

    To create an automatic indicators for AccumulationDistribution , call the AD helper method from the QCAlgorithm class. The AD method creates a AccumulationDistribution object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AccumulationDistributionAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccumulationDistribution _ad;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ad = AD(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_ad.IsReady)
            {
                // The current value of _ad is represented by itself (_ad)
                // or _ad.Current.Value
                Plot("AccumulationDistribution", "ad", _ad);
                
            }
        }
    }
    class AccumulationDistributionAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ad = self.ad(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._ad.is_ready:
                # The current value of self._ad is represented by self._ad.current.value
                self.plot("AccumulationDistribution", "ad", self._ad.current.value)
                
    

    The following reference table describes the AD method:

    ad( symbol, resolution=None, selector=None ) [source]

    Creates a new AccumulationDistribution indicator.

    Parameters:
    Returns:

    The AccumulationDistribution indicator for the requested symbol over the specified period

    Return type:

    AccumulationDistribution

    AD( symbol, resolution=None, selector=None ) [source]

    Creates a new AccumulationDistribution indicator.

    Parameters:
    Returns:

    The AccumulationDistribution indicator for the requested symbol over the specified period

    Return type:

    AccumulationDistribution

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AccumulationDistribution indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class AccumulationDistributionAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccumulationDistribution _ad;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ad = new AccumulationDistribution();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _ad.Update(bar);
            }
       
            if (_ad.IsReady)
            {
                // The current value of _ad is represented by itself (_ad)
                // or _ad.Current.Value
                Plot("AccumulationDistribution", "ad", _ad);
                
            }
        }
    }
    class AccumulationDistributionAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ad = AccumulationDistribution()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._ad.update(bar)
            if self._ad.is_ready:
                # The current value of self._ad is represented by self._ad.current.value
                self.plot("AccumulationDistribution", "ad", self._ad.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AccumulationDistributionAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccumulationDistribution _ad;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ad = new AccumulationDistribution();
            RegisterIndicator(_symbol, _ad, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_ad.IsReady)
            {
                // The current value of _ad is represented by itself (_ad)
                // or _ad.Current.Value
                Plot("AccumulationDistribution", "ad", _ad);
                
            }
        }
    }
    class AccumulationDistributionAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ad = AccumulationDistribution()
            self.register_indicator(self._symbol, self._ad, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._ad.is_ready:
                # The current value of self._ad is represented by self._ad.current.value
                self.plot("AccumulationDistribution", "ad", self._ad.current.value)
                
    

    The following reference table describes the AccumulationDistribution constructor:

    AccumulationDistribution

    class QuantConnect.Indicators.AccumulationDistribution [source]

    This indicator computes the Accumulation/Distribution (AD) The Accumulation/Distribution is calculated using the following formula: AD = AD + ((Close - Low) - (High - Close)) / (High - Low) * Volume

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AccumulationDistribution

    class QuantConnect.Indicators.AccumulationDistribution [source]

    This indicator computes the Accumulation/Distribution (AD) The Accumulation/Distribution is calculated using the following formula: AD = AD + ((Close - Low) - (High - Close)) / (High - Low) * Volume

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AccumulationDistribution using the plotly library.

    AccumulationDistribution line plot.

     

    Supported Indicators

    Accumulation Distribution Oscillator

    Introduction

    This indicator computes the Accumulation/Distribution Oscillator (ADOSC) The Accumulation/Distribution Oscillator is calculated using the following formula: ADOSC = EMA(fast,AD) - EMA(slow,AD)

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ADOSC Indicator

    To create an automatic indicators for AccumulationDistributionOscillator , call the ADOSC helper method from the QCAlgorithm class. The ADOSC method creates a AccumulationDistributionOscillator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AccumulationDistributionOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccumulationDistributionOscillator _adosc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _adosc = ADOSC(_symbol, 10, 2);
        }
    
        public override void OnData(Slice data)
        {
            if (_adosc.IsReady)
            {
                // The current value of _adosc is represented by itself (_adosc)
                // or _adosc.Current.Value
                Plot("AccumulationDistributionOscillator", "adosc", _adosc);
                
            }
        }
    }
    class AccumulationDistributionOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._adosc = self.adosc(self._symbol, 10, 2)
    
        def on_data(self, slice: Slice) -> None:
            if self._adosc.is_ready:
                # The current value of self._adosc is represented by self._adosc.current.value
                self.plot("AccumulationDistributionOscillator", "adosc", self._adosc.current.value)
                
    

    The following reference table describes the ADOSC method:

    adosc( symbol, fast_period, slow_period, resolution=None, selector=None ) [source]

    Creates a new AccumulationDistributionOscillator indicator.

    Parameters:
    Returns:

    The AccumulationDistributionOscillator indicator for the requested symbol over the specified period

    Return type:

    AccumulationDistributionOscillator

    ADOSC( symbol, fastPeriod, slowPeriod, resolution=None, selector=None ) [source]

    Creates a new AccumulationDistributionOscillator indicator.

    Parameters:
    Returns:

    The AccumulationDistributionOscillator indicator for the requested symbol over the specified period

    Return type:

    AccumulationDistributionOscillator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AccumulationDistributionOscillator indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class AccumulationDistributionOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccumulationDistributionOscillator _adosc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _adosc = new AccumulationDistributionOscillator(10, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _adosc.Update(bar);
            }
       
            if (_adosc.IsReady)
            {
                // The current value of _adosc is represented by itself (_adosc)
                // or _adosc.Current.Value
                Plot("AccumulationDistributionOscillator", "adosc", _adosc);
                
            }
        }
    }
    class AccumulationDistributionOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._adosc = AccumulationDistributionOscillator(10, 20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._adosc.update(bar)
            if self._adosc.is_ready:
                # The current value of self._adosc is represented by self._adosc.current.value
                self.plot("AccumulationDistributionOscillator", "adosc", self._adosc.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AccumulationDistributionOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AccumulationDistributionOscillator _adosc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _adosc = new AccumulationDistributionOscillator(10, 20);
            RegisterIndicator(_symbol, _adosc, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_adosc.IsReady)
            {
                // The current value of _adosc is represented by itself (_adosc)
                // or _adosc.Current.Value
                Plot("AccumulationDistributionOscillator", "adosc", _adosc);
                
            }
        }
    }
    class AccumulationDistributionOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._adosc = AccumulationDistributionOscillator(10, 20)
            self.register_indicator(self._symbol, self._adosc, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._adosc.is_ready:
                # The current value of self._adosc is represented by self._adosc.current.value
                self.plot("AccumulationDistributionOscillator", "adosc", self._adosc.current.value)
                
    

    The following reference table describes the AccumulationDistributionOscillator constructor:

    AccumulationDistributionOscillator

    class QuantConnect.Indicators.AccumulationDistributionOscillator [source]

    This indicator computes the Accumulation/Distribution Oscillator (ADOSC) The Accumulation/Distribution Oscillator is calculated using the following formula: ADOSC = EMA(fast,AD) - EMA(slow,AD)

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AccumulationDistributionOscillator

    class QuantConnect.Indicators.AccumulationDistributionOscillator [source]

    This indicator computes the Accumulation/Distribution Oscillator (ADOSC) The Accumulation/Distribution Oscillator is calculated using the following formula: ADOSC = EMA(fast,AD) - EMA(slow,AD)

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AccumulationDistributionOscillator using the plotly library.

    AccumulationDistributionOscillator line plot.

     

    Supported Indicators

    Advance Decline Difference

    Introduction

    The Advance Decline Difference compute the difference between the number of stocks that closed higher and the number of stocks that closed lower than their previous day's closing prices.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ADDIFF Indicator

    To create an automatic indicators for AdvanceDeclineDifference , call the ADDIFF helper method from the QCAlgorithm class. The ADDIFF method creates a AdvanceDeclineDifference object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AdvanceDeclineDifferenceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private AdvanceDeclineDifference _addiff;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _addiff = ADDIFF([_symbol, reference]);
        }
    
        public override void OnData(Slice data)
        {
            if (_addiff.IsReady)
            {
                // The current value of _addiff is represented by itself (_addiff)
                // or _addiff.Current.Value
                Plot("AdvanceDeclineDifference", "addiff", _addiff);
                
            }
        }
    }
    class AdvanceDeclineDifferenceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._addiff = self.addiff([self._symbol, reference])
    
        def on_data(self, slice: Slice) -> None:
            if self._addiff.is_ready:
                # The current value of self._addiff is represented by self._addiff.current.value
                self.plot("AdvanceDeclineDifference", "addiff", self._addiff.current.value)
                
    

    The following reference table describes the ADDIFF method:

    addiff( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Difference indicator

    Parameters:
    Returns:

    The AdvanceDecline Difference indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineDifference

    ADDIFF( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Difference indicator

    Parameters:
    Returns:

    The AdvanceDecline Difference indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineDifference

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AdvanceDeclineDifference indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class AdvanceDeclineDifferenceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private AdvanceDeclineDifference _addiff;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _addiff = new AdvanceDeclineDifference("");
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _addiff.Update(bar);
            }
            if (data.Bars.TryGetValue(_reference, out bar))
            {      
                _addiff.Update(bar);
            }
       
            if (_addiff.IsReady)
            {
                // The current value of _addiff is represented by itself (_addiff)
                // or _addiff.Current.Value
                Plot("AdvanceDeclineDifference", "addiff", _addiff);
                
            }
        }
    }
    class AdvanceDeclineDifferenceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._addiff = AdvanceDeclineDifference("")
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._addiff.update(bar)
            bar = slice.bars.get(self.referece)
            if bar:
                self._addiff.update(bar)
            if self._addiff.is_ready:
                # The current value of self._addiff is represented by self._addiff.current.value
                self.plot("AdvanceDeclineDifference", "addiff", self._addiff.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AdvanceDeclineDifferenceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private AdvanceDeclineDifference _addiff;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _addiff = new AdvanceDeclineDifference("");
            RegisterIndicator(_symbol, _addiff, Resolution.Daily);
            RegisterIndicator(reference, _addiff, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_addiff.IsReady)
            {
                // The current value of _addiff is represented by itself (_addiff)
                // or _addiff.Current.Value
                Plot("AdvanceDeclineDifference", "addiff", _addiff);
                
            }
        }
    }
    class AdvanceDeclineDifferenceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._addiff = AdvanceDeclineDifference("")
            self.register_indicator(self._symbol, self._addiff, Resolution.DAILY)
            self.register_indicator(reference, self._addiff, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._addiff.is_ready:
                # The current value of self._addiff is represented by self._addiff.current.value
                self.plot("AdvanceDeclineDifference", "addiff", self._addiff.current.value)
                
    

    The following reference table describes the AdvanceDeclineDifference constructor:

    AdvanceDeclineDifference

    class QuantConnect.Indicators.AdvanceDeclineDifference [source]

    The Advance Decline Difference compute the difference between the number of stocks that closed higher and the number of stocks that closed lower than their previous day's closing prices.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AdvanceDeclineDifference

    class QuantConnect.Indicators.AdvanceDeclineDifference [source]

    The Advance Decline Difference compute the difference between the number of stocks that closed higher and the number of stocks that closed lower than their previous day's closing prices.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AdvanceDeclineDifference using the plotly library.

    AdvanceDeclineDifference line plot.

     

    Supported Indicators

    Advance Decline Ratio

    Introduction

    The advance-decline ratio (ADR) compares the number of stocks that closed higher against the number of stocks that closed lower than their previous day's closing prices.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ADR Indicator

    To create an automatic indicators for AdvanceDeclineRatio , call the ADR helper method from the QCAlgorithm class. The ADR method creates a AdvanceDeclineRatio object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AdvanceDeclineRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private AdvanceDeclineRatio _adr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _adr = ADR([_symbol, reference]);
        }
    
        public override void OnData(Slice data)
        {
            if (_adr.IsReady)
            {
                // The current value of _adr is represented by itself (_adr)
                // or _adr.Current.Value
                Plot("AdvanceDeclineRatio", "adr", _adr);
                
            }
        }
    }
    class AdvanceDeclineRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._adr = self.adr([self._symbol, reference])
    
        def on_data(self, slice: Slice) -> None:
            if self._adr.is_ready:
                # The current value of self._adr is represented by self._adr.current.value
                self.plot("AdvanceDeclineRatio", "adr", self._adr.current.value)
                
    

    The following reference table describes the ADR method:

    adr( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Ratio indicator

    Parameters:
    Returns:

    The AdvanceDecline Ratio indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineRatio

    ADR( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Ratio indicator

    Parameters:
    Returns:

    The AdvanceDecline Ratio indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineRatio

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AdvanceDeclineRatio indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class AdvanceDeclineRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private AdvanceDeclineRatio _adr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _adr = new AdvanceDeclineRatio("");
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _adr.Update(bar);
            }
            if (data.Bars.TryGetValue(_reference, out bar))
            {      
                _adr.Update(bar);
            }
       
            if (_adr.IsReady)
            {
                // The current value of _adr is represented by itself (_adr)
                // or _adr.Current.Value
                Plot("AdvanceDeclineRatio", "adr", _adr);
                
            }
        }
    }
    class AdvanceDeclineRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._adr = AdvanceDeclineRatio("")
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._adr.update(bar)
            bar = slice.bars.get(self.referece)
            if bar:
                self._adr.update(bar)
            if self._adr.is_ready:
                # The current value of self._adr is represented by self._adr.current.value
                self.plot("AdvanceDeclineRatio", "adr", self._adr.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AdvanceDeclineRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private AdvanceDeclineRatio _adr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _adr = new AdvanceDeclineRatio("");
            RegisterIndicator(_symbol, _adr, Resolution.Daily);
            RegisterIndicator(reference, _adr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_adr.IsReady)
            {
                // The current value of _adr is represented by itself (_adr)
                // or _adr.Current.Value
                Plot("AdvanceDeclineRatio", "adr", _adr);
                
            }
        }
    }
    class AdvanceDeclineRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._adr = AdvanceDeclineRatio("")
            self.register_indicator(self._symbol, self._adr, Resolution.DAILY)
            self.register_indicator(reference, self._adr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._adr.is_ready:
                # The current value of self._adr is represented by self._adr.current.value
                self.plot("AdvanceDeclineRatio", "adr", self._adr.current.value)
                
    

    The following reference table describes the AdvanceDeclineRatio constructor:

    AdvanceDeclineRatio

    class QuantConnect.Indicators.AdvanceDeclineRatio [source]

    The advance-decline ratio (ADR) compares the number of stocks that closed higher against the number of stocks that closed lower than their previous day's closing prices.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AdvanceDeclineRatio

    class QuantConnect.Indicators.AdvanceDeclineRatio [source]

    The advance-decline ratio (ADR) compares the number of stocks that closed higher against the number of stocks that closed lower than their previous day's closing prices.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AdvanceDeclineRatio using the plotly library.

    AdvanceDeclineRatio line plot.

     

    Supported Indicators

    Advance Decline Volume Ratio

    Introduction

    The Advance Decline Volume Ratio is a Breadth indicator calculated as ratio of summary volume of advancing stocks to summary volume of declining stocks. AD Volume Ratio is used in technical analysis to see where the main trading activity is focused.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ADVR Indicator

    To create an automatic indicators for AdvanceDeclineVolumeRatio , call the ADVR helper method from the QCAlgorithm class. The ADVR method creates a AdvanceDeclineVolumeRatio object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AdvanceDeclineVolumeRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private AdvanceDeclineVolumeRatio _advr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _advr = ADVR([_symbol, reference]);
        }
    
        public override void OnData(Slice data)
        {
            if (_advr.IsReady)
            {
                // The current value of _advr is represented by itself (_advr)
                // or _advr.Current.Value
                Plot("AdvanceDeclineVolumeRatio", "advr", _advr);
                
            }
        }
    }
    class AdvanceDeclineVolumeRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._advr = self.advr([self._symbol, reference])
    
        def on_data(self, slice: Slice) -> None:
            if self._advr.is_ready:
                # The current value of self._advr is represented by self._advr.current.value
                self.plot("AdvanceDeclineVolumeRatio", "advr", self._advr.current.value)
                
    

    The following reference table describes the ADVR method:

    advr( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Volume Ratio indicator

    Parameters:
    Returns:

    The AdvanceDecline Volume Ratio indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineVolumeRatio

    ADVR( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Volume Ratio indicator

    Parameters:
    Returns:

    The AdvanceDecline Volume Ratio indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineVolumeRatio

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AdvanceDeclineVolumeRatio indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class AdvanceDeclineVolumeRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private AdvanceDeclineVolumeRatio _advr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _advr = new AdvanceDeclineVolumeRatio("");
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _advr.Update(bar);
            }
            if (data.Bars.TryGetValue(_reference, out bar))
            {      
                _advr.Update(bar);
            }
       
            if (_advr.IsReady)
            {
                // The current value of _advr is represented by itself (_advr)
                // or _advr.Current.Value
                Plot("AdvanceDeclineVolumeRatio", "advr", _advr);
                
            }
        }
    }
    class AdvanceDeclineVolumeRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._advr = AdvanceDeclineVolumeRatio("")
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._advr.update(bar)
            bar = slice.bars.get(self.referece)
            if bar:
                self._advr.update(bar)
            if self._advr.is_ready:
                # The current value of self._advr is represented by self._advr.current.value
                self.plot("AdvanceDeclineVolumeRatio", "advr", self._advr.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AdvanceDeclineVolumeRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private AdvanceDeclineVolumeRatio _advr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _advr = new AdvanceDeclineVolumeRatio("");
            RegisterIndicator(_symbol, _advr, Resolution.Daily);
            RegisterIndicator(reference, _advr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_advr.IsReady)
            {
                // The current value of _advr is represented by itself (_advr)
                // or _advr.Current.Value
                Plot("AdvanceDeclineVolumeRatio", "advr", _advr);
                
            }
        }
    }
    class AdvanceDeclineVolumeRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._advr = AdvanceDeclineVolumeRatio("")
            self.register_indicator(self._symbol, self._advr, Resolution.DAILY)
            self.register_indicator(reference, self._advr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._advr.is_ready:
                # The current value of self._advr is represented by self._advr.current.value
                self.plot("AdvanceDeclineVolumeRatio", "advr", self._advr.current.value)
                
    

    The following reference table describes the AdvanceDeclineVolumeRatio constructor:

    AdvanceDeclineVolumeRatio

    class QuantConnect.Indicators.AdvanceDeclineVolumeRatio [source]

    The Advance Decline Volume Ratio is a Breadth indicator calculated as ratio of summary volume of advancing stocks to summary volume of declining stocks. AD Volume Ratio is used in technical analysis to see where the main trading activity is focused.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AdvanceDeclineVolumeRatio

    class QuantConnect.Indicators.AdvanceDeclineVolumeRatio [source]

    The Advance Decline Volume Ratio is a Breadth indicator calculated as ratio of summary volume of advancing stocks to summary volume of declining stocks. AD Volume Ratio is used in technical analysis to see where the main trading activity is focused.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AdvanceDeclineVolumeRatio using the plotly library.

    AdvanceDeclineVolumeRatio line plot.

     

    Supported Indicators

    Alpha

    Introduction

    In financial analysis, the Alpha indicator is used to measure the performance of an investment (such as a stock or ETF) relative to a benchmark index, often representing the broader market. Alpha indicates the excess return of the investment compared to the return of the benchmark index. The S P 500 index is frequently used as a benchmark in Alpha calculations to represent the overall market performance. Alpha is an essential tool for investors to understand the idiosyncratic returns of their investment that aren't caused by movement in the underlying benchmark.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using A Indicator

    To create an automatic indicators for Alpha , call the A helper method from the QCAlgorithm class. The A method creates a Alpha object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AlphaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private Alpha _a;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _a = A(_symbol, reference, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_a.IsReady)
            {
                // The current value of _a is represented by itself (_a)
                // or _a.Current.Value
                Plot("Alpha", "a", _a);
                
            }
        }
    }
    class AlphaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._a = self.a(self._symbol, reference, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._a.is_ready:
                # The current value of self._a is represented by self._a.current.value
                self.plot("Alpha", "a", self._a.current.value)
                
    

    The following reference table describes the A method:

    a( target, reference, alpha_period=1, beta_period=252, resolution=None, risk_free_rate=None, selector=None ) [source]

    Adds a tag to the algorithm

    Parameters:
    Returns:

    The Alpha indicator for the given parameters

    Return type:

    Alpha

    A( target, reference, alphaPeriod=1, betaPeriod=252, resolution=None, riskFreeRate=None, selector=None ) [source]

    Adds a tag to the algorithm

    Parameters:
    Returns:

    The Alpha indicator for the given parameters

    Return type:

    Alpha

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Alpha indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class AlphaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private Alpha _a;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _a = new Alpha("", _symbol, reference, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _a.Update(bar);
            }
            if (data.Bars.TryGetValue(_reference, out bar))
            {      
                _a.Update(bar);
            }
       
            if (_a.IsReady)
            {
                // The current value of _a is represented by itself (_a)
                // or _a.Current.Value
                Plot("Alpha", "a", _a);
                
            }
        }
    }
    class AlphaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._a = Alpha("", self._symbol, reference, 20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._a.update(bar)
            bar = slice.bars.get(self.referece)
            if bar:
                self._a.update(bar)
            if self._a.is_ready:
                # The current value of self._a is represented by self._a.current.value
                self.plot("Alpha", "a", self._a.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AlphaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private Alpha _a;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _a = new Alpha("", _symbol, reference, 20);
            RegisterIndicator(_symbol, _a, Resolution.Daily);
            RegisterIndicator(reference, _a, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_a.IsReady)
            {
                // The current value of _a is represented by itself (_a)
                // or _a.Current.Value
                Plot("Alpha", "a", _a);
                
            }
        }
    }
    class AlphaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._a = Alpha("", self._symbol, reference, 20)
            self.register_indicator(self._symbol, self._a, Resolution.DAILY)
            self.register_indicator(reference, self._a, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._a.is_ready:
                # The current value of self._a is represented by self._a.current.value
                self.plot("Alpha", "a", self._a.current.value)
                
    

    The following reference table describes the Alpha constructor:

    Alpha

    class QuantConnect.Indicators.Alpha [source]

    In financial analysis, the Alpha indicator is used to measure the performance of an investment (such as a stock or ETF) relative to a benchmark index, often representing the broader market. Alpha indicates the excess return of the investment compared to the return of the benchmark index. The S P 500 index is frequently used as a benchmark in Alpha calculations to represent the overall market performance. Alpha is an essential tool for investors to understand the idiosyncratic returns of their investment that aren't caused by movement in the underlying benchmark.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Alpha

    class QuantConnect.Indicators.Alpha [source]

    In financial analysis, the Alpha indicator is used to measure the performance of an investment (such as a stock or ETF) relative to a benchmark index, often representing the broader market. Alpha indicates the excess return of the investment compared to the return of the benchmark index. The S P 500 index is frequently used as a benchmark in Alpha calculations to represent the overall market performance. Alpha is an essential tool for investors to understand the idiosyncratic returns of their investment that aren't caused by movement in the underlying benchmark.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Alpha using the plotly library.

    Alpha line plot.

     

    Supported Indicators

    Arms Index

    Introduction

    The Arms Index, also called the Short-Term Trading Index (TRIN) is a technical analysis indicator that compares the number of advancing and declining stocks (AD Ratio) to advancing and declining volume (AD volume).

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using TRIN Indicator

    To create an automatic indicators for ArmsIndex , call the TRIN helper method from the QCAlgorithm class. The TRIN method creates a ArmsIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ArmsIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private ArmsIndex _trin;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _trin = TRIN([_symbol, reference]);
        }
    
        public override void OnData(Slice data)
        {
            if (_trin.IsReady)
            {
                // The current value of _trin is represented by itself (_trin)
                // or _trin.Current.Value
                Plot("ArmsIndex", "trin", _trin);
                // Plot all properties of trin
                Plot("ArmsIndex", "adratio", _trin.ADRatio);
                Plot("ArmsIndex", "advratio", _trin.ADVRatio);
            }
        }
    }
    class ArmsIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._trin = self.trin([self._symbol, reference])
    
        def on_data(self, slice: Slice) -> None:
            if self._trin.is_ready:
                # The current value of self._trin is represented by self._trin.current.value
                self.plot("ArmsIndex", "trin", self._trin.current.value)
                # Plot all attributes of self._trin
                self.plot("ArmsIndex", "ad_ratio", self._trin.ad_ratio.current.value)
                self.plot("ArmsIndex", "adv_ratio", self._trin.adv_ratio.current.value)
    

    The following reference table describes the TRIN method:

    trin( symbols, resolution=None, selector=None ) [source]

    Creates a new Arms Index indicator

    Parameters:
    Returns:

    The Arms Index indicator for the requested symbol over the specified period

    Return type:

    ArmsIndex

    TRIN( symbols, resolution=None, selector=None ) [source]

    Creates a new Arms Index indicator

    Parameters:
    Returns:

    The Arms Index indicator for the requested symbol over the specified period

    Return type:

    ArmsIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ArmsIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ArmsIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private ArmsIndex _trin;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _trin = new ArmsIndex("");
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _trin.Update(bar);
            }
            if (data.Bars.TryGetValue(_reference, out bar))
            {      
                _trin.Update(bar);
            }
       
            if (_trin.IsReady)
            {
                // The current value of _trin is represented by itself (_trin)
                // or _trin.Current.Value
                Plot("ArmsIndex", "trin", _trin);
                // Plot all properties of trin
                Plot("ArmsIndex", "adratio", _trin.ADRatio);
                Plot("ArmsIndex", "advratio", _trin.ADVRatio);
            }
        }
    }
    class ArmsIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._trin = ArmsIndex("")
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._trin.update(bar)
            bar = slice.bars.get(self.referece)
            if bar:
                self._trin.update(bar)
            if self._trin.is_ready:
                # The current value of self._trin is represented by self._trin.current.value
                self.plot("ArmsIndex", "trin", self._trin.current.value)
                # Plot all attributes of self._trin
                self.plot("ArmsIndex", "ad_ratio", self._trin.ad_ratio.current.value)
                self.plot("ArmsIndex", "adv_ratio", self._trin.adv_ratio.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ArmsIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private ArmsIndex _trin;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _trin = new ArmsIndex("");
            RegisterIndicator(_symbol, _trin, Resolution.Daily);
            RegisterIndicator(reference, _trin, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_trin.IsReady)
            {
                // The current value of _trin is represented by itself (_trin)
                // or _trin.Current.Value
                Plot("ArmsIndex", "trin", _trin);
                // Plot all properties of trin
                Plot("ArmsIndex", "adratio", _trin.ADRatio);
                Plot("ArmsIndex", "advratio", _trin.ADVRatio);
            }
        }
    }
    class ArmsIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._trin = ArmsIndex("")
            self.register_indicator(self._symbol, self._trin, Resolution.DAILY)
            self.register_indicator(reference, self._trin, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._trin.is_ready:
                # The current value of self._trin is represented by self._trin.current.value
                self.plot("ArmsIndex", "trin", self._trin.current.value)
                # Plot all attributes of self._trin
                self.plot("ArmsIndex", "ad_ratio", self._trin.ad_ratio.current.value)
                self.plot("ArmsIndex", "adv_ratio", self._trin.adv_ratio.current.value)
    

    The following reference table describes the ArmsIndex constructor:

    ArmsIndex

    class QuantConnect.Indicators.ArmsIndex [source]

    The Arms Index, also called the Short-Term Trading Index (TRIN) is a technical analysis indicator that compares the number of advancing and declining stocks (AD Ratio) to advancing and declining volume (AD volume).

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property ad_ratio

    Gets the Advance/Decline Ratio (ADR) indicator

    Returns:

    Gets the Advance/Decline Ratio (ADR) indicator

    Return type:

    AdvanceDeclineRatio

    property adv_ratio

    Gets the Advance/Decline Volume Ratio (ADVR) indicator

    Returns:

    Gets the Advance/Decline Volume Ratio (ADVR) indicator

    Return type:

    AdvanceDeclineVolumeRatio

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ArmsIndex

    class QuantConnect.Indicators.ArmsIndex [source]

    The Arms Index, also called the Short-Term Trading Index (TRIN) is a technical analysis indicator that compares the number of advancing and declining stocks (AD Ratio) to advancing and declining volume (AD volume).

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property ADRatio

    Gets the Advance/Decline Ratio (ADR) indicator

    Returns:

    Gets the Advance/Decline Ratio (ADR) indicator

    Return type:

    AdvanceDeclineRatio

    property ADVRatio

    Gets the Advance/Decline Volume Ratio (ADVR) indicator

    Returns:

    Gets the Advance/Decline Volume Ratio (ADVR) indicator

    Return type:

    AdvanceDeclineVolumeRatio

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of ArmsIndex using the plotly library.

    ArmsIndex line plot.

     

    Supported Indicators

    Arnaud Legoux Moving Average

    Introduction

    Smooth and high sensitive moving Average. This moving average reduce lag of the information but still being smooth to reduce noises. Is a weighted moving average, which weights have a Normal shape; the parameters Sigma and Offset affect the kurtosis and skewness of the weights respectively. source

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ALMA Indicator

    To create an automatic indicators for ArnaudLegouxMovingAverage , call the ALMA helper method from the QCAlgorithm class. The ALMA method creates a ArnaudLegouxMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ArnaudLegouxMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ArnaudLegouxMovingAverage _alma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _alma = ALMA(_symbol, 10, 6, 0.85);
        }
    
        public override void OnData(Slice data)
        {
            if (_alma.IsReady)
            {
                // The current value of _alma is represented by itself (_alma)
                // or _alma.Current.Value
                Plot("ArnaudLegouxMovingAverage", "alma", _alma);
                
            }
        }
    }
    class ArnaudLegouxMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._alma = self.alma(self._symbol, 10, 6, 0.85)
    
        def on_data(self, slice: Slice) -> None:
            if self._alma.is_ready:
                # The current value of self._alma is represented by self._alma.current.value
                self.plot("ArnaudLegouxMovingAverage", "alma", self._alma.current.value)
                
    

    The following reference table describes the ALMA method:

    alma( symbol, period, sigma=6, offset=0.85, resolution=None, selector=None ) [source]

    Creates a new ArnaudLegouxMovingAverage indicator.

    Parameters:
    Returns:

    The ArnaudLegouxMovingAverage indicator for the requested symbol over the specified period

    Return type:

    ArnaudLegouxMovingAverage

    ALMA( symbol, period, sigma=6, offset=0.85, resolution=None, selector=None ) [source]

    Creates a new ArnaudLegouxMovingAverage indicator.

    Parameters:
    Returns:

    The ArnaudLegouxMovingAverage indicator for the requested symbol over the specified period

    Return type:

    ArnaudLegouxMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ArnaudLegouxMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class ArnaudLegouxMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ArnaudLegouxMovingAverage _alma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _alma = new ArnaudLegouxMovingAverage(10, 6, 0.85);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _alma.Update(bar.EndTime, bar.Close);
            }
       
            if (_alma.IsReady)
            {
                // The current value of _alma is represented by itself (_alma)
                // or _alma.Current.Value
                Plot("ArnaudLegouxMovingAverage", "alma", _alma);
                
            }
        }
    }
    class ArnaudLegouxMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._alma = ArnaudLegouxMovingAverage(10, 6, 0.85)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._alma.update(bar.EndTime, bar.Close)
            if self._alma.is_ready:
                # The current value of self._alma is represented by self._alma.current.value
                self.plot("ArnaudLegouxMovingAverage", "alma", self._alma.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ArnaudLegouxMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ArnaudLegouxMovingAverage _alma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _alma = new ArnaudLegouxMovingAverage(10, 6, 0.85);
            RegisterIndicator(_symbol, _alma, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_alma.IsReady)
            {
                // The current value of _alma is represented by itself (_alma)
                // or _alma.Current.Value
                Plot("ArnaudLegouxMovingAverage", "alma", _alma);
                
            }
        }
    }
    class ArnaudLegouxMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._alma = ArnaudLegouxMovingAverage(10, 6, 0.85)
            self.register_indicator(self._symbol, self._alma, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._alma.is_ready:
                # The current value of self._alma is represented by self._alma.current.value
                self.plot("ArnaudLegouxMovingAverage", "alma", self._alma.current.value)
                
    

    The following reference table describes the ArnaudLegouxMovingAverage constructor:

    ArnaudLegouxMovingAverage

    class QuantConnect.Indicators.ArnaudLegouxMovingAverage [source]

    Smooth and high sensitive moving Average. This moving average reduce lag of the information but still being smooth to reduce noises. Is a weighted moving average, which weights have a Normal shape; the parameters Sigma and Offset affect the kurtosis and skewness of the weights respectively. Source: https://www.cjournal.cz/files/308.pdf

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ArnaudLegouxMovingAverage

    class QuantConnect.Indicators.ArnaudLegouxMovingAverage [source]

    Smooth and high sensitive moving Average. This moving average reduce lag of the information but still being smooth to reduce noises. Is a weighted moving average, which weights have a Normal shape; the parameters Sigma and Offset affect the kurtosis and skewness of the weights respectively. Source: https://www.cjournal.cz/files/308.pdf

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of ArnaudLegouxMovingAverage using the plotly library.

    ArnaudLegouxMovingAverage line plot.

     

    Supported Indicators

    Aroon Oscillator

    Introduction

    The Aroon Oscillator is the difference between AroonUp and AroonDown. The value of this indicator fluctuates between -100 and +100. An upward trend bias is present when the oscillator is positive, and a negative trend bias is present when the oscillator is negative. AroonUp/Down values over 75 identify strong trends in their respective direction.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using AROON Indicator

    To create an automatic indicators for AroonOscillator , call the AROON helper method from the QCAlgorithm class. The AROON method creates a AroonOscillator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AroonOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AroonOscillator _aroon;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _aroon = AROON(_symbol, 10, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_aroon.IsReady)
            {
                // The current value of _aroon is represented by itself (_aroon)
                // or _aroon.Current.Value
                Plot("AroonOscillator", "aroon", _aroon);
                // Plot all properties of aroon
                Plot("AroonOscillator", "aroonup", _aroon.AroonUp);
                Plot("AroonOscillator", "aroondown", _aroon.AroonDown);
            }
        }
    }
    class AroonOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._aroon = self.aroon(self._symbol, 10, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._aroon.is_ready:
                # The current value of self._aroon is represented by self._aroon.current.value
                self.plot("AroonOscillator", "aroon", self._aroon.current.value)
                # Plot all attributes of self._aroon
                self.plot("AroonOscillator", "aroon_up", self._aroon.aroon_up.current.value)
                self.plot("AroonOscillator", "aroon_down", self._aroon.aroon_down.current.value)
    

    The following reference table describes the AROON method:

    aroon( symbol, up_period, down_period, resolution=None, selector=None ) [source]

    Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

    Parameters:
    Returns:

    An AroonOscillator configured with the specified periods

    Return type:

    AroonOscillator

    aroon( symbol, period, resolution=None, selector=None ) [source]

    Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

    Parameters:
    Returns:

    An AroonOscillator configured with the specified periods

    Return type:

    AroonOscillator

    AROON( symbol, upPeriod, downPeriod, resolution=None, selector=None ) [source]

    Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

    Parameters:
    Returns:

    An AroonOscillator configured with the specified periods

    Return type:

    AroonOscillator

    AROON( symbol, period, resolution=None, selector=None ) [source]

    Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

    Parameters:
    Returns:

    An AroonOscillator configured with the specified periods

    Return type:

    AroonOscillator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AroonOscillator indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class AroonOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AroonOscillator _aroon;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _aroon = new AroonOscillator(10, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _aroon.Update(bar);
            }
       
            if (_aroon.IsReady)
            {
                // The current value of _aroon is represented by itself (_aroon)
                // or _aroon.Current.Value
                Plot("AroonOscillator", "aroon", _aroon);
                // Plot all properties of aroon
                Plot("AroonOscillator", "aroonup", _aroon.AroonUp);
                Plot("AroonOscillator", "aroondown", _aroon.AroonDown);
            }
        }
    }
    class AroonOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._aroon = AroonOscillator(10, 20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._aroon.update(bar)
            if self._aroon.is_ready:
                # The current value of self._aroon is represented by self._aroon.current.value
                self.plot("AroonOscillator", "aroon", self._aroon.current.value)
                # Plot all attributes of self._aroon
                self.plot("AroonOscillator", "aroon_up", self._aroon.aroon_up.current.value)
                self.plot("AroonOscillator", "aroon_down", self._aroon.aroon_down.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AroonOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AroonOscillator _aroon;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _aroon = new AroonOscillator(10, 20);
            RegisterIndicator(_symbol, _aroon, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_aroon.IsReady)
            {
                // The current value of _aroon is represented by itself (_aroon)
                // or _aroon.Current.Value
                Plot("AroonOscillator", "aroon", _aroon);
                // Plot all properties of aroon
                Plot("AroonOscillator", "aroonup", _aroon.AroonUp);
                Plot("AroonOscillator", "aroondown", _aroon.AroonDown);
            }
        }
    }
    class AroonOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._aroon = AroonOscillator(10, 20)
            self.register_indicator(self._symbol, self._aroon, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._aroon.is_ready:
                # The current value of self._aroon is represented by self._aroon.current.value
                self.plot("AroonOscillator", "aroon", self._aroon.current.value)
                # Plot all attributes of self._aroon
                self.plot("AroonOscillator", "aroon_up", self._aroon.aroon_up.current.value)
                self.plot("AroonOscillator", "aroon_down", self._aroon.aroon_down.current.value)
    

    The following reference table describes the AroonOscillator constructor:

    AroonOscillator

    class QuantConnect.Indicators.AroonOscillator [source]

    The Aroon Oscillator is the difference between AroonUp and AroonDown. The value of this indicator fluctuates between -100 and +100. An upward trend bias is present when the oscillator is positive, and a negative trend bias is present when the oscillator is negative. AroonUp/Down values over 75 identify strong trends in their respective direction.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and both sub-indicators (AroonUp and AroonDown)

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property aroon_down

    Gets the AroonDown indicator

    Returns:

    Gets the AroonDown indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property aroon_up

    Gets the AroonUp indicator

    Returns:

    Gets the AroonUp indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AroonOscillator

    class QuantConnect.Indicators.AroonOscillator [source]

    The Aroon Oscillator is the difference between AroonUp and AroonDown. The value of this indicator fluctuates between -100 and +100. An upward trend bias is present when the oscillator is positive, and a negative trend bias is present when the oscillator is negative. AroonUp/Down values over 75 identify strong trends in their respective direction.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and both sub-indicators (AroonUp and AroonDown)

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property AroonDown

    Gets the AroonDown indicator

    Returns:

    Gets the AroonDown indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property AroonUp

    Gets the AroonUp indicator

    Returns:

    Gets the AroonUp indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AroonOscillator using the plotly library.

    AroonOscillator line plot.

     

    Supported Indicators

    Augen Price Spike

    Introduction

    The Augen Price Spike indicator is an indicator that measures price changes in terms of standard deviations. In the book, The Volatility Edge in Options Trading, Jeff Augen describes a method for tracking absolute price changes in terms of recent volatility, using the standard deviation. length = x closes = closeArray closes1 = closeArray shifted right by 1 closes2 = closeArray shifted right by 2 closeLog = np.log(np.divide(closes1, closes2)) SDev = np.std(closeLog) m = SDev * closes1[-1] spike = (closes[-1]-closes1[-1])/m return spike Augen Price Spike from TradingView https://www.tradingview.com/script/fC7Pn2X2-Price-Spike-Jeff-Augen/

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using APS Indicator

    To create an automatic indicators for AugenPriceSpike , call the APS helper method from the QCAlgorithm class. The APS method creates a AugenPriceSpike object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AugenPriceSpikeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AugenPriceSpike _aps;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _aps = APS(_symbol, 3);
        }
    
        public override void OnData(Slice data)
        {
            if (_aps.IsReady)
            {
                // The current value of _aps is represented by itself (_aps)
                // or _aps.Current.Value
                Plot("AugenPriceSpike", "aps", _aps);
                
            }
        }
    }
    class AugenPriceSpikeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._aps = self.aps(self._symbol, 3)
    
        def on_data(self, slice: Slice) -> None:
            if self._aps.is_ready:
                # The current value of self._aps is represented by self._aps.current.value
                self.plot("AugenPriceSpike", "aps", self._aps.current.value)
                
    

    The following reference table describes the APS method:

    aps( symbol, period=3, resolution=None, selector=None ) [source]

    Creates an AugenPriceSpike indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The AugenPriceSpike indicator for the given parameters

    Return type:

    AugenPriceSpike

    APS( symbol, period=3, resolution=None, selector=None ) [source]

    Creates an AugenPriceSpike indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The AugenPriceSpike indicator for the given parameters

    Return type:

    AugenPriceSpike

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AugenPriceSpike indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class AugenPriceSpikeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AugenPriceSpike _aps;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _aps = new AugenPriceSpike(3);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _aps.Update(bar.EndTime, bar.Close);
            }
       
            if (_aps.IsReady)
            {
                // The current value of _aps is represented by itself (_aps)
                // or _aps.Current.Value
                Plot("AugenPriceSpike", "aps", _aps);
                
            }
        }
    }
    class AugenPriceSpikeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._aps = AugenPriceSpike(3)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._aps.update(bar.EndTime, bar.Close)
            if self._aps.is_ready:
                # The current value of self._aps is represented by self._aps.current.value
                self.plot("AugenPriceSpike", "aps", self._aps.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AugenPriceSpikeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AugenPriceSpike _aps;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _aps = new AugenPriceSpike(3);
            RegisterIndicator(_symbol, _aps, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_aps.IsReady)
            {
                // The current value of _aps is represented by itself (_aps)
                // or _aps.Current.Value
                Plot("AugenPriceSpike", "aps", _aps);
                
            }
        }
    }
    class AugenPriceSpikeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._aps = AugenPriceSpike(3)
            self.register_indicator(self._symbol, self._aps, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._aps.is_ready:
                # The current value of self._aps is represented by self._aps.current.value
                self.plot("AugenPriceSpike", "aps", self._aps.current.value)
                
    

    The following reference table describes the AugenPriceSpike constructor:

    AugenPriceSpike

    class QuantConnect.Indicators.AugenPriceSpike [source]

    The Augen Price Spike indicator is an indicator that measures price changes in terms of standard deviations. In the book, The Volatility Edge in Options Trading, Jeff Augen describes a method for tracking absolute price changes in terms of recent volatility, using the standard deviation. length = x closes = closeArray closes1 = closeArray shifted right by 1 closes2 = closeArray shifted right by 2 closeLog = np.log(np.divide(closes1, closes2)) SDev = np.std(closeLog) m = SDev * closes1[-1] spike = (closes[-1]-closes1[-1])/m return spike Augen Price Spike from TradingView https://www.tradingview.com/script/fC7Pn2X2-Price-Spike-Jeff-Augen/

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AugenPriceSpike

    class QuantConnect.Indicators.AugenPriceSpike [source]

    The Augen Price Spike indicator is an indicator that measures price changes in terms of standard deviations. In the book, The Volatility Edge in Options Trading, Jeff Augen describes a method for tracking absolute price changes in terms of recent volatility, using the standard deviation. length = x closes = closeArray closes1 = closeArray shifted right by 1 closes2 = closeArray shifted right by 2 closeLog = np.log(np.divide(closes1, closes2)) SDev = np.std(closeLog) m = SDev * closes1[-1] spike = (closes[-1]-closes1[-1])/m return spike Augen Price Spike from TradingView https://www.tradingview.com/script/fC7Pn2X2-Price-Spike-Jeff-Augen/

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AugenPriceSpike using the plotly library.

    AugenPriceSpike line plot.

     

    Supported Indicators

    Auto Regressive Integrated Moving Average

    Introduction

    An Autoregressive Intergrated Moving Average (ARIMA) is a time series model which can be used to describe a set of data. In particular,with Xₜ representing the series, the model assumes the data are of form (after differencing times): Xₜ = c + εₜ + ΣᵢφᵢXₜ₋ᵢ + Σᵢθᵢεₜ₋ᵢ where the first sum has an upper limit of and the second .

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ARIMA Indicator

    To create an automatic indicators for AutoRegressiveIntegratedMovingAverage , call the ARIMA helper method from the QCAlgorithm class. The ARIMA method creates a AutoRegressiveIntegratedMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AutoRegressiveIntegratedMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AutoRegressiveIntegratedMovingAverage _arima;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _arima = ARIMA(_symbol, 1, 1, 1, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_arima.IsReady)
            {
                // The current value of _arima is represented by itself (_arima)
                // or _arima.Current.Value
                Plot("AutoRegressiveIntegratedMovingAverage", "arima", _arima);
                // Plot all properties of arima
                Plot("AutoRegressiveIntegratedMovingAverage", "arresidualerror", _arima.ArResidualError);
                Plot("AutoRegressiveIntegratedMovingAverage", "maresidualerror", _arima.MaResidualError);
            }
        }
    }
    class AutoRegressiveIntegratedMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._arima = self.arima(self._symbol, 1, 1, 1, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._arima.is_ready:
                # The current value of self._arima is represented by self._arima.current.value
                self.plot("AutoRegressiveIntegratedMovingAverage", "arima", self._arima.current.value)
                # Plot all attributes of self._arima
                self.plot("AutoRegressiveIntegratedMovingAverage", "ar_residual_error", self._arima.ar_residual_error)
                self.plot("AutoRegressiveIntegratedMovingAverage", "ma_residual_error", self._arima.ma_residual_error)
    

    The following reference table describes the ARIMA method:

    arima( symbol, ar_order, diff_order, ma_order, period, resolution=None, selector=None ) [source]

    Creates a new ARIMA indicator.

    Parameters:
    Returns:

    The ARIMA indicator for the requested symbol over the specified period

    Return type:

    AutoRegressiveIntegratedMovingAverage

    ARIMA( symbol, arOrder, diffOrder, maOrder, period, resolution=None, selector=None ) [source]

    Creates a new ARIMA indicator.

    Parameters:
    Returns:

    The ARIMA indicator for the requested symbol over the specified period

    Return type:

    AutoRegressiveIntegratedMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AutoRegressiveIntegratedMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class AutoRegressiveIntegratedMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AutoRegressiveIntegratedMovingAverage _arima;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _arima = new AutoRegressiveIntegratedMovingAverage(1, 1, 1, 20, True);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _arima.Update(bar.EndTime, bar.Close);
            }
       
            if (_arima.IsReady)
            {
                // The current value of _arima is represented by itself (_arima)
                // or _arima.Current.Value
                Plot("AutoRegressiveIntegratedMovingAverage", "arima", _arima);
                // Plot all properties of arima
                Plot("AutoRegressiveIntegratedMovingAverage", "arresidualerror", _arima.ArResidualError);
                Plot("AutoRegressiveIntegratedMovingAverage", "maresidualerror", _arima.MaResidualError);
            }
        }
    }
    class AutoRegressiveIntegratedMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._arima = AutoRegressiveIntegratedMovingAverage(1, 1, 1, 20, True)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._arima.update(bar.EndTime, bar.Close)
            if self._arima.is_ready:
                # The current value of self._arima is represented by self._arima.current.value
                self.plot("AutoRegressiveIntegratedMovingAverage", "arima", self._arima.current.value)
                # Plot all attributes of self._arima
                self.plot("AutoRegressiveIntegratedMovingAverage", "ar_residual_error", self._arima.ar_residual_error)
                self.plot("AutoRegressiveIntegratedMovingAverage", "ma_residual_error", self._arima.ma_residual_error)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AutoRegressiveIntegratedMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AutoRegressiveIntegratedMovingAverage _arima;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _arima = new AutoRegressiveIntegratedMovingAverage(1, 1, 1, 20, True);
            RegisterIndicator(_symbol, _arima, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_arima.IsReady)
            {
                // The current value of _arima is represented by itself (_arima)
                // or _arima.Current.Value
                Plot("AutoRegressiveIntegratedMovingAverage", "arima", _arima);
                
            }
        }
    }
    class AutoRegressiveIntegratedMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._arima = AutoRegressiveIntegratedMovingAverage(1, 1, 1, 20, True)
            self.register_indicator(self._symbol, self._arima, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._arima.is_ready:
                # The current value of self._arima is represented by self._arima.current.value
                self.plot("AutoRegressiveIntegratedMovingAverage", "arima", self._arima.current.value)
                
    

    The following reference table describes the AutoRegressiveIntegratedMovingAverage constructor:

    AutoRegressiveIntegratedMovingAverage

    class QuantConnect.Indicators.AutoRegressiveIntegratedMovingAverage [source]

    An Autoregressive Intergrated Moving Average (ARIMA) is a time series model which can be used to describe a set of data. In particular,with Xₜ representing the series, the model assumes the data are of form (after differencing _diffOrder times): Xₜ = c + εₜ + ΣᵢφᵢXₜ₋ᵢ + Σᵢθᵢεₜ₋ᵢ where the first sum has an upper limit of _arOrder and the second _maOrder .

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property ar_residual_error

    The variance of the residuals (Var(ε)) from the first step of Double[]) .

    Returns:

    The variance of the residuals (Var(ε)) from the first step of Double[]) .

    Return type:

    float

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property ma_residual_error

    The variance of the residuals (Var(ε)) from the second step of Double[]) .

    Returns:

    The variance of the residuals (Var(ε)) from the second step of Double[]) .

    Return type:

    float

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    field ar_parameters

    Fitted AR parameters (φ terms).

    Returns:

    Fitted AR parameters (φ terms).

    Return type:

    float[]

    field intercept

    Fitted intercept (c term).

    Returns:

    Fitted intercept (c term).

    Return type:

    float

    field ma_parameters

    Fitted MA parameters (θ terms).

    Returns:

    Fitted MA parameters (θ terms).

    Return type:

    float[]

    AutoRegressiveIntegratedMovingAverage

    class QuantConnect.Indicators.AutoRegressiveIntegratedMovingAverage [source]

    An Autoregressive Intergrated Moving Average (ARIMA) is a time series model which can be used to describe a set of data. In particular,with Xₜ representing the series, the model assumes the data are of form (after differencing _diffOrder times): Xₜ = c + εₜ + ΣᵢφᵢXₜ₋ᵢ + Σᵢθᵢεₜ₋ᵢ where the first sum has an upper limit of _arOrder and the second _maOrder .

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property ArResidualError

    The variance of the residuals (Var(ε)) from the first step of Double[]) .

    Returns:

    The variance of the residuals (Var(ε)) from the first step of Double[]) .

    Return type:

    Double

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property MaResidualError

    The variance of the residuals (Var(ε)) from the second step of Double[]) .

    Returns:

    The variance of the residuals (Var(ε)) from the second step of Double[]) .

    Return type:

    Double

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    field ArParameters

    Fitted AR parameters (φ terms).

    Returns:

    Fitted AR parameters (φ terms).

    Return type:

    Double[]

    field Intercept

    Fitted intercept (c term).

    Returns:

    Fitted intercept (c term).

    Return type:

    Double

    field MaParameters

    Fitted MA parameters (θ terms).

    Returns:

    Fitted MA parameters (θ terms).

    Return type:

    Double[]

    Visualization

    The following image shows plot values of selected properties of AutoRegressiveIntegratedMovingAverage using the plotly library.

    AutoRegressiveIntegratedMovingAverage line plot.

     

    Supported Indicators

    Average Directional Index

    Introduction

    This indicator computes Average Directional Index which measures trend strength without regard to trend direction. Firstly, it calculates the Directional Movement and the True Range value, and then the values are accumulated and smoothed using a custom smoothing method proposed by Wilder. For an n period smoothing, 1/n of each period's value is added to the total period. From these accumulated values we are therefore able to derived the 'Positive Directional Index' (+DI) and 'Negative Directional Index' (-DI) which is used to calculate the Average Directional Index. Computation source: https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_directional_index_adx

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ADX Indicator

    To create an automatic indicators for AverageDirectionalIndex , call the ADX helper method from the QCAlgorithm class. The ADX method creates a AverageDirectionalIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AverageDirectionalIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AverageDirectionalIndex _adx;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _adx = ADX(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_adx.IsReady)
            {
                // The current value of _adx is represented by itself (_adx)
                // or _adx.Current.Value
                Plot("AverageDirectionalIndex", "adx", _adx);
                // Plot all properties of adx
                Plot("AverageDirectionalIndex", "positivedirectionalindex", _adx.PositiveDirectionalIndex);
                Plot("AverageDirectionalIndex", "negativedirectionalindex", _adx.NegativeDirectionalIndex);
            }
        }
    }
    class AverageDirectionalIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._adx = self.adx(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._adx.is_ready:
                # The current value of self._adx is represented by self._adx.current.value
                self.plot("AverageDirectionalIndex", "adx", self._adx.current.value)
                # Plot all attributes of self._adx
                self.plot("AverageDirectionalIndex", "positive_directional_index", self._adx.positive_directional_index.current.value)
                self.plot("AverageDirectionalIndex", "negative_directional_index", self._adx.negative_directional_index.current.value)
    

    The following reference table describes the ADX method:

    adx( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Average Directional Index indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Average Directional Index indicator for the requested symbol.

    Return type:

    AverageDirectionalIndex

    ADX( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Average Directional Index indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Average Directional Index indicator for the requested symbol.

    Return type:

    AverageDirectionalIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AverageDirectionalIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class AverageDirectionalIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AverageDirectionalIndex _adx;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _adx = new AverageDirectionalIndex(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _adx.Update(bar);
            }
       
            if (_adx.IsReady)
            {
                // The current value of _adx is represented by itself (_adx)
                // or _adx.Current.Value
                Plot("AverageDirectionalIndex", "adx", _adx);
                // Plot all properties of adx
                Plot("AverageDirectionalIndex", "positivedirectionalindex", _adx.PositiveDirectionalIndex);
                Plot("AverageDirectionalIndex", "negativedirectionalindex", _adx.NegativeDirectionalIndex);
            }
        }
    }
    class AverageDirectionalIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._adx = AverageDirectionalIndex(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._adx.update(bar)
            if self._adx.is_ready:
                # The current value of self._adx is represented by self._adx.current.value
                self.plot("AverageDirectionalIndex", "adx", self._adx.current.value)
                # Plot all attributes of self._adx
                self.plot("AverageDirectionalIndex", "positive_directional_index", self._adx.positive_directional_index.current.value)
                self.plot("AverageDirectionalIndex", "negative_directional_index", self._adx.negative_directional_index.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AverageDirectionalIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AverageDirectionalIndex _adx;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _adx = new AverageDirectionalIndex(20);
            RegisterIndicator(_symbol, _adx, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_adx.IsReady)
            {
                // The current value of _adx is represented by itself (_adx)
                // or _adx.Current.Value
                Plot("AverageDirectionalIndex", "adx", _adx);
                // Plot all properties of adx
                Plot("AverageDirectionalIndex", "positivedirectionalindex", _adx.PositiveDirectionalIndex);
                Plot("AverageDirectionalIndex", "negativedirectionalindex", _adx.NegativeDirectionalIndex);
            }
        }
    }
    class AverageDirectionalIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._adx = AverageDirectionalIndex(20)
            self.register_indicator(self._symbol, self._adx, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._adx.is_ready:
                # The current value of self._adx is represented by self._adx.current.value
                self.plot("AverageDirectionalIndex", "adx", self._adx.current.value)
                # Plot all attributes of self._adx
                self.plot("AverageDirectionalIndex", "positive_directional_index", self._adx.positive_directional_index.current.value)
                self.plot("AverageDirectionalIndex", "negative_directional_index", self._adx.negative_directional_index.current.value)
    

    The following reference table describes the AverageDirectionalIndex constructor:

    AverageDirectionalIndex

    class QuantConnect.Indicators.AverageDirectionalIndex [source]

    This indicator computes Average Directional Index which measures trend strength without regard to trend direction. Firstly, it calculates the Directional Movement and the True Range value, and then the values are accumulated and smoothed using a custom smoothing method proposed by Wilder. For an n period smoothing, 1/n of each period's value is added to the total period. From these accumulated values we are therefore able to derived the 'Positive Directional Index' (+DI) and 'Negative Directional Index' (-DI) which is used to calculate the Average Directional Index. Computation source: https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_directional_index_adx

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property negative_directional_index

    Gets the index of the Minus Directional Indicator

    Returns:

    Gets the index of the Minus Directional Indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property positive_directional_index

    Gets the index of the Plus Directional Indicator

    Returns:

    Gets the index of the Plus Directional Indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AverageDirectionalIndex

    class QuantConnect.Indicators.AverageDirectionalIndex [source]

    This indicator computes Average Directional Index which measures trend strength without regard to trend direction. Firstly, it calculates the Directional Movement and the True Range value, and then the values are accumulated and smoothed using a custom smoothing method proposed by Wilder. For an n period smoothing, 1/n of each period's value is added to the total period. From these accumulated values we are therefore able to derived the 'Positive Directional Index' (+DI) and 'Negative Directional Index' (-DI) which is used to calculate the Average Directional Index. Computation source: https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_directional_index_adx

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property NegativeDirectionalIndex

    Gets the index of the Minus Directional Indicator

    Returns:

    Gets the index of the Minus Directional Indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property PositiveDirectionalIndex

    Gets the index of the Plus Directional Indicator

    Returns:

    Gets the index of the Plus Directional Indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AverageDirectionalIndex using the plotly library.

    AverageDirectionalIndex line plot.

     

    Supported Indicators

    Average Directional Movement Index Rating

    Introduction

    This indicator computes the Average Directional Movement Index Rating (ADXR). The Average Directional Movement Index Rating is calculated with the following formula: ADXR[i] = (ADX[i] + ADX[i - period + 1]) / 2

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ADXR Indicator

    To create an automatic indicators for AverageDirectionalMovementIndexRating , call the ADXR helper method from the QCAlgorithm class. The ADXR method creates a AverageDirectionalMovementIndexRating object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AverageDirectionalMovementIndexRatingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AverageDirectionalMovementIndexRating _adxr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _adxr = ADXR(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_adxr.IsReady)
            {
                // The current value of _adxr is represented by itself (_adxr)
                // or _adxr.Current.Value
                Plot("AverageDirectionalMovementIndexRating", "adxr", _adxr);
                // Plot all properties of adxr
                Plot("AverageDirectionalMovementIndexRating", "adx", _adxr.ADX);
            }
        }
    }
    class AverageDirectionalMovementIndexRatingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._adxr = self.adxr(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._adxr.is_ready:
                # The current value of self._adxr is represented by self._adxr.current.value
                self.plot("AverageDirectionalMovementIndexRating", "adxr", self._adxr.current.value)
                # Plot all attributes of self._adxr
                self.plot("AverageDirectionalMovementIndexRating", "adx", self._adxr.adx.current.value)
    

    The following reference table describes the ADXR method:

    adxr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new AverageDirectionalMovementIndexRating indicator.

    Parameters:
    Returns:

    The AverageDirectionalMovementIndexRating indicator for the requested symbol over the specified period

    Return type:

    AverageDirectionalMovementIndexRating

    ADXR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new AverageDirectionalMovementIndexRating indicator.

    Parameters:
    Returns:

    The AverageDirectionalMovementIndexRating indicator for the requested symbol over the specified period

    Return type:

    AverageDirectionalMovementIndexRating

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AverageDirectionalMovementIndexRating indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class AverageDirectionalMovementIndexRatingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AverageDirectionalMovementIndexRating _adxr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _adxr = new AverageDirectionalMovementIndexRating(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _adxr.Update(bar);
            }
       
            if (_adxr.IsReady)
            {
                // The current value of _adxr is represented by itself (_adxr)
                // or _adxr.Current.Value
                Plot("AverageDirectionalMovementIndexRating", "adxr", _adxr);
                // Plot all properties of adxr
                Plot("AverageDirectionalMovementIndexRating", "adx", _adxr.ADX);
            }
        }
    }
    class AverageDirectionalMovementIndexRatingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._adxr = AverageDirectionalMovementIndexRating(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._adxr.update(bar)
            if self._adxr.is_ready:
                # The current value of self._adxr is represented by self._adxr.current.value
                self.plot("AverageDirectionalMovementIndexRating", "adxr", self._adxr.current.value)
                # Plot all attributes of self._adxr
                self.plot("AverageDirectionalMovementIndexRating", "adx", self._adxr.adx.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AverageDirectionalMovementIndexRatingAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AverageDirectionalMovementIndexRating _adxr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _adxr = new AverageDirectionalMovementIndexRating(20);
            RegisterIndicator(_symbol, _adxr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_adxr.IsReady)
            {
                // The current value of _adxr is represented by itself (_adxr)
                // or _adxr.Current.Value
                Plot("AverageDirectionalMovementIndexRating", "adxr", _adxr);
                // Plot all properties of adxr
                Plot("AverageDirectionalMovementIndexRating", "adx", _adxr.ADX);
            }
        }
    }
    class AverageDirectionalMovementIndexRatingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._adxr = AverageDirectionalMovementIndexRating(20)
            self.register_indicator(self._symbol, self._adxr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._adxr.is_ready:
                # The current value of self._adxr is represented by self._adxr.current.value
                self.plot("AverageDirectionalMovementIndexRating", "adxr", self._adxr.current.value)
                # Plot all attributes of self._adxr
                self.plot("AverageDirectionalMovementIndexRating", "adx", self._adxr.adx.current.value)
    

    The following reference table describes the AverageDirectionalMovementIndexRating constructor:

    AverageDirectionalMovementIndexRating

    class QuantConnect.Indicators.AverageDirectionalMovementIndexRating [source]

    This indicator computes the Average Directional Movement Index Rating (ADXR). The Average Directional Movement Index Rating is calculated with the following formula: ADXR[i] = (ADX[i] + ADX[i - period + 1]) / 2

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property adx

    The Average Directional Index indicator instance being used

    Returns:

    The Average Directional Index indicator instance being used

    Return type:

    AverageDirectionalIndex

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AverageDirectionalMovementIndexRating

    class QuantConnect.Indicators.AverageDirectionalMovementIndexRating [source]

    This indicator computes the Average Directional Movement Index Rating (ADXR). The Average Directional Movement Index Rating is calculated with the following formula: ADXR[i] = (ADX[i] + ADX[i - period + 1]) / 2

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property ADX

    The Average Directional Index indicator instance being used

    Returns:

    The Average Directional Index indicator instance being used

    Return type:

    AverageDirectionalIndex

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AverageDirectionalMovementIndexRating using the plotly library.

    AverageDirectionalMovementIndexRating line plot.

     

    Supported Indicators

    Average True Range

    Introduction

    The AverageTrueRange indicator is a measure of volatility introduced by Welles Wilder in his book: New Concepts in Technical Trading Systems. This indicator computes the TrueRange and then smoothes the TrueRange over a given period. TrueRange is defined as the maximum of the following: High - Low ABS(High - PreviousClose) ABS(Low - PreviousClose)

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ATR Indicator

    To create an automatic indicators for AverageTrueRange , call the ATR helper method from the QCAlgorithm class. The ATR method creates a AverageTrueRange object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AverageTrueRangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AverageTrueRange _atr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _atr = ATR(_symbol, 20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (_atr.IsReady)
            {
                // The current value of _atr is represented by itself (_atr)
                // or _atr.Current.Value
                Plot("AverageTrueRange", "atr", _atr);
                // Plot all properties of atr
                Plot("AverageTrueRange", "truerange", _atr.TrueRange);
            }
        }
    }
    class AverageTrueRangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._atr = self.atr(self._symbol, 20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            if self._atr.is_ready:
                # The current value of self._atr is represented by self._atr.current.value
                self.plot("AverageTrueRange", "atr", self._atr.current.value)
                # Plot all attributes of self._atr
                self.plot("AverageTrueRange", "true_range", self._atr.True_range.current.value)
    

    The following reference table describes the ATR method:

    atr( symbol, period, type=0, resolution=None, selector=None ) [source]

    Creates a new AverageTrueRange indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new AverageTrueRange indicator with the specified smoothing type and period

    Return type:

    AverageTrueRange

    ATR( symbol, period, type=0, resolution=None, selector=None ) [source]

    Creates a new AverageTrueRange indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new AverageTrueRange indicator with the specified smoothing type and period

    Return type:

    AverageTrueRange

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AverageTrueRange indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class AverageTrueRangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AverageTrueRange _atr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _atr = new AverageTrueRange(20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _atr.Update(bar);
            }
       
            if (_atr.IsReady)
            {
                // The current value of _atr is represented by itself (_atr)
                // or _atr.Current.Value
                Plot("AverageTrueRange", "atr", _atr);
                // Plot all properties of atr
                Plot("AverageTrueRange", "truerange", _atr.TrueRange);
            }
        }
    }
    class AverageTrueRangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._atr = AverageTrueRange(20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._atr.update(bar)
            if self._atr.is_ready:
                # The current value of self._atr is represented by self._atr.current.value
                self.plot("AverageTrueRange", "atr", self._atr.current.value)
                # Plot all attributes of self._atr
                self.plot("AverageTrueRange", "true_range", self._atr.True_range.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AverageTrueRangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AverageTrueRange _atr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _atr = new AverageTrueRange(20, MovingAverageType.Simple);
            RegisterIndicator(_symbol, _atr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_atr.IsReady)
            {
                // The current value of _atr is represented by itself (_atr)
                // or _atr.Current.Value
                Plot("AverageTrueRange", "atr", _atr);
                // Plot all properties of atr
                Plot("AverageTrueRange", "truerange", _atr.TrueRange);
            }
        }
    }
    class AverageTrueRangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._atr = AverageTrueRange(20, MovingAverageType.Simple)
            self.register_indicator(self._symbol, self._atr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._atr.is_ready:
                # The current value of self._atr is represented by self._atr.current.value
                self.plot("AverageTrueRange", "atr", self._atr.current.value)
                # Plot all attributes of self._atr
                self.plot("AverageTrueRange", "true_range", self._atr.True_range.current.value)
    

    The following reference table describes the AverageTrueRange constructor:

    AverageTrueRange

    class QuantConnect.Indicators.AverageTrueRange [source]

    The AverageTrueRange indicator is a measure of volatility introduced by Welles Wilder in his book: New Concepts in Technical Trading Systems. This indicator computes the TrueRange and then smoothes the TrueRange over a given period. TrueRange is defined as the maximum of the following: High - Low ABS(High - PreviousClose) ABS(Low - PreviousClose)

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property true_range

    Gets the true range which is the more volatile calculation to be smoothed by this indicator

    Returns:

    Gets the true range which is the more volatile calculation to be smoothed by this indicator

    Return type:

    IndicatorBase[IBaseDataBar]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AverageTrueRange

    class QuantConnect.Indicators.AverageTrueRange [source]

    The AverageTrueRange indicator is a measure of volatility introduced by Welles Wilder in his book: New Concepts in Technical Trading Systems. This indicator computes the TrueRange and then smoothes the TrueRange over a given period. TrueRange is defined as the maximum of the following: High - Low ABS(High - PreviousClose) ABS(Low - PreviousClose)

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property TrueRange

    Gets the true range which is the more volatile calculation to be smoothed by this indicator

    Returns:

    Gets the true range which is the more volatile calculation to be smoothed by this indicator

    Return type:

    IndicatorBase<IBaseDataBar>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AverageTrueRange using the plotly library.

    AverageTrueRange line plot.

     

    Supported Indicators

    Awesome Oscillator

    Introduction

    The Awesome Oscillator Indicator tracks the price midpoint-movement of a security. Specifically, AO = MAfast[(H+L)/2] - MAslow[(H+L)/2] where MAfast and MAslow denote simple moving averages wherein fast has a shorter period. https://www.barchart.com/education/technical-indicators/awesome_oscillator

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using AO Indicator

    To create an automatic indicators for AwesomeOscillator , call the AO helper method from the QCAlgorithm class. The AO method creates a AwesomeOscillator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class AwesomeOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AwesomeOscillator _ao;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ao = AO(_symbol, 10, 20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (_ao.IsReady)
            {
                // The current value of _ao is represented by itself (_ao)
                // or _ao.Current.Value
                Plot("AwesomeOscillator", "ao", _ao);
                // Plot all properties of ao
                Plot("AwesomeOscillator", "slowao", _ao.SlowAo);
                Plot("AwesomeOscillator", "fastao", _ao.FastAo);
            }
        }
    }
    class AwesomeOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ao = self.ao(self._symbol, 10, 20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            if self._ao.is_ready:
                # The current value of self._ao is represented by self._ao.current.value
                self.plot("AwesomeOscillator", "ao", self._ao.current.value)
                # Plot all attributes of self._ao
                self.plot("AwesomeOscillator", "slow_ao", self._ao.slow_ao.current.value)
                self.plot("AwesomeOscillator", "fast_ao", self._ao.fast_ao.current.value)
    

    The following reference table describes the AO method:

    ao( symbol, slow_period, fast_period, type, resolution=None, selector=None ) [source]

    Creates a new Awesome Oscillator from the specified periods.

    Parameters:
    Return type:

    AwesomeOscillator

    AO( symbol, slowPeriod, fastPeriod, type, resolution=None, selector=None ) [source]

    Creates a new Awesome Oscillator from the specified periods.

    Parameters:
    Return type:

    AwesomeOscillator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a AwesomeOscillator indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class AwesomeOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AwesomeOscillator _ao;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ao = new AwesomeOscillator(10, 20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _ao.Update(bar);
            }
       
            if (_ao.IsReady)
            {
                // The current value of _ao is represented by itself (_ao)
                // or _ao.Current.Value
                Plot("AwesomeOscillator", "ao", _ao);
                // Plot all properties of ao
                Plot("AwesomeOscillator", "slowao", _ao.SlowAo);
                Plot("AwesomeOscillator", "fastao", _ao.FastAo);
            }
        }
    }
    class AwesomeOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ao = AwesomeOscillator(10, 20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._ao.update(bar)
            if self._ao.is_ready:
                # The current value of self._ao is represented by self._ao.current.value
                self.plot("AwesomeOscillator", "ao", self._ao.current.value)
                # Plot all attributes of self._ao
                self.plot("AwesomeOscillator", "slow_ao", self._ao.slow_ao.current.value)
                self.plot("AwesomeOscillator", "fast_ao", self._ao.fast_ao.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class AwesomeOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private AwesomeOscillator _ao;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ao = new AwesomeOscillator(10, 20, MovingAverageType.Simple);
            RegisterIndicator(_symbol, _ao, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_ao.IsReady)
            {
                // The current value of _ao is represented by itself (_ao)
                // or _ao.Current.Value
                Plot("AwesomeOscillator", "ao", _ao);
                // Plot all properties of ao
                Plot("AwesomeOscillator", "slowao", _ao.SlowAo);
                Plot("AwesomeOscillator", "fastao", _ao.FastAo);
            }
        }
    }
    class AwesomeOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ao = AwesomeOscillator(10, 20, MovingAverageType.Simple)
            self.register_indicator(self._symbol, self._ao, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._ao.is_ready:
                # The current value of self._ao is represented by self._ao.current.value
                self.plot("AwesomeOscillator", "ao", self._ao.current.value)
                # Plot all attributes of self._ao
                self.plot("AwesomeOscillator", "slow_ao", self._ao.slow_ao.current.value)
                self.plot("AwesomeOscillator", "fast_ao", self._ao.fast_ao.current.value)
    

    The following reference table describes the AwesomeOscillator constructor:

    AwesomeOscillator

    class QuantConnect.Indicators.AwesomeOscillator [source]

    The Awesome Oscillator Indicator tracks the price midpoint-movement of a security. Specifically, AO = MAfast[(H+L)/2] - MAslow[(H+L)/2] where MAfast and MAslow denote simple moving averages wherein fast has a shorter period. https://www.barchart.com/education/technical-indicators/awesome_oscillator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property fast_ao

    Gets the indicators fast period moving average.

    Returns:

    Gets the indicators fast period moving average.

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property slow_ao

    Gets the indicators slow period moving average.

    Returns:

    Gets the indicators slow period moving average.

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AwesomeOscillator

    class QuantConnect.Indicators.AwesomeOscillator [source]

    The Awesome Oscillator Indicator tracks the price midpoint-movement of a security. Specifically, AO = MAfast[(H+L)/2] - MAslow[(H+L)/2] where MAfast and MAslow denote simple moving averages wherein fast has a shorter period. https://www.barchart.com/education/technical-indicators/awesome_oscillator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property FastAo

    Gets the indicators fast period moving average.

    Returns:

    Gets the indicators fast period moving average.

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property SlowAo

    Gets the indicators slow period moving average.

    Returns:

    Gets the indicators slow period moving average.

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of AwesomeOscillator using the plotly library.

    AwesomeOscillator line plot.

     

    Supported Indicators

    Balance Of Power

    Introduction

    This indicator computes the Balance Of Power (BOP). The Balance Of Power is calculated with the following formula: BOP = (Close - Open) / (High - Low)

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using BOP Indicator

    To create an automatic indicators for BalanceOfPower , call the BOP helper method from the QCAlgorithm class. The BOP method creates a BalanceOfPower object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class BalanceOfPowerAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BalanceOfPower _bop;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _bop = BOP(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_bop.IsReady)
            {
                // The current value of _bop is represented by itself (_bop)
                // or _bop.Current.Value
                Plot("BalanceOfPower", "bop", _bop);
                
            }
        }
    }
    class BalanceOfPowerAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._bop = self.bop(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._bop.is_ready:
                # The current value of self._bop is represented by self._bop.current.value
                self.plot("BalanceOfPower", "bop", self._bop.current.value)
                
    

    The following reference table describes the BOP method:

    bop( symbol, resolution=None, selector=None ) [source]

    Creates a new Balance Of Power indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Balance Of Power indicator for the requested symbol.

    Return type:

    BalanceOfPower

    BOP( symbol, resolution=None, selector=None ) [source]

    Creates a new Balance Of Power indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Balance Of Power indicator for the requested symbol.

    Return type:

    BalanceOfPower

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a BalanceOfPower indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class BalanceOfPowerAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BalanceOfPower _bop;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _bop = new BalanceOfPower();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _bop.Update(bar);
            }
       
            if (_bop.IsReady)
            {
                // The current value of _bop is represented by itself (_bop)
                // or _bop.Current.Value
                Plot("BalanceOfPower", "bop", _bop);
                
            }
        }
    }
    class BalanceOfPowerAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._bop = BalanceOfPower()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._bop.update(bar)
            if self._bop.is_ready:
                # The current value of self._bop is represented by self._bop.current.value
                self.plot("BalanceOfPower", "bop", self._bop.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class BalanceOfPowerAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BalanceOfPower _bop;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _bop = new BalanceOfPower();
            RegisterIndicator(_symbol, _bop, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_bop.IsReady)
            {
                // The current value of _bop is represented by itself (_bop)
                // or _bop.Current.Value
                Plot("BalanceOfPower", "bop", _bop);
                
            }
        }
    }
    class BalanceOfPowerAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._bop = BalanceOfPower()
            self.register_indicator(self._symbol, self._bop, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._bop.is_ready:
                # The current value of self._bop is represented by self._bop.current.value
                self.plot("BalanceOfPower", "bop", self._bop.current.value)
                
    

    The following reference table describes the BalanceOfPower constructor:

    BalanceOfPower

    class QuantConnect.Indicators.BalanceOfPower [source]

    This indicator computes the Balance Of Power (BOP). The Balance Of Power is calculated with the following formula: BOP = (Close - Open) / (High - Low)

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    BalanceOfPower

    class QuantConnect.Indicators.BalanceOfPower [source]

    This indicator computes the Balance Of Power (BOP). The Balance Of Power is calculated with the following formula: BOP = (Close - Open) / (High - Low)

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of BalanceOfPower using the plotly library.

    BalanceOfPower line plot.

     

    Supported Indicators

    Beta

    Introduction

    In technical analysis Beta indicator is used to measure volatility or risk of a target (ETF) relative to the overall risk (volatility) of the reference (market indexes). The Beta indicators compares target's price movement to the movements of the indexes over the same period of time. It is common practice to use the SPX index as a benchmark of the overall reference market when it comes to Beta calculations.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using B Indicator

    To create an automatic indicators for Beta , call the B helper method from the QCAlgorithm class. The B method creates a Beta object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class BetaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private Beta _b;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _b = B(_symbol, reference, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_b.IsReady)
            {
                // The current value of _b is represented by itself (_b)
                // or _b.Current.Value
                Plot("Beta", "b", _b);
                
            }
        }
    }
    class BetaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._b = self.b(self._symbol, reference, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._b.is_ready:
                # The current value of self._b is represented by self._b.current.value
                self.plot("Beta", "b", self._b.current.value)
                
    

    The following reference table describes the B method:

    b( target, reference, period, resolution=None, selector=None ) [source]

    Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

    Parameters:
    Returns:

    The Beta indicator for the given parameters

    Return type:

    Beta

    B( target, reference, period, resolution=None, selector=None ) [source]

    Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

    Parameters:
    Returns:

    The Beta indicator for the given parameters

    Return type:

    Beta

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Beta indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class BetaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private Beta _b;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _b = new Beta("", _symbol, reference, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _b.Update(bar);
            }
            if (data.Bars.TryGetValue(_reference, out bar))
            {      
                _b.Update(bar);
            }
       
            if (_b.IsReady)
            {
                // The current value of _b is represented by itself (_b)
                // or _b.Current.Value
                Plot("Beta", "b", _b);
                
            }
        }
    }
    class BetaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._b = Beta("", self._symbol, reference, 20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._b.update(bar)
            bar = slice.bars.get(self.referece)
            if bar:
                self._b.update(bar)
            if self._b.is_ready:
                # The current value of self._b is represented by self._b.current.value
                self.plot("Beta", "b", self._b.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class BetaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private Beta _b;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _b = new Beta("", _symbol, reference, 20);
            RegisterIndicator(_symbol, _b, Resolution.Daily);
            RegisterIndicator(reference, _b, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_b.IsReady)
            {
                // The current value of _b is represented by itself (_b)
                // or _b.Current.Value
                Plot("Beta", "b", _b);
                
            }
        }
    }
    class BetaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._b = Beta("", self._symbol, reference, 20)
            self.register_indicator(self._symbol, self._b, Resolution.DAILY)
            self.register_indicator(reference, self._b, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._b.is_ready:
                # The current value of self._b is represented by self._b.current.value
                self.plot("Beta", "b", self._b.current.value)
                
    

    The following reference table describes the Beta constructor:

    Beta

    class QuantConnect.Indicators.Beta [source]

    In technical analysis Beta indicator is used to measure volatility or risk of a target (ETF) relative to the overall risk (volatility) of the reference (market indexes). The Beta indicators compares target's price movement to the movements of the indexes over the same period of time. It is common practice to use the SPX index as a benchmark of the overall reference market when it comes to Beta calculations.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Beta

    class QuantConnect.Indicators.Beta [source]

    In technical analysis Beta indicator is used to measure volatility or risk of a target (ETF) relative to the overall risk (volatility) of the reference (market indexes). The Beta indicators compares target's price movement to the movements of the indexes over the same period of time. It is common practice to use the SPX index as a benchmark of the overall reference market when it comes to Beta calculations.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Beta using the plotly library.

    Beta line plot.

     

    Supported Indicators

    Bollinger Bands

    Introduction

    This indicator creates a moving average (middle band) with an upper band and lower band fixed at k standard deviations above and below the moving average.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using BB Indicator

    To create an automatic indicators for BollingerBands , call the BB helper method from the QCAlgorithm class. The BB method creates a BollingerBands object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class BollingerBandsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BollingerBands _bb;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _bb = BB(_symbol, 30, 2);
        }
    
        public override void OnData(Slice data)
        {
            if (_bb.IsReady)
            {
                // The current value of _bb is represented by itself (_bb)
                // or _bb.Current.Value
                Plot("BollingerBands", "bb", _bb);
                // Plot all properties of bb
                Plot("BollingerBands", "standarddeviation", _bb.StandardDeviation);
                Plot("BollingerBands", "middleband", _bb.MiddleBand);
                Plot("BollingerBands", "upperband", _bb.UpperBand);
                Plot("BollingerBands", "lowerband", _bb.LowerBand);
                Plot("BollingerBands", "bandwidth", _bb.BandWidth);
                Plot("BollingerBands", "percentb", _bb.PercentB);
                Plot("BollingerBands", "price", _bb.Price);
            }
        }
    }
    class BollingerBandsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._bb = self.bb(self._symbol, 30, 2)
    
        def on_data(self, slice: Slice) -> None:
            if self._bb.is_ready:
                # The current value of self._bb is represented by self._bb.current.value
                self.plot("BollingerBands", "bb", self._bb.current.value)
                # Plot all attributes of self._bb
                self.plot("BollingerBands", "standard_deviation", self._bb.standard_deviation.current.value)
                self.plot("BollingerBands", "middle_band", self._bb.middle_band.current.value)
                self.plot("BollingerBands", "upper_band", self._bb.upper_band.current.value)
                self.plot("BollingerBands", "lower_band", self._bb.lower_band.current.value)
                self.plot("BollingerBands", "band_width", self._bb.band_width.current.value)
                self.plot("BollingerBands", "percent_b", self._bb.percent_b.current.value)
                self.plot("BollingerBands", "price", self._bb.price.current.value)
    

    The following reference table describes the BB method:

    bb( symbol, period, k, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

    Parameters:
    Returns:

    A BollingerBands configured with the specified period

    Return type:

    BollingerBands

    BB( symbol, period, k, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

    Parameters:
    Returns:

    A BollingerBands configured with the specified period

    Return type:

    BollingerBands

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    The following table describes the MovingAverageType enumeration members:

    To avoid parameter ambiguity, use the resolution argument to set the Resolution .

    public class BollingerBandsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BollingerBands _bb;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Hour).Symbol;
            _bb = BB(_symbol, 30, 2, resolution: Resolution.Daily);
        }
    }
    class BollingerBandsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.HOUR).Symbol
            self._bb = self.bb(self._symbol, 30, 2, resolution=Resolution.DAILY)
    

    You can manually create a BollingerBands indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class BollingerBandsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BollingerBands _bb;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _bb = new BollingerBands(30, 2);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _bb.Update(bar.EndTime, bar.Close);
            }
       
            if (_bb.IsReady)
            {
                // The current value of _bb is represented by itself (_bb)
                // or _bb.Current.Value
                Plot("BollingerBands", "bb", _bb);
                // Plot all properties of bb
                Plot("BollingerBands", "standarddeviation", _bb.StandardDeviation);
                Plot("BollingerBands", "middleband", _bb.MiddleBand);
                Plot("BollingerBands", "upperband", _bb.UpperBand);
                Plot("BollingerBands", "lowerband", _bb.LowerBand);
                Plot("BollingerBands", "bandwidth", _bb.BandWidth);
                Plot("BollingerBands", "percentb", _bb.PercentB);
                Plot("BollingerBands", "price", _bb.Price);
            }
        }
    }
    class BollingerBandsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._bb = BollingerBands(30, 2)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._bb.update(bar.EndTime, bar.Close)
            if self._bb.is_ready:
                # The current value of self._bb is represented by self._bb.current.value
                self.plot("BollingerBands", "bb", self._bb.current.value)
                # Plot all attributes of self._bb
                self.plot("BollingerBands", "standard_deviation", self._bb.standard_deviation.current.value)
                self.plot("BollingerBands", "middle_band", self._bb.middle_band.current.value)
                self.plot("BollingerBands", "upper_band", self._bb.upper_band.current.value)
                self.plot("BollingerBands", "lower_band", self._bb.lower_band.current.value)
                self.plot("BollingerBands", "band_width", self._bb.band_width.current.value)
                self.plot("BollingerBands", "percent_b", self._bb.percent_b.current.value)
                self.plot("BollingerBands", "price", self._bb.price.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class BollingerBandsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private BollingerBands _bb;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _bb = new BollingerBands(30, 2);
            RegisterIndicator(_symbol, _bb, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_bb.IsReady)
            {
                // The current value of _bb is represented by itself (_bb)
                // or _bb.Current.Value
                Plot("BollingerBands", "bb", _bb);
                // Plot all properties of bb
                Plot("BollingerBands", "standarddeviation", _bb.StandardDeviation);
                Plot("BollingerBands", "middleband", _bb.MiddleBand);
                Plot("BollingerBands", "upperband", _bb.UpperBand);
                Plot("BollingerBands", "lowerband", _bb.LowerBand);
                Plot("BollingerBands", "bandwidth", _bb.BandWidth);
                Plot("BollingerBands", "percentb", _bb.PercentB);
                Plot("BollingerBands", "price", _bb.Price);
            }
        }
    }
    class BollingerBandsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._bb = BollingerBands(30, 2)
            self.register_indicator(self._symbol, self._bb, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._bb.is_ready:
                # The current value of self._bb is represented by self._bb.current.value
                self.plot("BollingerBands", "bb", self._bb.current.value)
                # Plot all attributes of self._bb
                self.plot("BollingerBands", "standard_deviation", self._bb.standard_deviation.current.value)
                self.plot("BollingerBands", "middle_band", self._bb.middle_band.current.value)
                self.plot("BollingerBands", "upper_band", self._bb.upper_band.current.value)
                self.plot("BollingerBands", "lower_band", self._bb.lower_band.current.value)
                self.plot("BollingerBands", "band_width", self._bb.band_width.current.value)
                self.plot("BollingerBands", "percent_b", self._bb.percent_b.current.value)
                self.plot("BollingerBands", "price", self._bb.price.current.value)
    

    The following reference table describes the BollingerBands constructor:

    BollingerBands

    class QuantConnect.Indicators.BollingerBands [source]

    This indicator creates a moving average (middle band) with an upper band and lower band fixed at k standard deviations above and below the moving average.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and all sub-indicators (StandardDeviation, LowerBand, MiddleBand, UpperBand, BandWidth, %B)

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property band_width

    Gets the Bollinger BandWidth indicator BandWidth = ((Upper Band - Lower Band) / Middle Band) * 100

    Returns:

    Gets the Bollinger BandWidth indicator BandWidth = ((Upper Band - Lower Band) / Middle Band) * 100

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property lower_band

    Gets the lower Bollinger band (middleBand - k * stdDev)

    Returns:

    Gets the lower Bollinger band (middleBand - k * stdDev)

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property middle_band

    Gets the middle Bollinger band (moving average)

    Returns:

    Gets the middle Bollinger band (moving average)

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property moving_average_type

    Gets the type of moving average

    Returns:

    Gets the type of moving average

    Return type:

    MovingAverageType

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property percent_b

    Gets the Bollinger %B %B = (Price - Lower Band)/(Upper Band - Lower Band)

    Returns:

    Gets the Bollinger %B %B = (Price - Lower Band)/(Upper Band - Lower Band)

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property price

    Gets the Price level

    Returns:

    Gets the Price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property standard_deviation

    Gets the standard deviation

    Returns:

    Gets the standard deviation

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property upper_band

    Gets the upper Bollinger band (middleBand + k * stdDev)

    Returns:

    Gets the upper Bollinger band (middleBand + k * stdDev)

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    BollingerBands

    class QuantConnect.Indicators.BollingerBands [source]

    This indicator creates a moving average (middle band) with an upper band and lower band fixed at k standard deviations above and below the moving average.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and all sub-indicators (StandardDeviation, LowerBand, MiddleBand, UpperBand, BandWidth, %B)

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property BandWidth

    Gets the Bollinger BandWidth indicator BandWidth = ((Upper Band - Lower Band) / Middle Band) * 100

    Returns:

    Gets the Bollinger BandWidth indicator BandWidth = ((Upper Band - Lower Band) / Middle Band) * 100

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property LowerBand

    Gets the lower Bollinger band (middleBand - k * stdDev)

    Returns:

    Gets the lower Bollinger band (middleBand - k * stdDev)

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property MiddleBand

    Gets the middle Bollinger band (moving average)

    Returns:

    Gets the middle Bollinger band (moving average)

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property MovingAverageType

    Gets the type of moving average

    Returns:

    Gets the type of moving average

    Return type:

    MovingAverageType

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property PercentB

    Gets the Bollinger %B %B = (Price - Lower Band)/(Upper Band - Lower Band)

    Returns:

    Gets the Bollinger %B %B = (Price - Lower Band)/(Upper Band - Lower Band)

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Price

    Gets the Price level

    Returns:

    Gets the Price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property StandardDeviation

    Gets the standard deviation

    Returns:

    Gets the standard deviation

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property UpperBand

    Gets the upper Bollinger band (middleBand + k * stdDev)

    Returns:

    Gets the upper Bollinger band (middleBand + k * stdDev)

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of BollingerBands using the plotly library.

    BollingerBands line plot.

     

    Supported Indicators

    Chaikin Money Flow

    Introduction

    The Chaikin Money Flow Index (CMF) is a volume-weighted average of accumulation and distribution over a specified period. CMF = n-day Sum of [(((C - L) - (H - C)) / (H - L)) x Vol] / n-day Sum of Vol Where: n = number of periods, typically 21 H = high L = low C = close Vol = volume https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/cmf

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using CMF Indicator

    To create an automatic indicators for ChaikinMoneyFlow , call the CMF helper method from the QCAlgorithm class. The CMF method creates a ChaikinMoneyFlow object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ChaikinMoneyFlowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ChaikinMoneyFlow _cmf;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cmf = CMF(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_cmf.IsReady)
            {
                // The current value of _cmf is represented by itself (_cmf)
                // or _cmf.Current.Value
                Plot("ChaikinMoneyFlow", "cmf", _cmf);
                
            }
        }
    }
    class ChaikinMoneyFlowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cmf = self.cmf(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._cmf.is_ready:
                # The current value of self._cmf is represented by self._cmf.current.value
                self.plot("ChaikinMoneyFlow", "cmf", self._cmf.current.value)
                
    

    The following reference table describes the CMF method:

    cmf( symbol, period, resolution=None, selector=None ) [source]

    Creates a new ChaikinMoneyFlow indicator.

    Parameters:
    Returns:

    The ChaikinMoneyFlow indicator for the requested symbol over the specified period

    Return type:

    ChaikinMoneyFlow

    CMF( symbol, period, resolution=None, selector=None ) [source]

    Creates a new ChaikinMoneyFlow indicator.

    Parameters:
    Returns:

    The ChaikinMoneyFlow indicator for the requested symbol over the specified period

    Return type:

    ChaikinMoneyFlow

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ChaikinMoneyFlow indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class ChaikinMoneyFlowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ChaikinMoneyFlow _cmf;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cmf = new ChaikinMoneyFlow("SPY", 20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _cmf.Update(bar);
            }
       
            if (_cmf.IsReady)
            {
                // The current value of _cmf is represented by itself (_cmf)
                // or _cmf.Current.Value
                Plot("ChaikinMoneyFlow", "cmf", _cmf);
                
            }
        }
    }
    class ChaikinMoneyFlowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cmf = ChaikinMoneyFlow("SPY", 20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._cmf.update(bar)
            if self._cmf.is_ready:
                # The current value of self._cmf is represented by self._cmf.current.value
                self.plot("ChaikinMoneyFlow", "cmf", self._cmf.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ChaikinMoneyFlowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ChaikinMoneyFlow _cmf;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cmf = new ChaikinMoneyFlow("SPY", 20);
            RegisterIndicator(_symbol, _cmf, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_cmf.IsReady)
            {
                // The current value of _cmf is represented by itself (_cmf)
                // or _cmf.Current.Value
                Plot("ChaikinMoneyFlow", "cmf", _cmf);
                
            }
        }
    }
    class ChaikinMoneyFlowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cmf = ChaikinMoneyFlow("SPY", 20)
            self.register_indicator(self._symbol, self._cmf, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._cmf.is_ready:
                # The current value of self._cmf is represented by self._cmf.current.value
                self.plot("ChaikinMoneyFlow", "cmf", self._cmf.current.value)
                
    

    The following reference table describes the ChaikinMoneyFlow constructor:

    ChaikinMoneyFlow

    class QuantConnect.Indicators.ChaikinMoneyFlow [source]

    The Chaikin Money Flow Index (CMF) is a volume-weighted average of accumulation and distribution over a specified period. CMF = n-day Sum of [(((C - L) - (H - C)) / (H - L)) x Vol] / n-day Sum of Vol Where: n = number of periods, typically 21 H = high L = low C = close Vol = volume https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/cmf

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ChaikinMoneyFlow

    class QuantConnect.Indicators.ChaikinMoneyFlow [source]

    The Chaikin Money Flow Index (CMF) is a volume-weighted average of accumulation and distribution over a specified period. CMF = n-day Sum of [(((C - L) - (H - C)) / (H - L)) x Vol] / n-day Sum of Vol Where: n = number of periods, typically 21 H = high L = low C = close Vol = volume https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/cmf

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of ChaikinMoneyFlow using the plotly library.

    ChaikinMoneyFlow line plot.

     

    Supported Indicators

    Chande Momentum Oscillator

    Introduction

    This indicator computes the Chande Momentum Oscillator (CMO). CMO calculation is mostly identical to RSI. The only difference is in the last step of calculation: RSI = gain / (gain+loss) CMO = (gain-loss) / (gain+loss)

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using CMO Indicator

    To create an automatic indicators for ChandeMomentumOscillator , call the CMO helper method from the QCAlgorithm class. The CMO method creates a ChandeMomentumOscillator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ChandeMomentumOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ChandeMomentumOscillator _cmo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cmo = CMO(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_cmo.IsReady)
            {
                // The current value of _cmo is represented by itself (_cmo)
                // or _cmo.Current.Value
                Plot("ChandeMomentumOscillator", "cmo", _cmo);
                
            }
        }
    }
    class ChandeMomentumOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cmo = self.cmo(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._cmo.is_ready:
                # The current value of self._cmo is represented by self._cmo.current.value
                self.plot("ChandeMomentumOscillator", "cmo", self._cmo.current.value)
                
    

    The following reference table describes the CMO method:

    cmo( symbol, period, resolution=None, selector=None ) [source]

    Creates a new ChandeMomentumOscillator indicator.

    Parameters:
    Returns:

    The ChandeMomentumOscillator indicator for the requested symbol over the specified period

    Return type:

    ChandeMomentumOscillator

    CMO( symbol, period, resolution=None, selector=None ) [source]

    Creates a new ChandeMomentumOscillator indicator.

    Parameters:
    Returns:

    The ChandeMomentumOscillator indicator for the requested symbol over the specified period

    Return type:

    ChandeMomentumOscillator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ChandeMomentumOscillator indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class ChandeMomentumOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ChandeMomentumOscillator _cmo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cmo = new ChandeMomentumOscillator(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _cmo.Update(bar.EndTime, bar.Close);
            }
       
            if (_cmo.IsReady)
            {
                // The current value of _cmo is represented by itself (_cmo)
                // or _cmo.Current.Value
                Plot("ChandeMomentumOscillator", "cmo", _cmo);
                
            }
        }
    }
    class ChandeMomentumOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cmo = ChandeMomentumOscillator(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._cmo.update(bar.EndTime, bar.Close)
            if self._cmo.is_ready:
                # The current value of self._cmo is represented by self._cmo.current.value
                self.plot("ChandeMomentumOscillator", "cmo", self._cmo.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ChandeMomentumOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ChandeMomentumOscillator _cmo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cmo = new ChandeMomentumOscillator(20);
            RegisterIndicator(_symbol, _cmo, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_cmo.IsReady)
            {
                // The current value of _cmo is represented by itself (_cmo)
                // or _cmo.Current.Value
                Plot("ChandeMomentumOscillator", "cmo", _cmo);
                
            }
        }
    }
    class ChandeMomentumOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cmo = ChandeMomentumOscillator(20)
            self.register_indicator(self._symbol, self._cmo, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._cmo.is_ready:
                # The current value of self._cmo is represented by self._cmo.current.value
                self.plot("ChandeMomentumOscillator", "cmo", self._cmo.current.value)
                
    

    The following reference table describes the ChandeMomentumOscillator constructor:

    ChandeMomentumOscillator

    class QuantConnect.Indicators.ChandeMomentumOscillator [source]

    This indicator computes the Chande Momentum Oscillator (CMO). CMO calculation is mostly identical to RSI. The only difference is in the last step of calculation: RSI = gain / (gain+loss) CMO = (gain-loss) / (gain+loss)

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ChandeMomentumOscillator

    class QuantConnect.Indicators.ChandeMomentumOscillator [source]

    This indicator computes the Chande Momentum Oscillator (CMO). CMO calculation is mostly identical to RSI. The only difference is in the last step of calculation: RSI = gain / (gain+loss) CMO = (gain-loss) / (gain+loss)

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of ChandeMomentumOscillator using the plotly library.

    ChandeMomentumOscillator line plot.

     

    Supported Indicators

    Commodity Channel Index

    Introduction

    This indicator represents the traditional commodity channel index (CCI) CCI = (Typical Price - 20-period SMA of TP) / (.015 * Mean Deviation) Typical Price (TP) = (High + Low + Close)/3 Constant = 0.015 There are four steps to calculating the Mean Deviation, first, subtract the most recent 20-period average of the typical price from each period's typical price. Second, take the absolute values of these numbers. Third, sum the absolute values. Fourth, divide by the total number of periods (20).

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using CCI Indicator

    To create an automatic indicators for CommodityChannelIndex , call the CCI helper method from the QCAlgorithm class. The CCI method creates a CommodityChannelIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class CommodityChannelIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private CommodityChannelIndex _cci;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cci = CCI(_symbol, 20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (_cci.IsReady)
            {
                // The current value of _cci is represented by itself (_cci)
                // or _cci.Current.Value
                Plot("CommodityChannelIndex", "cci", _cci);
                // Plot all properties of cci
                Plot("CommodityChannelIndex", "typicalpriceaverage", _cci.TypicalPriceAverage);
                Plot("CommodityChannelIndex", "typicalpricemeandeviation", _cci.TypicalPriceMeanDeviation);
            }
        }
    }
    class CommodityChannelIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cci = self.cci(self._symbol, 20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            if self._cci.is_ready:
                # The current value of self._cci is represented by self._cci.current.value
                self.plot("CommodityChannelIndex", "cci", self._cci.current.value)
                # Plot all attributes of self._cci
                self.plot("CommodityChannelIndex", "typical_price_average", self._cci.typical_price_average.current.value)
                self.plot("CommodityChannelIndex", "typical_price_mean_deviation", self._cci.typical_price_mean_deviation.current.value)
    

    The following reference table describes the CCI method:

    cci( symbol, period, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new CommodityChannelIndex indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The CommodityChannelIndex indicator for the requested symbol over the specified period

    Return type:

    CommodityChannelIndex

    CCI( symbol, period, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new CommodityChannelIndex indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The CommodityChannelIndex indicator for the requested symbol over the specified period

    Return type:

    CommodityChannelIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    The following table describes the MovingAverageType enumeration members:

    To avoid parameter ambiguity, use the resolution argument to set the Resolution .

    public class CommodityChannelIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private CommodityChannelIndex _cci;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Hour).Symbol;
            _cci = CCI(_symbol, 20, MovingAverageType.Simple, resolution: Resolution.Daily);
        }
    }
    class CommodityChannelIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.HOUR).Symbol
            self._cci = self.cci(self._symbol, 20, MovingAverageType.Simple, resolution=Resolution.DAILY)
    

    You can manually create a CommodityChannelIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class CommodityChannelIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private CommodityChannelIndex _cci;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cci = new CommodityChannelIndex(20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _cci.Update(bar);
            }
       
            if (_cci.IsReady)
            {
                // The current value of _cci is represented by itself (_cci)
                // or _cci.Current.Value
                Plot("CommodityChannelIndex", "cci", _cci);
                // Plot all properties of cci
                Plot("CommodityChannelIndex", "typicalpriceaverage", _cci.TypicalPriceAverage);
                Plot("CommodityChannelIndex", "typicalpricemeandeviation", _cci.TypicalPriceMeanDeviation);
            }
        }
    }
    class CommodityChannelIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cci = CommodityChannelIndex(20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._cci.update(bar)
            if self._cci.is_ready:
                # The current value of self._cci is represented by self._cci.current.value
                self.plot("CommodityChannelIndex", "cci", self._cci.current.value)
                # Plot all attributes of self._cci
                self.plot("CommodityChannelIndex", "typical_price_average", self._cci.typical_price_average.current.value)
                self.plot("CommodityChannelIndex", "typical_price_mean_deviation", self._cci.typical_price_mean_deviation.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class CommodityChannelIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private CommodityChannelIndex _cci;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cci = new CommodityChannelIndex(20, MovingAverageType.Simple);
            RegisterIndicator(_symbol, _cci, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_cci.IsReady)
            {
                // The current value of _cci is represented by itself (_cci)
                // or _cci.Current.Value
                Plot("CommodityChannelIndex", "cci", _cci);
                // Plot all properties of cci
                Plot("CommodityChannelIndex", "typicalpriceaverage", _cci.TypicalPriceAverage);
                Plot("CommodityChannelIndex", "typicalpricemeandeviation", _cci.TypicalPriceMeanDeviation);
            }
        }
    }
    class CommodityChannelIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cci = CommodityChannelIndex(20, MovingAverageType.Simple)
            self.register_indicator(self._symbol, self._cci, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._cci.is_ready:
                # The current value of self._cci is represented by self._cci.current.value
                self.plot("CommodityChannelIndex", "cci", self._cci.current.value)
                # Plot all attributes of self._cci
                self.plot("CommodityChannelIndex", "typical_price_average", self._cci.typical_price_average.current.value)
                self.plot("CommodityChannelIndex", "typical_price_mean_deviation", self._cci.typical_price_mean_deviation.current.value)
    

    The following reference table describes the CommodityChannelIndex constructor:

    CommodityChannelIndex

    class QuantConnect.Indicators.CommodityChannelIndex [source]

    Represents the traditional commodity channel index (CCI) CCI = (Typical Price - 20-period SMA of TP) / (.015 * Mean Deviation) Typical Price (TP) = (High + Low + Close)/3 Constant = 0.015 There are four steps to calculating the Mean Deviation, first, subtract the most recent 20-period average of the typical price from each period's typical price. Second, take the absolute values of these numbers. Third, sum the absolute values. Fourth, divide by the total number of periods (20).

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property moving_average_type

    Gets the type of moving average

    Returns:

    Gets the type of moving average

    Return type:

    MovingAverageType

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property typical_price_average

    Keep track of the simple moving average of the typical price

    Returns:

    Keep track of the simple moving average of the typical price

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property typical_price_mean_deviation

    Keep track of the mean absolute deviation of the typical price

    Returns:

    Keep track of the mean absolute deviation of the typical price

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    CommodityChannelIndex

    class QuantConnect.Indicators.CommodityChannelIndex [source]

    Represents the traditional commodity channel index (CCI) CCI = (Typical Price - 20-period SMA of TP) / (.015 * Mean Deviation) Typical Price (TP) = (High + Low + Close)/3 Constant = 0.015 There are four steps to calculating the Mean Deviation, first, subtract the most recent 20-period average of the typical price from each period's typical price. Second, take the absolute values of these numbers. Third, sum the absolute values. Fourth, divide by the total number of periods (20).

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property MovingAverageType

    Gets the type of moving average

    Returns:

    Gets the type of moving average

    Return type:

    MovingAverageType

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property TypicalPriceAverage

    Keep track of the simple moving average of the typical price

    Returns:

    Keep track of the simple moving average of the typical price

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property TypicalPriceMeanDeviation

    Keep track of the mean absolute deviation of the typical price

    Returns:

    Keep track of the mean absolute deviation of the typical price

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of CommodityChannelIndex using the plotly library.

    CommodityChannelIndex line plot.

     

    Supported Indicators

    Coppock Curve

    Introduction

    A momentum indicator developed by Edwin “Sedge” Coppock in October 1965. The goal of this indicator is to identify long-term buying opportunities in the S&P500 and Dow Industrials. source

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using CC Indicator

    To create an automatic indicators for CoppockCurve , call the CC helper method from the QCAlgorithm class. The CC method creates a CoppockCurve object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class CoppockCurveAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private CoppockCurve _cc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cc = CC(_symbol, 11, 14, 10);
        }
    
        public override void OnData(Slice data)
        {
            if (_cc.IsReady)
            {
                // The current value of _cc is represented by itself (_cc)
                // or _cc.Current.Value
                Plot("CoppockCurve", "cc", _cc);
                
            }
        }
    }
    class CoppockCurveAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cc = self.cc(self._symbol, 11, 14, 10)
    
        def on_data(self, slice: Slice) -> None:
            if self._cc.is_ready:
                # The current value of self._cc is represented by self._cc.current.value
                self.plot("CoppockCurve", "cc", self._cc.current.value)
                
    

    The following reference table describes the CC method:

    cc( symbol, short_roc_period=11, long_roc_period=14, lwma_period=10, resolution=None, selector=None ) [source]

    Initializes a new instance of the CoppockCurve indicator

    Parameters:
    Returns:

    The Coppock Curve indicator for the requested symbol over the specified period

    Return type:

    CoppockCurve

    CC( symbol, shortRocPeriod=11, longRocPeriod=14, lwmaPeriod=10, resolution=None, selector=None ) [source]

    Initializes a new instance of the CoppockCurve indicator

    Parameters:
    Returns:

    The Coppock Curve indicator for the requested symbol over the specified period

    Return type:

    CoppockCurve

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a CoppockCurve indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class CoppockCurveAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private CoppockCurve _cc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cc = new CoppockCurve(11, 14, 10);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _cc.Update(bar.EndTime, bar.Close);
            }
       
            if (_cc.IsReady)
            {
                // The current value of _cc is represented by itself (_cc)
                // or _cc.Current.Value
                Plot("CoppockCurve", "cc", _cc);
                
            }
        }
    }
    class CoppockCurveAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cc = CoppockCurve(11, 14, 10)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._cc.update(bar.EndTime, bar.Close)
            if self._cc.is_ready:
                # The current value of self._cc is represented by self._cc.current.value
                self.plot("CoppockCurve", "cc", self._cc.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class CoppockCurveAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private CoppockCurve _cc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _cc = new CoppockCurve(11, 14, 10);
            RegisterIndicator(_symbol, _cc, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_cc.IsReady)
            {
                // The current value of _cc is represented by itself (_cc)
                // or _cc.Current.Value
                Plot("CoppockCurve", "cc", _cc);
                
            }
        }
    }
    class CoppockCurveAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._cc = CoppockCurve(11, 14, 10)
            self.register_indicator(self._symbol, self._cc, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._cc.is_ready:
                # The current value of self._cc is represented by self._cc.current.value
                self.plot("CoppockCurve", "cc", self._cc.current.value)
                
    

    The following reference table describes the CoppockCurve constructor:

    CoppockCurve

    class QuantConnect.Indicators.CoppockCurve [source]

    A momentum indicator developed by Edwin “Sedge” Coppock in October 1965. The goal of this indicator is to identify long-term buying opportunities in the S&P500 and Dow Industrials. Source: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:coppock_curve

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    CoppockCurve

    class QuantConnect.Indicators.CoppockCurve [source]

    A momentum indicator developed by Edwin “Sedge” Coppock in October 1965. The goal of this indicator is to identify long-term buying opportunities in the S&P500 and Dow Industrials. Source: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:coppock_curve

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of CoppockCurve using the plotly library.

    CoppockCurve line plot.

     

    Supported Indicators

    Correlation

    Introduction

    The Correlation Indicator is a valuable tool in technical analysis, designed to quantify the degree of relationship between the price movements of a target security (e.g., a stock or ETF) and a reference market index. It measures how closely the target’s price changes are aligned with the fluctuations of the index over a specific period of time, providing insights into the target’s susceptibility to market movements. A positive correlation indicates that the target tends to move in the same direction as the market index, while a negative correlation suggests an inverse relationship. A correlation close to 0 implies a weak or no linear relationship. Commonly, the SPX index is employed as the benchmark for the overall market when calculating correlation, ensuring a consistent and reliable reference point. This helps traders and investors make informed decisions regarding the risk and behavior of the target security in relation to market trends.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using C Indicator

    To create an automatic indicators for Correlation , call the C helper method from the QCAlgorithm class. The C method creates a Correlation object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class CorrelationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private Correlation _c;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _c = C(_symbol, reference, 20, correlationType=CorrelationType.Pearson);
        }
    
        public override void OnData(Slice data)
        {
            if (_c.IsReady)
            {
                // The current value of _c is represented by itself (_c)
                // or _c.Current.Value
                Plot("Correlation", "c", _c);
                
            }
        }
    }
    class CorrelationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._c = self.c(self._symbol, reference, 20, correlationType=CorrelationType.Pearson)
    
        def on_data(self, slice: Slice) -> None:
            if self._c.is_ready:
                # The current value of self._c is represented by self._c.current.value
                self.plot("Correlation", "c", self._c.current.value)
                
    

    The following reference table describes the C method:

    c( target, reference, period, correlation_type=0, resolution=None, selector=None ) [source]

    Converts a composite FIGI identifier into a String)

    Parameters:
    Returns:

    The Correlation indicator for the given parameters

    Return type:

    Correlation

    C( target, reference, period, correlationType=0, resolution=None, selector=None ) [source]

    Converts a composite FIGI identifier into a String)

    Parameters:
    Returns:

    The Correlation indicator for the given parameters

    Return type:

    Correlation

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Correlation indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class CorrelationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private Correlation _c;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _c = new Correlation("", _symbol, reference, 20, correlationType=CorrelationType.Pearson);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _c.Update(bar);
            }
            if (data.Bars.TryGetValue(_reference, out bar))
            {      
                _c.Update(bar);
            }
       
            if (_c.IsReady)
            {
                // The current value of _c is represented by itself (_c)
                // or _c.Current.Value
                Plot("Correlation", "c", _c);
                
            }
        }
    }
    class CorrelationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._c = Correlation("", self._symbol, reference, 20, correlationType=CorrelationType.Pearson)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._c.update(bar)
            bar = slice.bars.get(self.referece)
            if bar:
                self._c.update(bar)
            if self._c.is_ready:
                # The current value of self._c is represented by self._c.current.value
                self.plot("Correlation", "c", self._c.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class CorrelationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private Correlation _c;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _c = new Correlation("", _symbol, reference, 20, correlationType=CorrelationType.Pearson);
            RegisterIndicator(_symbol, _c, Resolution.Daily);
            RegisterIndicator(reference, _c, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_c.IsReady)
            {
                // The current value of _c is represented by itself (_c)
                // or _c.Current.Value
                Plot("Correlation", "c", _c);
                
            }
        }
    }
    class CorrelationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._c = Correlation("", self._symbol, reference, 20, correlationType=CorrelationType.Pearson)
            self.register_indicator(self._symbol, self._c, Resolution.DAILY)
            self.register_indicator(reference, self._c, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._c.is_ready:
                # The current value of self._c is represented by self._c.current.value
                self.plot("Correlation", "c", self._c.current.value)
                
    

    The following reference table describes the Correlation constructor:

    Correlation

    class QuantConnect.Indicators.Correlation [source]

    The Correlation Indicator is a valuable tool in technical analysis, designed to quantify the degree of relationship between the price movements of a target security (e.g., a stock or ETF) and a reference market index. It measures how closely the target’s price changes are aligned with the fluctuations of the index over a specific period of time, providing insights into the target’s susceptibility to market movements. A positive correlation indicates that the target tends to move in the same direction as the market index, while a negative correlation suggests an inverse relationship. A correlation close to 0 implies a weak or no linear relationship. Commonly, the SPX index is employed as the benchmark for the overall market when calculating correlation, ensuring a consistent and reliable reference point. This helps traders and investors make informed decisions regarding the risk and behavior of the target security in relation to market trends.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Correlation

    class QuantConnect.Indicators.Correlation [source]

    The Correlation Indicator is a valuable tool in technical analysis, designed to quantify the degree of relationship between the price movements of a target security (e.g., a stock or ETF) and a reference market index. It measures how closely the target’s price changes are aligned with the fluctuations of the index over a specific period of time, providing insights into the target’s susceptibility to market movements. A positive correlation indicates that the target tends to move in the same direction as the market index, while a negative correlation suggests an inverse relationship. A correlation close to 0 implies a weak or no linear relationship. Commonly, the SPX index is employed as the benchmark for the overall market when calculating correlation, ensuring a consistent and reliable reference point. This helps traders and investors make informed decisions regarding the risk and behavior of the target security in relation to market trends.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Correlation using the plotly library.

    Correlation line plot.

     

    Supported Indicators

    Delta

    Introduction

    Option Delta indicator that calculate the delta of an option

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using D Indicator

    To create an automatic indicators for Delta , call the D helper method from the QCAlgorithm class. The D method creates a Delta object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class DeltaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Delta _d;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _d = D(_option, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (_d.IsReady)
            {
                // The current value of _d is represented by itself (_d)
                // or _d.Current.Value
                Plot("Delta", "d", _d);
                // Plot all properties of d
                Plot("Delta", "impliedvolatility", _d.ImpliedVolatility);
                Plot("Delta", "riskfreerate", _d.RiskFreeRate);
                Plot("Delta", "dividendyield", _d.DividendYield);
                Plot("Delta", "price", _d.Price);
                Plot("Delta", "oppositeprice", _d.OppositePrice);
                Plot("Delta", "underlyingprice", _d.UnderlyingPrice);
            }
        }
    }
    class DeltaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._d = self.d(self.option, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            if self._d.is_ready:
                # The current value of self._d is represented by self._d.current.value
                self.plot("Delta", "d", self._d.current.value)
                # Plot all attributes of self._d
                self.plot("Delta", "implied_volatility", self._d.implied_volatility.current.value)
                self.plot("Delta", "risk_free_rate", self._d.risk_free_rate.current.value)
                self.plot("Delta", "dividend_yield", self._d.dividend_yield.current.value)
                self.plot("Delta", "price", self._d.price.current.value)
                self.plot("Delta", "opposite_price", self._d.opposite_price.current.value)
                self.plot("Delta", "underlying_price", self._d.underlying_price.current.value)
    

    The following reference table describes the D method:

    d( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    Send a debug message to the web console:

    Parameters:
    Returns:

    A new Delta indicator for the specified symbol

    Return type:

    Delta

    D( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    Send a debug message to the web console:

    Parameters:
    Returns:

    A new Delta indicator for the specified symbol

    Return type:

    Delta

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Delta indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class DeltaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Delta _d;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _d = new Delta(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _d.Update(new IndicatorDataPoint(_symbol, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_option, out bar))
            {      
                _d.Update(new IndicatorDataPoint(_option, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_mirrorOption, out bar))
            {      
                _d.Update(new IndicatorDataPoint(_mirrorOption, bar.EndTime, bar.Close));
            }
       
            if (_d.IsReady)
            {
                // The current value of _d is represented by itself (_d)
                // or _d.Current.Value
                Plot("Delta", "d", _d);
                // Plot all properties of d
                Plot("Delta", "impliedvolatility", _d.ImpliedVolatility);
                Plot("Delta", "riskfreerate", _d.RiskFreeRate);
                Plot("Delta", "dividendyield", _d.DividendYield);
                Plot("Delta", "price", _d.Price);
                Plot("Delta", "oppositeprice", _d.OppositePrice);
                Plot("Delta", "underlyingprice", _d.UnderlyingPrice);
            }
        }
    }
    class DeltaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._d = Delta(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._d.update(IndicatorDataPoint(self._symbol, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.option)
            if bar:
                self._d.update(IndicatorDataPoint(self.option, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.mirror_option)
            if bar:
                self._d.update(IndicatorDataPoint(self.mirror_option, bar.end_time, bar.close))
            if self._d.is_ready:
                # The current value of self._d is represented by self._d.current.value
                self.plot("Delta", "d", self._d.current.value)
                # Plot all attributes of self._d
                self.plot("Delta", "implied_volatility", self._d.implied_volatility.current.value)
                self.plot("Delta", "risk_free_rate", self._d.risk_free_rate.current.value)
                self.plot("Delta", "dividend_yield", self._d.dividend_yield.current.value)
                self.plot("Delta", "price", self._d.price.current.value)
                self.plot("Delta", "opposite_price", self._d.opposite_price.current.value)
                self.plot("Delta", "underlying_price", self._d.underlying_price.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class DeltaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Delta _d;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _d = new Delta(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
            RegisterIndicator(_symbol, _d, Resolution.Daily);
            RegisterIndicator(_option, _d, Resolution.Daily);
            RegisterIndicator(_mirrorOption, _d, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_d.IsReady)
            {
                // The current value of _d is represented by itself (_d)
                // or _d.Current.Value
                Plot("Delta", "d", _d);
                // Plot all properties of d
                Plot("Delta", "impliedvolatility", _d.ImpliedVolatility);
                Plot("Delta", "riskfreerate", _d.RiskFreeRate);
                Plot("Delta", "dividendyield", _d.DividendYield);
                Plot("Delta", "price", _d.Price);
                Plot("Delta", "oppositeprice", _d.OppositePrice);
                Plot("Delta", "underlyingprice", _d.UnderlyingPrice);
            }
        }
    }
    class DeltaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._d = Delta(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
            self.register_indicator(self._symbol, self._d, Resolution.DAILY)
            self.register_indicator(self.option, self._d, Resolution.DAILY)
            self.register_indicator(self.mirror_option, self._d, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._d.is_ready:
                # The current value of self._d is represented by self._d.current.value
                self.plot("Delta", "d", self._d.current.value)
                # Plot all attributes of self._d
                self.plot("Delta", "implied_volatility", self._d.implied_volatility.current.value)
                self.plot("Delta", "risk_free_rate", self._d.risk_free_rate.current.value)
                self.plot("Delta", "dividend_yield", self._d.dividend_yield.current.value)
                self.plot("Delta", "price", self._d.price.current.value)
                self.plot("Delta", "opposite_price", self._d.opposite_price.current.value)
                self.plot("Delta", "underlying_price", self._d.underlying_price.current.value)
    

    The following reference table describes the Delta constructor:

    Delta

    class QuantConnect.Indicators.Delta [source]

    Option Delta indicator that calculate the delta of an option

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and all sub-indicators

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property dividend_yield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    datetime

    property implied_volatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property opposite_price

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property risk_free_rate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    float

    property style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property underlying_price

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property use_mirror_contract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Delta

    class QuantConnect.Indicators.Delta [source]

    Option Delta indicator that calculate the delta of an option

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and all sub-indicators

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property DividendYield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property Expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    DateTime

    property ImpliedVolatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property OppositePrice

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property RiskFreeRate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    decimal

    property Style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property UnderlyingPrice

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property UseMirrorContract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Delta using the plotly library.

    Delta line plot.

     

    Supported Indicators

    Detrended Price Oscillator

    Introduction

    The Detrended Price Oscillator is an indicator designed to remove trend from price and make it easier to identify cycles. DPO does not extend to the last date because it is based on a displaced moving average. Is estimated as Price {X/2 + 1} periods ago less the X-period simple moving average. E.g.DPO(20) equals price 11 days ago less the 20-day SMA.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using DPO Indicator

    To create an automatic indicators for DetrendedPriceOscillator , call the DPO helper method from the QCAlgorithm class. The DPO method creates a DetrendedPriceOscillator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class DetrendedPriceOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DetrendedPriceOscillator _dpo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dpo = DPO(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_dpo.IsReady)
            {
                // The current value of _dpo is represented by itself (_dpo)
                // or _dpo.Current.Value
                Plot("DetrendedPriceOscillator", "dpo", _dpo);
                
            }
        }
    }
    class DetrendedPriceOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dpo = self.dpo(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._dpo.is_ready:
                # The current value of self._dpo is represented by self._dpo.current.value
                self.plot("DetrendedPriceOscillator", "dpo", self._dpo.current.value)
                
    

    The following reference table describes the DPO method:

    dpo( symbol, period, resolution=None, selector=None ) [source]

    Creates a new DetrendedPriceOscillator indicator.

    Parameters:
    Returns:

    A new registered DetrendedPriceOscillator indicator for the requested symbol over the specified period

    Return type:

    DetrendedPriceOscillator

    DPO( symbol, period, resolution=None, selector=None ) [source]

    Creates a new DetrendedPriceOscillator indicator.

    Parameters:
    Returns:

    A new registered DetrendedPriceOscillator indicator for the requested symbol over the specified period

    Return type:

    DetrendedPriceOscillator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a DetrendedPriceOscillator indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class DetrendedPriceOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DetrendedPriceOscillator _dpo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dpo = new DetrendedPriceOscillator(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _dpo.Update(bar.EndTime, bar.Close);
            }
       
            if (_dpo.IsReady)
            {
                // The current value of _dpo is represented by itself (_dpo)
                // or _dpo.Current.Value
                Plot("DetrendedPriceOscillator", "dpo", _dpo);
                
            }
        }
    }
    class DetrendedPriceOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dpo = DetrendedPriceOscillator(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._dpo.update(bar.EndTime, bar.Close)
            if self._dpo.is_ready:
                # The current value of self._dpo is represented by self._dpo.current.value
                self.plot("DetrendedPriceOscillator", "dpo", self._dpo.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class DetrendedPriceOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DetrendedPriceOscillator _dpo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dpo = new DetrendedPriceOscillator(20);
            RegisterIndicator(_symbol, _dpo, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_dpo.IsReady)
            {
                // The current value of _dpo is represented by itself (_dpo)
                // or _dpo.Current.Value
                Plot("DetrendedPriceOscillator", "dpo", _dpo);
                
            }
        }
    }
    class DetrendedPriceOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dpo = DetrendedPriceOscillator(20)
            self.register_indicator(self._symbol, self._dpo, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._dpo.is_ready:
                # The current value of self._dpo is represented by self._dpo.current.value
                self.plot("DetrendedPriceOscillator", "dpo", self._dpo.current.value)
                
    

    The following reference table describes the DetrendedPriceOscillator constructor:

    DetrendedPriceOscillator

    class QuantConnect.Indicators.DetrendedPriceOscillator [source]

    The Detrended Price Oscillator is an indicator designed to remove trend from price and make it easier to identify cycles. DPO does not extend to the last date because it is based on a displaced moving average. Is estimated as Price {X/2 + 1} periods ago less the X-period simple moving average. E.g.DPO(20) equals price 11 days ago less the 20-day SMA.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DetrendedPriceOscillator

    class QuantConnect.Indicators.DetrendedPriceOscillator [source]

    The Detrended Price Oscillator is an indicator designed to remove trend from price and make it easier to identify cycles. DPO does not extend to the last date because it is based on a displaced moving average. Is estimated as Price {X/2 + 1} periods ago less the X-period simple moving average. E.g.DPO(20) equals price 11 days ago less the 20-day SMA.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of DetrendedPriceOscillator using the plotly library.

    DetrendedPriceOscillator line plot.

     

    Supported Indicators

    Donchian Channel

    Introduction

    This indicator computes the upper and lower band of the Donchian Channel. The upper band is computed by finding the highest high over the given period. The lower band is computed by finding the lowest low over the given period. The primary output value of the indicator is the mean of the upper and lower band for the given timeframe.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using DCH Indicator

    To create an automatic indicators for DonchianChannel , call the DCH helper method from the QCAlgorithm class. The DCH method creates a DonchianChannel object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class DonchianChannelAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DonchianChannel _dch;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dch = DCH(_symbol, 20, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_dch.IsReady)
            {
                // The current value of _dch is represented by itself (_dch)
                // or _dch.Current.Value
                Plot("DonchianChannel", "dch", _dch);
                // Plot all properties of dch
                Plot("DonchianChannel", "upperband", _dch.UpperBand);
                Plot("DonchianChannel", "lowerband", _dch.LowerBand);
            }
        }
    }
    class DonchianChannelAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dch = self.dch(self._symbol, 20, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._dch.is_ready:
                # The current value of self._dch is represented by self._dch.current.value
                self.plot("DonchianChannel", "dch", self._dch.current.value)
                # Plot all attributes of self._dch
                self.plot("DonchianChannel", "upper_band", self._dch.upper_band.current.value)
                self.plot("DonchianChannel", "lower_band", self._dch.lower_band.current.value)
    

    The following reference table describes the DCH method:

    dch( symbol, upper_period, lower_period, resolution=None, selector=None ) [source]

    Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Donchian Channel indicator for the requested symbol.

    Return type:

    DonchianChannel

    dch( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Donchian Channel indicator for the requested symbol.

    Return type:

    DonchianChannel

    DCH( symbol, upperPeriod, lowerPeriod, resolution=None, selector=None ) [source]

    Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Donchian Channel indicator for the requested symbol.

    Return type:

    DonchianChannel

    DCH( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Donchian Channel indicator for the requested symbol.

    Return type:

    DonchianChannel

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a DonchianChannel indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class DonchianChannelAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DonchianChannel _dch;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dch = new DonchianChannel(20, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _dch.Update(bar);
            }
       
            if (_dch.IsReady)
            {
                // The current value of _dch is represented by itself (_dch)
                // or _dch.Current.Value
                Plot("DonchianChannel", "dch", _dch);
                // Plot all properties of dch
                Plot("DonchianChannel", "upperband", _dch.UpperBand);
                Plot("DonchianChannel", "lowerband", _dch.LowerBand);
            }
        }
    }
    class DonchianChannelAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dch = DonchianChannel(20, 20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._dch.update(bar)
            if self._dch.is_ready:
                # The current value of self._dch is represented by self._dch.current.value
                self.plot("DonchianChannel", "dch", self._dch.current.value)
                # Plot all attributes of self._dch
                self.plot("DonchianChannel", "upper_band", self._dch.upper_band.current.value)
                self.plot("DonchianChannel", "lower_band", self._dch.lower_band.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class DonchianChannelAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DonchianChannel _dch;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dch = new DonchianChannel(20, 20);
            RegisterIndicator(_symbol, _dch, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_dch.IsReady)
            {
                // The current value of _dch is represented by itself (_dch)
                // or _dch.Current.Value
                Plot("DonchianChannel", "dch", _dch);
                // Plot all properties of dch
                Plot("DonchianChannel", "upperband", _dch.UpperBand);
                Plot("DonchianChannel", "lowerband", _dch.LowerBand);
            }
        }
    }
    class DonchianChannelAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dch = DonchianChannel(20, 20)
            self.register_indicator(self._symbol, self._dch, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._dch.is_ready:
                # The current value of self._dch is represented by self._dch.current.value
                self.plot("DonchianChannel", "dch", self._dch.current.value)
                # Plot all attributes of self._dch
                self.plot("DonchianChannel", "upper_band", self._dch.upper_band.current.value)
                self.plot("DonchianChannel", "lower_band", self._dch.lower_band.current.value)
    

    The following reference table describes the DonchianChannel constructor:

    DonchianChannel

    class QuantConnect.Indicators.DonchianChannel [source]

    This indicator computes the upper and lower band of the Donchian Channel. The upper band is computed by finding the highest high over the given period. The lower band is computed by finding the lowest low over the given period. The primary output value of the indicator is the mean of the upper and lower band for the given timeframe.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property lower_band

    Gets the lower band of the Donchian Channel.

    Returns:

    Gets the lower band of the Donchian Channel.

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property upper_band

    Gets the upper band of the Donchian Channel.

    Returns:

    Gets the upper band of the Donchian Channel.

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DonchianChannel

    class QuantConnect.Indicators.DonchianChannel [source]

    This indicator computes the upper and lower band of the Donchian Channel. The upper band is computed by finding the highest high over the given period. The lower band is computed by finding the lowest low over the given period. The primary output value of the indicator is the mean of the upper and lower band for the given timeframe.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property LowerBand

    Gets the lower band of the Donchian Channel.

    Returns:

    Gets the lower band of the Donchian Channel.

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property UpperBand

    Gets the upper band of the Donchian Channel.

    Returns:

    Gets the upper band of the Donchian Channel.

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of DonchianChannel using the plotly library.

    DonchianChannel line plot.

     

    Supported Indicators

    Double Exponential Moving Average

    Introduction

    This indicator computes the Double Exponential Moving Average (DEMA). The Double Exponential Moving Average is calculated with the following formula: EMA2 = EMA(EMA(t,period),period) DEMA = 2 * EMA(t,period) - EMA2 The Generalized DEMA (GD) is calculated with the following formula: GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using DEMA Indicator

    To create an automatic indicators for DoubleExponentialMovingAverage , call the DEMA helper method from the QCAlgorithm class. The DEMA method creates a DoubleExponentialMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class DoubleExponentialMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DoubleExponentialMovingAverage _dema;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dema = DEMA(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_dema.IsReady)
            {
                // The current value of _dema is represented by itself (_dema)
                // or _dema.Current.Value
                Plot("DoubleExponentialMovingAverage", "dema", _dema);
                
            }
        }
    }
    class DoubleExponentialMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dema = self.dema(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._dema.is_ready:
                # The current value of self._dema is represented by self._dema.current.value
                self.plot("DoubleExponentialMovingAverage", "dema", self._dema.current.value)
                
    

    The following reference table describes the DEMA method:

    dema( symbol, period, resolution=None, selector=None ) [source]

    Creates a new DoubleExponentialMovingAverage indicator.

    Parameters:
    Returns:

    The DoubleExponentialMovingAverage indicator for the requested symbol over the specified period

    Return type:

    floatExponentialMovingAverage

    DEMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new DoubleExponentialMovingAverage indicator.

    Parameters:
    Returns:

    The DoubleExponentialMovingAverage indicator for the requested symbol over the specified period

    Return type:

    DoubleExponentialMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a DoubleExponentialMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class DoubleExponentialMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DoubleExponentialMovingAverage _dema;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dema = new DoubleExponentialMovingAverage(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _dema.Update(bar.EndTime, bar.Close);
            }
       
            if (_dema.IsReady)
            {
                // The current value of _dema is represented by itself (_dema)
                // or _dema.Current.Value
                Plot("DoubleExponentialMovingAverage", "dema", _dema);
                
            }
        }
    }
    class DoubleExponentialMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dema = DoubleExponentialMovingAverage(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._dema.update(bar.EndTime, bar.Close)
            if self._dema.is_ready:
                # The current value of self._dema is represented by self._dema.current.value
                self.plot("DoubleExponentialMovingAverage", "dema", self._dema.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class DoubleExponentialMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private DoubleExponentialMovingAverage _dema;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _dema = new DoubleExponentialMovingAverage(20);
            RegisterIndicator(_symbol, _dema, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_dema.IsReady)
            {
                // The current value of _dema is represented by itself (_dema)
                // or _dema.Current.Value
                Plot("DoubleExponentialMovingAverage", "dema", _dema);
                
            }
        }
    }
    class DoubleExponentialMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._dema = DoubleExponentialMovingAverage(20)
            self.register_indicator(self._symbol, self._dema, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._dema.is_ready:
                # The current value of self._dema is represented by self._dema.current.value
                self.plot("DoubleExponentialMovingAverage", "dema", self._dema.current.value)
                
    

    The following reference table describes the DoubleExponentialMovingAverage constructor:

    DoubleExponentialMovingAverage

    class QuantConnect.Indicators.DoubleExponentialMovingAverage [source]

    This indicator computes the Double Exponential Moving Average (DEMA). The Double Exponential Moving Average is calculated with the following formula: EMA2 = EMA(EMA(t,period),period) DEMA = 2 * EMA(t,period) - EMA2 The Generalized DEMA (GD) is calculated with the following formula: GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DoubleExponentialMovingAverage

    class QuantConnect.Indicators.DoubleExponentialMovingAverage [source]

    This indicator computes the Double Exponential Moving Average (DEMA). The Double Exponential Moving Average is calculated with the following formula: EMA2 = EMA(EMA(t,period),period) DEMA = 2 * EMA(t,period) - EMA2 The Generalized DEMA (GD) is calculated with the following formula: GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of DoubleExponentialMovingAverage using the plotly library.

    DoubleExponentialMovingAverage line plot.

     

    Supported Indicators

    Ease Of Movement Value

    Introduction

    This indicator computes the n-period Ease of Movement Value using the following: MID = (high_1 + low_1)/2 - (high_0 + low_0)/2 RATIO = (currentVolume/10000) / (high_1 - low_1) EMV = MID/RATIO _SMA = n-period of EMV Returns _SMA source

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using EMV Indicator

    To create an automatic indicators for EaseOfMovementValue , call the EMV helper method from the QCAlgorithm class. The EMV method creates a EaseOfMovementValue object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class EaseOfMovementValueAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private EaseOfMovementValue _emv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _emv = EMV(_symbol, 1, 10000);
        }
    
        public override void OnData(Slice data)
        {
            if (_emv.IsReady)
            {
                // The current value of _emv is represented by itself (_emv)
                // or _emv.Current.Value
                Plot("EaseOfMovementValue", "emv", _emv);
                
            }
        }
    }
    class EaseOfMovementValueAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._emv = self.emv(self._symbol, 1, 10000)
    
        def on_data(self, slice: Slice) -> None:
            if self._emv.is_ready:
                # The current value of self._emv is represented by self._emv.current.value
                self.plot("EaseOfMovementValue", "emv", self._emv.current.value)
                
    

    The following reference table describes the EMV method:

    emv( symbol, period=1, scale=10000, resolution=None, selector=None ) [source]

    Creates an EaseOfMovementValue indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The EaseOfMovementValue indicator for the given parameters

    Return type:

    EaseOfMovementValue

    EMV( symbol, period=1, scale=10000, resolution=None, selector=None ) [source]

    Creates an EaseOfMovementValue indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The EaseOfMovementValue indicator for the given parameters

    Return type:

    EaseOfMovementValue

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a EaseOfMovementValue indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class EaseOfMovementValueAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private EaseOfMovementValue _emv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _emv = new EaseOfMovementValue(1, 10000);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _emv.Update(bar);
            }
       
            if (_emv.IsReady)
            {
                // The current value of _emv is represented by itself (_emv)
                // or _emv.Current.Value
                Plot("EaseOfMovementValue", "emv", _emv);
                
            }
        }
    }
    class EaseOfMovementValueAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._emv = EaseOfMovementValue(1, 10000)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._emv.update(bar)
            if self._emv.is_ready:
                # The current value of self._emv is represented by self._emv.current.value
                self.plot("EaseOfMovementValue", "emv", self._emv.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class EaseOfMovementValueAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private EaseOfMovementValue _emv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _emv = new EaseOfMovementValue(1, 10000);
            RegisterIndicator(_symbol, _emv, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_emv.IsReady)
            {
                // The current value of _emv is represented by itself (_emv)
                // or _emv.Current.Value
                Plot("EaseOfMovementValue", "emv", _emv);
                
            }
        }
    }
    class EaseOfMovementValueAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._emv = EaseOfMovementValue(1, 10000)
            self.register_indicator(self._symbol, self._emv, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._emv.is_ready:
                # The current value of self._emv is represented by self._emv.current.value
                self.plot("EaseOfMovementValue", "emv", self._emv.current.value)
                
    

    The following reference table describes the EaseOfMovementValue constructor:

    EaseOfMovementValue

    class QuantConnect.Indicators.EaseOfMovementValue [source]

    This indicator computes the n-period Ease of Movement Value using the following: MID = (high_1 + low_1)/2 - (high_0 + low_0)/2 RATIO = (currentVolume/10000) / (high_1 - low_1) EMV = MID/RATIO _SMA = n-period of EMV Returns _SMA Source: https://www.investopedia.com/terms/e/easeofmovement.asp

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    EaseOfMovementValue

    class QuantConnect.Indicators.EaseOfMovementValue [source]

    This indicator computes the n-period Ease of Movement Value using the following: MID = (high_1 + low_1)/2 - (high_0 + low_0)/2 RATIO = (currentVolume/10000) / (high_1 - low_1) EMV = MID/RATIO _SMA = n-period of EMV Returns _SMA Source: https://www.investopedia.com/terms/e/easeofmovement.asp

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of EaseOfMovementValue using the plotly library.

    EaseOfMovementValue line plot.

     

    Supported Indicators

    Exponential Moving Average

    Introduction

    This indicator represents the traditional exponential moving average indicator (EMA). When the indicator is ready, the first value of the EMA is equivalent to the simple moving average. After the first EMA value, the EMA value is a function of the previous EMA value. Therefore, depending on the number of samples you feed into the indicator, it can provide different EMA values for a single security and lookback period. To make the indicator values consistent across time, warm up the indicator with all the trailing security price history.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using EMA Indicator

    To create an automatic indicators for ExponentialMovingAverage , call the EMA helper method from the QCAlgorithm class. The EMA method creates a ExponentialMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ExponentialMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ExponentialMovingAverage _ema;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ema = EMA(_symbol, 20, 0.5);
        }
    
        public override void OnData(Slice data)
        {
            if (_ema.IsReady)
            {
                // The current value of _ema is represented by itself (_ema)
                // or _ema.Current.Value
                Plot("ExponentialMovingAverage", "ema", _ema);
                
            }
        }
    }
    class ExponentialMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ema = self.ema(self._symbol, 20, 0.5)
    
        def on_data(self, slice: Slice) -> None:
            if self._ema.is_ready:
                # The current value of self._ema is represented by self._ema.current.value
                self.plot("ExponentialMovingAverage", "ema", self._ema.current.value)
                
    

    The following reference table describes the EMA method:

    ema( symbol, period, smoothing_factor, resolution=None, selector=None ) [source]

    Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The ExponentialMovingAverage for the given parameters

    Return type:

    ExponentialMovingAverage

    EMA( symbol, period, smoothingFactor, resolution=None, selector=None ) [source]

    Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The ExponentialMovingAverage for the given parameters

    Return type:

    ExponentialMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ExponentialMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class ExponentialMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ExponentialMovingAverage _ema;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ema = new ExponentialMovingAverage(20, 0.5);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _ema.Update(bar.EndTime, bar.Close);
            }
       
            if (_ema.IsReady)
            {
                // The current value of _ema is represented by itself (_ema)
                // or _ema.Current.Value
                Plot("ExponentialMovingAverage", "ema", _ema);
                
            }
        }
    }
    class ExponentialMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ema = ExponentialMovingAverage(20, 0.5)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._ema.update(bar.EndTime, bar.Close)
            if self._ema.is_ready:
                # The current value of self._ema is represented by self._ema.current.value
                self.plot("ExponentialMovingAverage", "ema", self._ema.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ExponentialMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ExponentialMovingAverage _ema;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ema = new ExponentialMovingAverage(20, 0.5);
            RegisterIndicator(_symbol, _ema, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_ema.IsReady)
            {
                // The current value of _ema is represented by itself (_ema)
                // or _ema.Current.Value
                Plot("ExponentialMovingAverage", "ema", _ema);
                
            }
        }
    }
    class ExponentialMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ema = ExponentialMovingAverage(20, 0.5)
            self.register_indicator(self._symbol, self._ema, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._ema.is_ready:
                # The current value of self._ema is represented by self._ema.current.value
                self.plot("ExponentialMovingAverage", "ema", self._ema.current.value)
                
    

    The following reference table describes the ExponentialMovingAverage constructor:

    ExponentialMovingAverage

    class QuantConnect.Indicators.ExponentialMovingAverage [source]

    Represents the traditional exponential moving average indicator (EMA). When the indicator is ready, the first value of the EMA is equivalent to the simple moving average. After the first EMA value, the EMA value is a function of the previous EMA value. Therefore, depending on the number of samples you feed into the indicator, it can provide different EMA values for a single security and lookback period. To make the indicator values consistent across time, warm up the indicator with all the trailing security price history.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ExponentialMovingAverage

    class QuantConnect.Indicators.ExponentialMovingAverage [source]

    Represents the traditional exponential moving average indicator (EMA). When the indicator is ready, the first value of the EMA is equivalent to the simple moving average. After the first EMA value, the EMA value is a function of the previous EMA value. Therefore, depending on the number of samples you feed into the indicator, it can provide different EMA values for a single security and lookback period. To make the indicator values consistent across time, warm up the indicator with all the trailing security price history.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of ExponentialMovingAverage using the plotly library.

    ExponentialMovingAverage line plot.

     

    Supported Indicators

    Filtered Identity

    Introduction

    This indicator represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given if it passes a filter condition

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using FilteredIdentity Indicator

    To create an automatic indicators for FilteredIdentity , call the FilteredIdentity helper method from the QCAlgorithm class. The FilteredIdentity method creates a FilteredIdentity object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class FilteredIdentityAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private FilteredIdentity _filteredidentity;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _filteredidentity = FilteredIdentity(_symbol, filter = lambda x: x.Close > x.Open);
        }
    
        public override void OnData(Slice data)
        {
            if (_filteredidentity.IsReady)
            {
                // The current value of _filteredidentity is represented by itself (_filteredidentity)
                // or _filteredidentity.Current.Value
                Plot("FilteredIdentity", "filteredidentity", _filteredidentity);
                
            }
        }
    }
    class FilteredIdentityAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._filteredidentity = self.filteredidentity(self._symbol, filter = lambda x: x.Close > x.Open)
    
        def on_data(self, slice: Slice) -> None:
            if self._filteredidentity.is_ready:
                # The current value of self._filteredidentity is represented by self._filteredidentity.current.value
                self.plot("FilteredIdentity", "filteredidentity", self._filteredidentity.current.value)
                
    

    The following reference table describes the FilteredIdentity method:

    Warning: include(/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-filteredidentity.html): Failed to open stream: No such file or directory in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73 Warning: include(): Failed opening '/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-filteredidentity.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a FilteredIdentity indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class FilteredIdentityAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private FilteredIdentity _filteredidentity;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _filteredidentity = new FilteredIdentity("SPY", filter = lambda x: x.Close > x.Open);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _filteredidentity.Update(bar.EndTime, bar.Close);
            }
       
            if (_filteredidentity.IsReady)
            {
                // The current value of _filteredidentity is represented by itself (_filteredidentity)
                // or _filteredidentity.Current.Value
                Plot("FilteredIdentity", "filteredidentity", _filteredidentity);
                
            }
        }
    }
    class FilteredIdentityAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._filteredidentity = FilteredIdentity("SPY", filter = lambda x: x.Close > x.Open)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._filteredidentity.update(bar.EndTime, bar.Close)
            if self._filteredidentity.is_ready:
                # The current value of self._filteredidentity is represented by self._filteredidentity.current.value
                self.plot("FilteredIdentity", "filteredidentity", self._filteredidentity.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class FilteredIdentityAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private FilteredIdentity _filteredidentity;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _filteredidentity = new FilteredIdentity("SPY", filter = lambda x: x.Close > x.Open);
            RegisterIndicator(_symbol, _filteredidentity, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_filteredidentity.IsReady)
            {
                // The current value of _filteredidentity is represented by itself (_filteredidentity)
                // or _filteredidentity.Current.Value
                Plot("FilteredIdentity", "filteredidentity", _filteredidentity);
                
            }
        }
    }
    class FilteredIdentityAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._filteredidentity = FilteredIdentity("SPY", filter = lambda x: x.Close > x.Open)
            self.register_indicator(self._symbol, self._filteredidentity, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._filteredidentity.is_ready:
                # The current value of self._filteredidentity is represented by self._filteredidentity.current.value
                self.plot("FilteredIdentity", "filteredidentity", self._filteredidentity.current.value)
                
    

    The following reference table describes the FilteredIdentity constructor:

    FilteredIdentity

    class QuantConnect.Indicators.FilteredIdentity [source]

    Represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given if it passes a filter condition

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    FilteredIdentity

    class QuantConnect.Indicators.FilteredIdentity [source]

    Represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given if it passes a filter condition

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of FilteredIdentity using the plotly library.

    FilteredIdentity line plot.

     

    Supported Indicators

    Fisher Transform

    Introduction

    The Fisher transform is a mathematical process which is used to convert any data set to a modified data set whose Probability Distribution Function is approximately Gaussian. Once the Fisher transform is computed, the transformed data can then be analyzed in terms of it's deviation from the mean. The equation is y = .5 * ln [ 1 + x / 1 - x ] where x is the input y is the output ln is the natural logarithm The Fisher transform has much sharper turning points than other indicators such as MACD For more info, read chapter 1 of Cybernetic Analysis for Stocks and Futures by John F. Ehlers We are implementing the latest version of this indicator found at Fig. 4 of http://www.mesasoftware.com/papers/UsingTheFisherTransform.pdf

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using FISH Indicator

    To create an automatic indicators for FisherTransform , call the FISH helper method from the QCAlgorithm class. The FISH method creates a FisherTransform object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class FisherTransformAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private FisherTransform _fish;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _fish = FISH(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_fish.IsReady)
            {
                // The current value of _fish is represented by itself (_fish)
                // or _fish.Current.Value
                Plot("FisherTransform", "fish", _fish);
                
            }
        }
    }
    class FisherTransformAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._fish = self.fish(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._fish.is_ready:
                # The current value of self._fish is represented by self._fish.current.value
                self.plot("FisherTransform", "fish", self._fish.current.value)
                
    

    The following reference table describes the FISH method:

    fish( symbol, period, resolution=None, selector=None ) [source]

    Creates an FisherTransform indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The FisherTransform for the given parameters

    Return type:

    FisherTransform

    FISH( symbol, period, resolution=None, selector=None ) [source]

    Creates an FisherTransform indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The FisherTransform for the given parameters

    Return type:

    FisherTransform

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a FisherTransform indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class FisherTransformAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private FisherTransform _fish;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _fish = new FisherTransform(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _fish.Update(bar);
            }
       
            if (_fish.IsReady)
            {
                // The current value of _fish is represented by itself (_fish)
                // or _fish.Current.Value
                Plot("FisherTransform", "fish", _fish);
                
            }
        }
    }
    class FisherTransformAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._fish = FisherTransform(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._fish.update(bar)
            if self._fish.is_ready:
                # The current value of self._fish is represented by self._fish.current.value
                self.plot("FisherTransform", "fish", self._fish.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class FisherTransformAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private FisherTransform _fish;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _fish = new FisherTransform(20);
            RegisterIndicator(_symbol, _fish, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_fish.IsReady)
            {
                // The current value of _fish is represented by itself (_fish)
                // or _fish.Current.Value
                Plot("FisherTransform", "fish", _fish);
                
            }
        }
    }
    class FisherTransformAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._fish = FisherTransform(20)
            self.register_indicator(self._symbol, self._fish, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._fish.is_ready:
                # The current value of self._fish is represented by self._fish.current.value
                self.plot("FisherTransform", "fish", self._fish.current.value)
                
    

    The following reference table describes the FisherTransform constructor:

    FisherTransform

    class QuantConnect.Indicators.FisherTransform [source]

    The Fisher transform is a mathematical process which is used to convert any data set to a modified data set whose Probability Distribution Function is approximately Gaussian. Once the Fisher transform is computed, the transformed data can then be analyzed in terms of it's deviation from the mean. The equation is y = .5 * ln [ 1 + x / 1 - x ] where x is the input y is the output ln is the natural logarithm The Fisher transform has much sharper turning points than other indicators such as MACD For more info, read chapter 1 of Cybernetic Analysis for Stocks and Futures by John F. Ehlers We are implementing the latest version of this indicator found at Fig. 4 of http://www.mesasoftware.com/papers/UsingTheFisherTransform.pdf

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    FisherTransform

    class QuantConnect.Indicators.FisherTransform [source]

    The Fisher transform is a mathematical process which is used to convert any data set to a modified data set whose Probability Distribution Function is approximately Gaussian. Once the Fisher transform is computed, the transformed data can then be analyzed in terms of it's deviation from the mean. The equation is y = .5 * ln [ 1 + x / 1 - x ] where x is the input y is the output ln is the natural logarithm The Fisher transform has much sharper turning points than other indicators such as MACD For more info, read chapter 1 of Cybernetic Analysis for Stocks and Futures by John F. Ehlers We are implementing the latest version of this indicator found at Fig. 4 of http://www.mesasoftware.com/papers/UsingTheFisherTransform.pdf

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of FisherTransform using the plotly library.

    FisherTransform line plot.

     

    Supported Indicators

    Fractal Adaptive Moving Average

    Introduction

    The Fractal Adaptive Moving Average (FRAMA) by John Ehlers

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using FRAMA Indicator

    To create an automatic indicators for FractalAdaptiveMovingAverage , call the FRAMA helper method from the QCAlgorithm class. The FRAMA method creates a FractalAdaptiveMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class FractalAdaptiveMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private FractalAdaptiveMovingAverage _frama;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _frama = FRAMA(_symbol, 20, 198);
        }
    
        public override void OnData(Slice data)
        {
            if (_frama.IsReady)
            {
                // The current value of _frama is represented by itself (_frama)
                // or _frama.Current.Value
                Plot("FractalAdaptiveMovingAverage", "frama", _frama);
                
            }
        }
    }
    class FractalAdaptiveMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._frama = self.frama(self._symbol, 20, 198)
    
        def on_data(self, slice: Slice) -> None:
            if self._frama.is_ready:
                # The current value of self._frama is represented by self._frama.current.value
                self.plot("FractalAdaptiveMovingAverage", "frama", self._frama.current.value)
                
    

    The following reference table describes the FRAMA method:

    frama( symbol, period, long_period=198, resolution=None, selector=None ) [source]

    Creates an FractalAdaptiveMovingAverage (FRAMA) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The FRAMA for the given parameters

    Return type:

    FractalAdaptiveMovingAverage

    FRAMA( symbol, period, longPeriod=198, resolution=None, selector=None ) [source]

    Creates an FractalAdaptiveMovingAverage (FRAMA) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The FRAMA for the given parameters

    Return type:

    FractalAdaptiveMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a FractalAdaptiveMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class FractalAdaptiveMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private FractalAdaptiveMovingAverage _frama;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _frama = new FractalAdaptiveMovingAverage(20, 198);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _frama.Update(bar);
            }
       
            if (_frama.IsReady)
            {
                // The current value of _frama is represented by itself (_frama)
                // or _frama.Current.Value
                Plot("FractalAdaptiveMovingAverage", "frama", _frama);
                
            }
        }
    }
    class FractalAdaptiveMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._frama = FractalAdaptiveMovingAverage(20, 198)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._frama.update(bar)
            if self._frama.is_ready:
                # The current value of self._frama is represented by self._frama.current.value
                self.plot("FractalAdaptiveMovingAverage", "frama", self._frama.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class FractalAdaptiveMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private FractalAdaptiveMovingAverage _frama;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _frama = new FractalAdaptiveMovingAverage(20, 198);
            RegisterIndicator(_symbol, _frama, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_frama.IsReady)
            {
                // The current value of _frama is represented by itself (_frama)
                // or _frama.Current.Value
                Plot("FractalAdaptiveMovingAverage", "frama", _frama);
                
            }
        }
    }
    class FractalAdaptiveMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._frama = FractalAdaptiveMovingAverage(20, 198)
            self.register_indicator(self._symbol, self._frama, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._frama.is_ready:
                # The current value of self._frama is represented by self._frama.current.value
                self.plot("FractalAdaptiveMovingAverage", "frama", self._frama.current.value)
                
    

    The following reference table describes the FractalAdaptiveMovingAverage constructor:

    FractalAdaptiveMovingAverage

    class QuantConnect.Indicators.FractalAdaptiveMovingAverage [source]

    The Fractal Adaptive Moving Average (FRAMA) by John Ehlers

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets the average to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Returns whether the indicator will return valid results

    Returns:

    Returns whether the indicator will return valid results

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    FractalAdaptiveMovingAverage

    class QuantConnect.Indicators.FractalAdaptiveMovingAverage [source]

    The Fractal Adaptive Moving Average (FRAMA) by John Ehlers

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets the average to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Returns whether the indicator will return valid results

    Returns:

    Returns whether the indicator will return valid results

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of FractalAdaptiveMovingAverage using the plotly library.

    FractalAdaptiveMovingAverage line plot.

     

    Supported Indicators

    Gamma

    Introduction

    Option Gamma indicator that calculate the gamma of an option

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using G Indicator

    To create an automatic indicators for Gamma , call the G helper method from the QCAlgorithm class. The G method creates a Gamma object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class GammaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Gamma _g;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _g = G(_option, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (_g.IsReady)
            {
                // The current value of _g is represented by itself (_g)
                // or _g.Current.Value
                Plot("Gamma", "g", _g);
                // Plot all properties of g
                Plot("Gamma", "impliedvolatility", _g.ImpliedVolatility);
                Plot("Gamma", "riskfreerate", _g.RiskFreeRate);
                Plot("Gamma", "dividendyield", _g.DividendYield);
                Plot("Gamma", "price", _g.Price);
                Plot("Gamma", "oppositeprice", _g.OppositePrice);
                Plot("Gamma", "underlyingprice", _g.UnderlyingPrice);
            }
        }
    }
    class GammaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._g = self.g(self.option, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            if self._g.is_ready:
                # The current value of self._g is represented by self._g.current.value
                self.plot("Gamma", "g", self._g.current.value)
                # Plot all attributes of self._g
                self.plot("Gamma", "implied_volatility", self._g.implied_volatility.current.value)
                self.plot("Gamma", "risk_free_rate", self._g.risk_free_rate.current.value)
                self.plot("Gamma", "dividend_yield", self._g.dividend_yield.current.value)
                self.plot("Gamma", "price", self._g.price.current.value)
                self.plot("Gamma", "opposite_price", self._g.opposite_price.current.value)
                self.plot("Gamma", "underlying_price", self._g.underlying_price.current.value)
    

    The following reference table describes the G method:

    g( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    A new Gamma indicator for the specified symbol

    Return type:

    Gamma

    G( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    A new Gamma indicator for the specified symbol

    Return type:

    Gamma

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Gamma indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class GammaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Gamma _g;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _g = new Gamma(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _g.Update(new IndicatorDataPoint(_symbol, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_option, out bar))
            {      
                _g.Update(new IndicatorDataPoint(_option, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_mirrorOption, out bar))
            {      
                _g.Update(new IndicatorDataPoint(_mirrorOption, bar.EndTime, bar.Close));
            }
       
            if (_g.IsReady)
            {
                // The current value of _g is represented by itself (_g)
                // or _g.Current.Value
                Plot("Gamma", "g", _g);
                // Plot all properties of g
                Plot("Gamma", "impliedvolatility", _g.ImpliedVolatility);
                Plot("Gamma", "riskfreerate", _g.RiskFreeRate);
                Plot("Gamma", "dividendyield", _g.DividendYield);
                Plot("Gamma", "price", _g.Price);
                Plot("Gamma", "oppositeprice", _g.OppositePrice);
                Plot("Gamma", "underlyingprice", _g.UnderlyingPrice);
            }
        }
    }
    class GammaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._g = Gamma(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._g.update(IndicatorDataPoint(self._symbol, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.option)
            if bar:
                self._g.update(IndicatorDataPoint(self.option, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.mirror_option)
            if bar:
                self._g.update(IndicatorDataPoint(self.mirror_option, bar.end_time, bar.close))
            if self._g.is_ready:
                # The current value of self._g is represented by self._g.current.value
                self.plot("Gamma", "g", self._g.current.value)
                # Plot all attributes of self._g
                self.plot("Gamma", "implied_volatility", self._g.implied_volatility.current.value)
                self.plot("Gamma", "risk_free_rate", self._g.risk_free_rate.current.value)
                self.plot("Gamma", "dividend_yield", self._g.dividend_yield.current.value)
                self.plot("Gamma", "price", self._g.price.current.value)
                self.plot("Gamma", "opposite_price", self._g.opposite_price.current.value)
                self.plot("Gamma", "underlying_price", self._g.underlying_price.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class GammaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Gamma _g;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _g = new Gamma(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
            RegisterIndicator(_symbol, _g, Resolution.Daily);
            RegisterIndicator(_option, _g, Resolution.Daily);
            RegisterIndicator(_mirrorOption, _g, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_g.IsReady)
            {
                // The current value of _g is represented by itself (_g)
                // or _g.Current.Value
                Plot("Gamma", "g", _g);
                // Plot all properties of g
                Plot("Gamma", "impliedvolatility", _g.ImpliedVolatility);
                Plot("Gamma", "riskfreerate", _g.RiskFreeRate);
                Plot("Gamma", "dividendyield", _g.DividendYield);
                Plot("Gamma", "price", _g.Price);
                Plot("Gamma", "oppositeprice", _g.OppositePrice);
                Plot("Gamma", "underlyingprice", _g.UnderlyingPrice);
            }
        }
    }
    class GammaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._g = Gamma(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
            self.register_indicator(self._symbol, self._g, Resolution.DAILY)
            self.register_indicator(self.option, self._g, Resolution.DAILY)
            self.register_indicator(self.mirror_option, self._g, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._g.is_ready:
                # The current value of self._g is represented by self._g.current.value
                self.plot("Gamma", "g", self._g.current.value)
                # Plot all attributes of self._g
                self.plot("Gamma", "implied_volatility", self._g.implied_volatility.current.value)
                self.plot("Gamma", "risk_free_rate", self._g.risk_free_rate.current.value)
                self.plot("Gamma", "dividend_yield", self._g.dividend_yield.current.value)
                self.plot("Gamma", "price", self._g.price.current.value)
                self.plot("Gamma", "opposite_price", self._g.opposite_price.current.value)
                self.plot("Gamma", "underlying_price", self._g.underlying_price.current.value)
    

    The following reference table describes the Gamma constructor:

    Gamma

    class QuantConnect.Indicators.Gamma [source]

    Option Gamma indicator that calculate the gamma of an option

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and all sub-indicators

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property dividend_yield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    datetime

    property implied_volatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property opposite_price

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property risk_free_rate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    float

    property style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property underlying_price

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property use_mirror_contract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Gamma

    class QuantConnect.Indicators.Gamma [source]

    Option Gamma indicator that calculate the gamma of an option

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and all sub-indicators

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property DividendYield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property Expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    DateTime

    property ImpliedVolatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property OppositePrice

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property RiskFreeRate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    decimal

    property Style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property UnderlyingPrice

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property UseMirrorContract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Gamma using the plotly library.

    Gamma line plot.

     

    Supported Indicators

    Heikin Ashi

    Introduction

    This indicator computes the Heikin-Ashi bar (HA) The Heikin-Ashi bar is calculated using the following formulas: HA_Close[0] = (Open[0] + High[0] + Low[0] + Close[0]) / 4 HA_Open[0] = (HA_Open[1] + HA_Close[1]) / 2 HA_High[0] = MAX(High[0], HA_Open[0], HA_Close[0]) HA_Low[0] = MIN(Low[0], HA_Open[0], HA_Close[0])

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using HeikinAshi Indicator

    To create an automatic indicators for HeikinAshi , call the HeikinAshi helper method from the QCAlgorithm class. The HeikinAshi method creates a HeikinAshi object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HeikinAshiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HeikinAshi _heikinashi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _heikinashi = HeikinAshi(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_heikinashi.IsReady)
            {
                // The current value of _heikinashi is represented by itself (_heikinashi)
                // or _heikinashi.Current.Value
                Plot("HeikinAshi", "heikinashi", _heikinashi);
                // Plot all properties of heikinashi
                Plot("HeikinAshi", "open", _heikinashi.Open);
                Plot("HeikinAshi", "high", _heikinashi.High);
                Plot("HeikinAshi", "low", _heikinashi.Low);
                Plot("HeikinAshi", "close", _heikinashi.Close);
                Plot("HeikinAshi", "volume", _heikinashi.Volume);
            }
        }
    }
    class HeikinAshiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._heikinashi = self.heikinashi(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._heikinashi.is_ready:
                # The current value of self._heikinashi is represented by self._heikinashi.current.value
                self.plot("HeikinAshi", "heikinashi", self._heikinashi.current.value)
                # Plot all attributes of self._heikinashi
                self.plot("HeikinAshi", "open", self._heikinashi.open.current.value)
                self.plot("HeikinAshi", "high", self._heikinashi.high.current.value)
                self.plot("HeikinAshi", "low", self._heikinashi.low.current.value)
                self.plot("HeikinAshi", "close", self._heikinashi.close.current.value)
                self.plot("HeikinAshi", "volume", self._heikinashi.volume.current.value)
    

    The following reference table describes the HeikinAshi method:

    Warning: include(/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-heikinashi.html): Failed to open stream: No such file or directory in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73 Warning: include(): Failed opening '/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-heikinashi.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a HeikinAshi indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class HeikinAshiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HeikinAshi _heikinashi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _heikinashi = new HeikinAshi();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _heikinashi.Update(bar);
            }
       
            if (_heikinashi.IsReady)
            {
                // The current value of _heikinashi is represented by itself (_heikinashi)
                // or _heikinashi.Current.Value
                Plot("HeikinAshi", "heikinashi", _heikinashi);
                // Plot all properties of heikinashi
                Plot("HeikinAshi", "open", _heikinashi.Open);
                Plot("HeikinAshi", "high", _heikinashi.High);
                Plot("HeikinAshi", "low", _heikinashi.Low);
                Plot("HeikinAshi", "close", _heikinashi.Close);
                Plot("HeikinAshi", "volume", _heikinashi.Volume);
            }
        }
    }
    class HeikinAshiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._heikinashi = HeikinAshi()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._heikinashi.update(bar)
            if self._heikinashi.is_ready:
                # The current value of self._heikinashi is represented by self._heikinashi.current.value
                self.plot("HeikinAshi", "heikinashi", self._heikinashi.current.value)
                # Plot all attributes of self._heikinashi
                self.plot("HeikinAshi", "open", self._heikinashi.open.current.value)
                self.plot("HeikinAshi", "high", self._heikinashi.high.current.value)
                self.plot("HeikinAshi", "low", self._heikinashi.low.current.value)
                self.plot("HeikinAshi", "close", self._heikinashi.close.current.value)
                self.plot("HeikinAshi", "volume", self._heikinashi.volume.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HeikinAshiAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HeikinAshi _heikinashi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _heikinashi = new HeikinAshi();
            RegisterIndicator(_symbol, _heikinashi, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_heikinashi.IsReady)
            {
                // The current value of _heikinashi is represented by itself (_heikinashi)
                // or _heikinashi.Current.Value
                Plot("HeikinAshi", "heikinashi", _heikinashi);
                // Plot all properties of heikinashi
                Plot("HeikinAshi", "open", _heikinashi.Open);
                Plot("HeikinAshi", "high", _heikinashi.High);
                Plot("HeikinAshi", "low", _heikinashi.Low);
                Plot("HeikinAshi", "close", _heikinashi.Close);
                Plot("HeikinAshi", "volume", _heikinashi.Volume);
            }
        }
    }
    class HeikinAshiAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._heikinashi = HeikinAshi()
            self.register_indicator(self._symbol, self._heikinashi, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._heikinashi.is_ready:
                # The current value of self._heikinashi is represented by self._heikinashi.current.value
                self.plot("HeikinAshi", "heikinashi", self._heikinashi.current.value)
                # Plot all attributes of self._heikinashi
                self.plot("HeikinAshi", "open", self._heikinashi.open.current.value)
                self.plot("HeikinAshi", "high", self._heikinashi.high.current.value)
                self.plot("HeikinAshi", "low", self._heikinashi.low.current.value)
                self.plot("HeikinAshi", "close", self._heikinashi.close.current.value)
                self.plot("HeikinAshi", "volume", self._heikinashi.volume.current.value)
    

    The following reference table describes the HeikinAshi constructor:

    HeikinAshi

    class QuantConnect.Indicators.HeikinAshi [source]

    This indicator computes the Heikin-Ashi bar (HA) The Heikin-Ashi bar is calculated using the following formulas: HA_Close[0] = (Open[0] + High[0] + Low[0] + Close[0]) / 4 HA_Open[0] = (HA_Open[1] + HA_Close[1]) / 2 HA_High[0] = MAX(High[0], HA_Open[0], HA_Close[0]) HA_Low[0] = MIN(Low[0], HA_Open[0], HA_Close[0])

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property close

    Gets the Heikin-Ashi Close

    Returns:

    Gets the Heikin-Ashi Close

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property high

    Gets the Heikin-Ashi High

    Returns:

    Gets the Heikin-Ashi High

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property low

    Gets the Heikin-Ashi Low

    Returns:

    Gets the Heikin-Ashi Low

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property open

    Gets the Heikin-Ashi Open

    Returns:

    Gets the Heikin-Ashi Open

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property volume

    Gets the Heikin-Ashi Volume

    Returns:

    Gets the Heikin-Ashi Volume

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HeikinAshi

    class QuantConnect.Indicators.HeikinAshi [source]

    This indicator computes the Heikin-Ashi bar (HA) The Heikin-Ashi bar is calculated using the following formulas: HA_Close[0] = (Open[0] + High[0] + Low[0] + Close[0]) / 4 HA_Open[0] = (HA_Open[1] + HA_Close[1]) / 2 HA_High[0] = MAX(High[0], HA_Open[0], HA_Close[0]) HA_Low[0] = MIN(Low[0], HA_Open[0], HA_Close[0])

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Close

    Gets the Heikin-Ashi Close

    Returns:

    Gets the Heikin-Ashi Close

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property High

    Gets the Heikin-Ashi High

    Returns:

    Gets the Heikin-Ashi High

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Low

    Gets the Heikin-Ashi Low

    Returns:

    Gets the Heikin-Ashi Low

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Open

    Gets the Heikin-Ashi Open

    Returns:

    Gets the Heikin-Ashi Open

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Volume

    Gets the Heikin-Ashi Volume

    Returns:

    Gets the Heikin-Ashi Volume

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of HeikinAshi using the plotly library.

    HeikinAshi line plot.

     

    Supported Indicators

    Hilbert Transform

    Introduction

    This indicator computes the Hilbert Transform Indicator by John Ehlers. By using present and prior price differences, and some feedback, price values are split into their complex number components of real (inPhase) and imaginary (quadrature) parts. source

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using HT Indicator

    To create an automatic indicators for HilbertTransform , call the HT helper method from the QCAlgorithm class. The HT method creates a HilbertTransform object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HilbertTransformAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HilbertTransform _ht;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ht = HT(_symbol, 7, 0.635, 0.338);
        }
    
        public override void OnData(Slice data)
        {
            if (_ht.IsReady)
            {
                // The current value of _ht is represented by itself (_ht)
                // or _ht.Current.Value
                Plot("HilbertTransform", "ht", _ht);
                // Plot all properties of ht
                Plot("HilbertTransform", "inphase", _ht.InPhase);
                Plot("HilbertTransform", "quadrature", _ht.Quadrature);
            }
        }
    }
    class HilbertTransformAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ht = self.ht(self._symbol, 7, 0.635, 0.338)
    
        def on_data(self, slice: Slice) -> None:
            if self._ht.is_ready:
                # The current value of self._ht is represented by self._ht.current.value
                self.plot("HilbertTransform", "ht", self._ht.current.value)
                # Plot all attributes of self._ht
                self.plot("HilbertTransform", "in_phase", self._ht.in_phase.current.value)
                self.plot("HilbertTransform", "quadrature", self._ht.quadrature.current.value)
    

    The following reference table describes the HT method:

    ht( symbol, length, in_phase_multiplication_factor, quadrature_multiplication_factor, resolution=None, selector=None ) [source]

    Creates a new Hilbert Transform indicator

    Parameters:
    Return type:

    HilbertTransform

    HT( symbol, length, inPhaseMultiplicationFactor, quadratureMultiplicationFactor, resolution=None, selector=None ) [source]

    Creates a new Hilbert Transform indicator

    Parameters:
    Return type:

    HilbertTransform

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a HilbertTransform indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class HilbertTransformAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HilbertTransform _ht;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ht = new HilbertTransform(7, 0.635, 0.338);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _ht.Update(bar.EndTime, bar.Close);
            }
       
            if (_ht.IsReady)
            {
                // The current value of _ht is represented by itself (_ht)
                // or _ht.Current.Value
                Plot("HilbertTransform", "ht", _ht);
                // Plot all properties of ht
                Plot("HilbertTransform", "inphase", _ht.InPhase);
                Plot("HilbertTransform", "quadrature", _ht.Quadrature);
            }
        }
    }
    class HilbertTransformAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ht = HilbertTransform(7, 0.635, 0.338)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._ht.update(bar.EndTime, bar.Close)
            if self._ht.is_ready:
                # The current value of self._ht is represented by self._ht.current.value
                self.plot("HilbertTransform", "ht", self._ht.current.value)
                # Plot all attributes of self._ht
                self.plot("HilbertTransform", "in_phase", self._ht.in_phase.current.value)
                self.plot("HilbertTransform", "quadrature", self._ht.quadrature.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HilbertTransformAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HilbertTransform _ht;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ht = new HilbertTransform(7, 0.635, 0.338);
            RegisterIndicator(_symbol, _ht, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_ht.IsReady)
            {
                // The current value of _ht is represented by itself (_ht)
                // or _ht.Current.Value
                Plot("HilbertTransform", "ht", _ht);
                // Plot all properties of ht
                Plot("HilbertTransform", "inphase", _ht.InPhase);
                Plot("HilbertTransform", "quadrature", _ht.Quadrature);
            }
        }
    }
    class HilbertTransformAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ht = HilbertTransform(7, 0.635, 0.338)
            self.register_indicator(self._symbol, self._ht, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._ht.is_ready:
                # The current value of self._ht is represented by self._ht.current.value
                self.plot("HilbertTransform", "ht", self._ht.current.value)
                # Plot all attributes of self._ht
                self.plot("HilbertTransform", "in_phase", self._ht.in_phase.current.value)
                self.plot("HilbertTransform", "quadrature", self._ht.quadrature.current.value)
    

    The following reference table describes the HilbertTransform constructor:

    HilbertTransform

    class QuantConnect.Indicators.HilbertTransform [source]

    This indicator computes the Hilbert Transform Indicator by John Ehlers. By using present and prior price differences, and some feedback, price values are split into their complex number components of real (inPhase) and imaginary (quadrature) parts. Source: http://www.technicalanalysis.org.uk/moving-averages/Ehle.pdf

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property in_phase

    Real (inPhase) part of complex number component of price values

    Returns:

    Real (inPhase) part of complex number component of price values

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property quadrature

    Imaginary (quadrature) part of complex number component of price values

    Returns:

    Imaginary (quadrature) part of complex number component of price values

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HilbertTransform

    class QuantConnect.Indicators.HilbertTransform [source]

    This indicator computes the Hilbert Transform Indicator by John Ehlers. By using present and prior price differences, and some feedback, price values are split into their complex number components of real (inPhase) and imaginary (quadrature) parts. Source: http://www.technicalanalysis.org.uk/moving-averages/Ehle.pdf

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property InPhase

    Real (inPhase) part of complex number component of price values

    Returns:

    Real (inPhase) part of complex number component of price values

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Quadrature

    Imaginary (quadrature) part of complex number component of price values

    Returns:

    Imaginary (quadrature) part of complex number component of price values

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of HilbertTransform using the plotly library.

    HilbertTransform line plot.

     

    Supported Indicators

    Hull Moving Average

    Introduction

    Produces a Hull Moving Average as explained at http://www.alanhull.com/hull-moving-average/ and derived from the instructions for the Excel VBA code at http://finance4traders.blogspot.com/2009/06/how-to-calculate-hull-moving-average.html

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using HMA Indicator

    To create an automatic indicators for HullMovingAverage , call the HMA helper method from the QCAlgorithm class. The HMA method creates a HullMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class HullMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HullMovingAverage _hma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hma = HMA(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_hma.IsReady)
            {
                // The current value of _hma is represented by itself (_hma)
                // or _hma.Current.Value
                Plot("HullMovingAverage", "hma", _hma);
                
            }
        }
    }
    class HullMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hma = self.hma(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._hma.is_ready:
                # The current value of self._hma is represented by self._hma.current.value
                self.plot("HullMovingAverage", "hma", self._hma.current.value)
                
    

    The following reference table describes the HMA method:

    hma( symbol, period, resolution=None, selector=None ) [source]

    Creates a new HullMovingAverage indicator. The Hull moving average is a series of nested weighted moving averages, is fast and smooth.

    Parameters:
    Return type:

    HullMovingAverage

    HMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new HullMovingAverage indicator. The Hull moving average is a series of nested weighted moving averages, is fast and smooth.

    Parameters:
    Return type:

    HullMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a HullMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class HullMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HullMovingAverage _hma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hma = new HullMovingAverage(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _hma.Update(bar.EndTime, bar.Close);
            }
       
            if (_hma.IsReady)
            {
                // The current value of _hma is represented by itself (_hma)
                // or _hma.Current.Value
                Plot("HullMovingAverage", "hma", _hma);
                
            }
        }
    }
    class HullMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hma = HullMovingAverage(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._hma.update(bar.EndTime, bar.Close)
            if self._hma.is_ready:
                # The current value of self._hma is represented by self._hma.current.value
                self.plot("HullMovingAverage", "hma", self._hma.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class HullMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private HullMovingAverage _hma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _hma = new HullMovingAverage(20);
            RegisterIndicator(_symbol, _hma, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_hma.IsReady)
            {
                // The current value of _hma is represented by itself (_hma)
                // or _hma.Current.Value
                Plot("HullMovingAverage", "hma", _hma);
                
            }
        }
    }
    class HullMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._hma = HullMovingAverage(20)
            self.register_indicator(self._symbol, self._hma, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._hma.is_ready:
                # The current value of self._hma is represented by self._hma.current.value
                self.plot("HullMovingAverage", "hma", self._hma.current.value)
                
    

    The following reference table describes the HullMovingAverage constructor:

    HullMovingAverage

    class QuantConnect.Indicators.HullMovingAverage [source]

    Produces a Hull Moving Average as explained at http://www.alanhull.com/hull-moving-average/ and derived from the instructions for the Excel VBA code at http://finance4traders.blogspot.com/2009/06/how-to-calculate-hull-moving-average.html

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HullMovingAverage

    class QuantConnect.Indicators.HullMovingAverage [source]

    Produces a Hull Moving Average as explained at http://www.alanhull.com/hull-moving-average/ and derived from the instructions for the Excel VBA code at http://finance4traders.blogspot.com/2009/06/how-to-calculate-hull-moving-average.html

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of HullMovingAverage using the plotly library.

    HullMovingAverage line plot.

     

    Supported Indicators

    Ichimoku Kinko Hyo

    Introduction

    This indicator computes the Ichimoku Kinko Hyo indicator. It consists of the following main indicators: Tenkan-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 9) Kijun-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 26) Senkou A Span: (Tenkan-sen + Kijun-sen )/ 2 from a specific number of periods ago (normally 26) Senkou B Span: (Highest High + Lowest Low) / 2 for the specific period (normally 52), from a specific number of periods ago (normally 26)

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ICHIMOKU Indicator

    To create an automatic indicators for IchimokuKinkoHyo , call the ICHIMOKU helper method from the QCAlgorithm class. The ICHIMOKU method creates a IchimokuKinkoHyo object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class IchimokuKinkoHyoAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private IchimokuKinkoHyo _ichimoku;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ichimoku = ICHIMOKU(_symbol, 9, 26, 17, 52, 26, 26);
        }
    
        public override void OnData(Slice data)
        {
            if (_ichimoku.IsReady)
            {
                // The current value of _ichimoku is represented by itself (_ichimoku)
                // or _ichimoku.Current.Value
                Plot("IchimokuKinkoHyo", "ichimoku", _ichimoku);
                // Plot all properties of ichimoku
                Plot("IchimokuKinkoHyo", "tenkan", _ichimoku.Tenkan);
                Plot("IchimokuKinkoHyo", "kijun", _ichimoku.Kijun);
                Plot("IchimokuKinkoHyo", "senkoua", _ichimoku.SenkouA);
                Plot("IchimokuKinkoHyo", "senkoub", _ichimoku.SenkouB);
                Plot("IchimokuKinkoHyo", "chikou", _ichimoku.Chikou);
                Plot("IchimokuKinkoHyo", "tenkanmaximum", _ichimoku.TenkanMaximum);
                Plot("IchimokuKinkoHyo", "tenkanminimum", _ichimoku.TenkanMinimum);
                Plot("IchimokuKinkoHyo", "kijunmaximum", _ichimoku.KijunMaximum);
                Plot("IchimokuKinkoHyo", "kijunminimum", _ichimoku.KijunMinimum);
                Plot("IchimokuKinkoHyo", "senkoubmaximum", _ichimoku.SenkouBMaximum);
                Plot("IchimokuKinkoHyo", "senkoubminimum", _ichimoku.SenkouBMinimum);
                Plot("IchimokuKinkoHyo", "delayedtenkansenkoua", _ichimoku.DelayedTenkanSenkouA);
                Plot("IchimokuKinkoHyo", "delayedkijunsenkoua", _ichimoku.DelayedKijunSenkouA);
                Plot("IchimokuKinkoHyo", "delayedmaximumsenkoub", _ichimoku.DelayedMaximumSenkouB);
                Plot("IchimokuKinkoHyo", "delayedminimumsenkoub", _ichimoku.DelayedMinimumSenkouB);
            }
        }
    }
    class IchimokuKinkoHyoAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ichimoku = self.ichimoku(self._symbol, 9, 26, 17, 52, 26, 26)
    
        def on_data(self, slice: Slice) -> None:
            if self._ichimoku.is_ready:
                # The current value of self._ichimoku is represented by self._ichimoku.current.value
                self.plot("IchimokuKinkoHyo", "ichimoku", self._ichimoku.current.value)
                # Plot all attributes of self._ichimoku
                self.plot("IchimokuKinkoHyo", "tenkan", self._ichimoku.tenkan.current.value)
                self.plot("IchimokuKinkoHyo", "kijun", self._ichimoku.kijun.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_a", self._ichimoku.senkou_a.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_b", self._ichimoku.senkou_b.current.value)
                self.plot("IchimokuKinkoHyo", "chikou", self._ichimoku.chikou.current.value)
                self.plot("IchimokuKinkoHyo", "tenkan_maximum", self._ichimoku.tenkan_maximum.current.value)
                self.plot("IchimokuKinkoHyo", "tenkan_minimum", self._ichimoku.tenkan_minimum.current.value)
                self.plot("IchimokuKinkoHyo", "kijun_maximum", self._ichimoku.kijun_maximum.current.value)
                self.plot("IchimokuKinkoHyo", "kijun_minimum", self._ichimoku.kijun_minimum.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_b_maximum", self._ichimoku.senkou_b_maximum.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_b_minimum", self._ichimoku.senkou_b_minimum.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_tenkan_senkou_a", self._ichimoku.delayed_tenkan_senkou_a.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_kijun_senkou_a", self._ichimoku.delayed_kijun_senkou_a.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_maximum_senkou_b", self._ichimoku.delayed_maximum_senkou_b.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_minimum_senkou_b", self._ichimoku.delayed_minimum_senkou_b.current.value)
    

    The following reference table describes the ICHIMOKU method:

    ichimoku( symbol, tenkan_period, kijun_period, senkou_a_period, senkou_b_period, senkou_a_delay_period, senkou_b_delay_period, resolution=None, selector=None ) [source]

    Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new IchimokuKinkoHyo indicator with the specified periods and delays

    Return type:

    IchimokuKinkoHyo

    ICHIMOKU( symbol, tenkanPeriod, kijunPeriod, senkouAPeriod, senkouBPeriod, senkouADelayPeriod, senkouBDelayPeriod, resolution=None, selector=None ) [source]

    Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new IchimokuKinkoHyo indicator with the specified periods and delays

    Return type:

    IchimokuKinkoHyo

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a IchimokuKinkoHyo indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class IchimokuKinkoHyoAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private IchimokuKinkoHyo _ichimoku;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ichimoku = new IchimokuKinkoHyo(9, 26, 17, 52, 26, 26);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _ichimoku.Update(bar);
            }
       
            if (_ichimoku.IsReady)
            {
                // The current value of _ichimoku is represented by itself (_ichimoku)
                // or _ichimoku.Current.Value
                Plot("IchimokuKinkoHyo", "ichimoku", _ichimoku);
                // Plot all properties of ichimoku
                Plot("IchimokuKinkoHyo", "tenkan", _ichimoku.Tenkan);
                Plot("IchimokuKinkoHyo", "kijun", _ichimoku.Kijun);
                Plot("IchimokuKinkoHyo", "senkoua", _ichimoku.SenkouA);
                Plot("IchimokuKinkoHyo", "senkoub", _ichimoku.SenkouB);
                Plot("IchimokuKinkoHyo", "chikou", _ichimoku.Chikou);
                Plot("IchimokuKinkoHyo", "tenkanmaximum", _ichimoku.TenkanMaximum);
                Plot("IchimokuKinkoHyo", "tenkanminimum", _ichimoku.TenkanMinimum);
                Plot("IchimokuKinkoHyo", "kijunmaximum", _ichimoku.KijunMaximum);
                Plot("IchimokuKinkoHyo", "kijunminimum", _ichimoku.KijunMinimum);
                Plot("IchimokuKinkoHyo", "senkoubmaximum", _ichimoku.SenkouBMaximum);
                Plot("IchimokuKinkoHyo", "senkoubminimum", _ichimoku.SenkouBMinimum);
                Plot("IchimokuKinkoHyo", "delayedtenkansenkoua", _ichimoku.DelayedTenkanSenkouA);
                Plot("IchimokuKinkoHyo", "delayedkijunsenkoua", _ichimoku.DelayedKijunSenkouA);
                Plot("IchimokuKinkoHyo", "delayedmaximumsenkoub", _ichimoku.DelayedMaximumSenkouB);
                Plot("IchimokuKinkoHyo", "delayedminimumsenkoub", _ichimoku.DelayedMinimumSenkouB);
            }
        }
    }
    class IchimokuKinkoHyoAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ichimoku = IchimokuKinkoHyo(9, 26, 17, 52, 26, 26)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._ichimoku.update(bar)
            if self._ichimoku.is_ready:
                # The current value of self._ichimoku is represented by self._ichimoku.current.value
                self.plot("IchimokuKinkoHyo", "ichimoku", self._ichimoku.current.value)
                # Plot all attributes of self._ichimoku
                self.plot("IchimokuKinkoHyo", "tenkan", self._ichimoku.tenkan.current.value)
                self.plot("IchimokuKinkoHyo", "kijun", self._ichimoku.kijun.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_a", self._ichimoku.senkou_a.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_b", self._ichimoku.senkou_b.current.value)
                self.plot("IchimokuKinkoHyo", "chikou", self._ichimoku.chikou.current.value)
                self.plot("IchimokuKinkoHyo", "tenkan_maximum", self._ichimoku.tenkan_maximum.current.value)
                self.plot("IchimokuKinkoHyo", "tenkan_minimum", self._ichimoku.tenkan_minimum.current.value)
                self.plot("IchimokuKinkoHyo", "kijun_maximum", self._ichimoku.kijun_maximum.current.value)
                self.plot("IchimokuKinkoHyo", "kijun_minimum", self._ichimoku.kijun_minimum.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_b_maximum", self._ichimoku.senkou_b_maximum.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_b_minimum", self._ichimoku.senkou_b_minimum.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_tenkan_senkou_a", self._ichimoku.delayed_tenkan_senkou_a.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_kijun_senkou_a", self._ichimoku.delayed_kijun_senkou_a.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_maximum_senkou_b", self._ichimoku.delayed_maximum_senkou_b.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_minimum_senkou_b", self._ichimoku.delayed_minimum_senkou_b.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class IchimokuKinkoHyoAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private IchimokuKinkoHyo _ichimoku;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ichimoku = new IchimokuKinkoHyo(9, 26, 17, 52, 26, 26);
            RegisterIndicator(_symbol, _ichimoku, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_ichimoku.IsReady)
            {
                // The current value of _ichimoku is represented by itself (_ichimoku)
                // or _ichimoku.Current.Value
                Plot("IchimokuKinkoHyo", "ichimoku", _ichimoku);
                // Plot all properties of ichimoku
                Plot("IchimokuKinkoHyo", "tenkan", _ichimoku.Tenkan);
                Plot("IchimokuKinkoHyo", "kijun", _ichimoku.Kijun);
                Plot("IchimokuKinkoHyo", "senkoua", _ichimoku.SenkouA);
                Plot("IchimokuKinkoHyo", "senkoub", _ichimoku.SenkouB);
                Plot("IchimokuKinkoHyo", "chikou", _ichimoku.Chikou);
                Plot("IchimokuKinkoHyo", "tenkanmaximum", _ichimoku.TenkanMaximum);
                Plot("IchimokuKinkoHyo", "tenkanminimum", _ichimoku.TenkanMinimum);
                Plot("IchimokuKinkoHyo", "kijunmaximum", _ichimoku.KijunMaximum);
                Plot("IchimokuKinkoHyo", "kijunminimum", _ichimoku.KijunMinimum);
                Plot("IchimokuKinkoHyo", "senkoubmaximum", _ichimoku.SenkouBMaximum);
                Plot("IchimokuKinkoHyo", "senkoubminimum", _ichimoku.SenkouBMinimum);
                Plot("IchimokuKinkoHyo", "delayedtenkansenkoua", _ichimoku.DelayedTenkanSenkouA);
                Plot("IchimokuKinkoHyo", "delayedkijunsenkoua", _ichimoku.DelayedKijunSenkouA);
                Plot("IchimokuKinkoHyo", "delayedmaximumsenkoub", _ichimoku.DelayedMaximumSenkouB);
                Plot("IchimokuKinkoHyo", "delayedminimumsenkoub", _ichimoku.DelayedMinimumSenkouB);
            }
        }
    }
    class IchimokuKinkoHyoAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ichimoku = IchimokuKinkoHyo(9, 26, 17, 52, 26, 26)
            self.register_indicator(self._symbol, self._ichimoku, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._ichimoku.is_ready:
                # The current value of self._ichimoku is represented by self._ichimoku.current.value
                self.plot("IchimokuKinkoHyo", "ichimoku", self._ichimoku.current.value)
                # Plot all attributes of self._ichimoku
                self.plot("IchimokuKinkoHyo", "tenkan", self._ichimoku.tenkan.current.value)
                self.plot("IchimokuKinkoHyo", "kijun", self._ichimoku.kijun.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_a", self._ichimoku.senkou_a.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_b", self._ichimoku.senkou_b.current.value)
                self.plot("IchimokuKinkoHyo", "chikou", self._ichimoku.chikou.current.value)
                self.plot("IchimokuKinkoHyo", "tenkan_maximum", self._ichimoku.tenkan_maximum.current.value)
                self.plot("IchimokuKinkoHyo", "tenkan_minimum", self._ichimoku.tenkan_minimum.current.value)
                self.plot("IchimokuKinkoHyo", "kijun_maximum", self._ichimoku.kijun_maximum.current.value)
                self.plot("IchimokuKinkoHyo", "kijun_minimum", self._ichimoku.kijun_minimum.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_b_maximum", self._ichimoku.senkou_b_maximum.current.value)
                self.plot("IchimokuKinkoHyo", "senkou_b_minimum", self._ichimoku.senkou_b_minimum.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_tenkan_senkou_a", self._ichimoku.delayed_tenkan_senkou_a.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_kijun_senkou_a", self._ichimoku.delayed_kijun_senkou_a.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_maximum_senkou_b", self._ichimoku.delayed_maximum_senkou_b.current.value)
                self.plot("IchimokuKinkoHyo", "delayed_minimum_senkou_b", self._ichimoku.delayed_minimum_senkou_b.current.value)
    

    The following reference table describes the IchimokuKinkoHyo constructor:

    IchimokuKinkoHyo

    class QuantConnect.Indicators.IchimokuKinkoHyo [source]

    This indicator computes the Ichimoku Kinko Hyo indicator. It consists of the following main indicators: Tenkan-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 9) Kijun-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 26) Senkou A Span: (Tenkan-sen + Kijun-sen )/ 2 from a specific number of periods ago (normally 26) Senkou B Span: (Highest High + Lowest Low) / 2 for the specific period (normally 52), from a specific number of periods ago (normally 26)

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property chikou

    The Chikou Span component of the Ichimoku indicator

    Returns:

    The Chikou Span component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property delayed_kijun_senkou_a

    The Delayed Kijun Senkou A component of the Ichimoku indicator

    Returns:

    The Delayed Kijun Senkou A component of the Ichimoku indicator

    Return type:

    WindowIndicator[IndicatorDataPoint]

    property delayed_maximum_senkou_b

    The Delayed Maximum Senkou B component of the Ichimoku indicator

    Returns:

    The Delayed Maximum Senkou B component of the Ichimoku indicator

    Return type:

    WindowIndicator[IndicatorDataPoint]

    property delayed_minimum_senkou_b

    The Delayed Minimum Senkou B component of the Ichimoku indicator

    Returns:

    The Delayed Minimum Senkou B component of the Ichimoku indicator

    Return type:

    WindowIndicator[IndicatorDataPoint]

    property delayed_tenkan_senkou_a

    The Delayed Tenkan Senkou A component of the Ichimoku indicator

    Returns:

    The Delayed Tenkan Senkou A component of the Ichimoku indicator

    Return type:

    WindowIndicator[IndicatorDataPoint]

    property is_ready

    Returns true if all of the sub-components of the Ichimoku indicator is ready

    Returns:

    Returns true if all of the sub-components of the Ichimoku indicator is ready

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property kijun

    The Kijun-sen component of the Ichimoku indicator

    Returns:

    The Kijun-sen component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property kijun_maximum

    The Kijun-sen Maximum component of the Ichimoku indicator

    Returns:

    The Kijun-sen Maximum component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property kijun_minimum

    The Kijun-sen Minimum component of the Ichimoku indicator

    Returns:

    The Kijun-sen Minimum component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property senkou_a

    The Senkou A Span component of the Ichimoku indicator

    Returns:

    The Senkou A Span component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property senkou_b

    The Senkou B Span component of the Ichimoku indicator

    Returns:

    The Senkou B Span component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property senkou_b_maximum

    The Senkou B Maximum component of the Ichimoku indicator

    Returns:

    The Senkou B Maximum component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property senkou_b_minimum

    The Senkou B Minimum component of the Ichimoku indicator

    Returns:

    The Senkou B Minimum component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property tenkan

    The Tenkan-sen component of the Ichimoku indicator

    Returns:

    The Tenkan-sen component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property tenkan_maximum

    The Tenkan-sen Maximum component of the Ichimoku indicator

    Returns:

    The Tenkan-sen Maximum component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property tenkan_minimum

    The Tenkan-sen Minimum component of the Ichimoku indicator

    Returns:

    The Tenkan-sen Minimum component of the Ichimoku indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    IchimokuKinkoHyo

    class QuantConnect.Indicators.IchimokuKinkoHyo [source]

    This indicator computes the Ichimoku Kinko Hyo indicator. It consists of the following main indicators: Tenkan-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 9) Kijun-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 26) Senkou A Span: (Tenkan-sen + Kijun-sen )/ 2 from a specific number of periods ago (normally 26) Senkou B Span: (Highest High + Lowest Low) / 2 for the specific period (normally 52), from a specific number of periods ago (normally 26)

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Chikou

    The Chikou Span component of the Ichimoku indicator

    Returns:

    The Chikou Span component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property DelayedKijunSenkouA

    The Delayed Kijun Senkou A component of the Ichimoku indicator

    Returns:

    The Delayed Kijun Senkou A component of the Ichimoku indicator

    Return type:

    WindowIndicator<IndicatorDataPoint>

    property DelayedMaximumSenkouB

    The Delayed Maximum Senkou B component of the Ichimoku indicator

    Returns:

    The Delayed Maximum Senkou B component of the Ichimoku indicator

    Return type:

    WindowIndicator<IndicatorDataPoint>

    property DelayedMinimumSenkouB

    The Delayed Minimum Senkou B component of the Ichimoku indicator

    Returns:

    The Delayed Minimum Senkou B component of the Ichimoku indicator

    Return type:

    WindowIndicator<IndicatorDataPoint>

    property DelayedTenkanSenkouA

    The Delayed Tenkan Senkou A component of the Ichimoku indicator

    Returns:

    The Delayed Tenkan Senkou A component of the Ichimoku indicator

    Return type:

    WindowIndicator<IndicatorDataPoint>

    property IsReady

    Returns true if all of the sub-components of the Ichimoku indicator is ready

    Returns:

    Returns true if all of the sub-components of the Ichimoku indicator is ready

    Return type:

    bool

    property Kijun

    The Kijun-sen component of the Ichimoku indicator

    Returns:

    The Kijun-sen component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property KijunMaximum

    The Kijun-sen Maximum component of the Ichimoku indicator

    Returns:

    The Kijun-sen Maximum component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property KijunMinimum

    The Kijun-sen Minimum component of the Ichimoku indicator

    Returns:

    The Kijun-sen Minimum component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property SenkouA

    The Senkou A Span component of the Ichimoku indicator

    Returns:

    The Senkou A Span component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property SenkouB

    The Senkou B Span component of the Ichimoku indicator

    Returns:

    The Senkou B Span component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property SenkouBMaximum

    The Senkou B Maximum component of the Ichimoku indicator

    Returns:

    The Senkou B Maximum component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property SenkouBMinimum

    The Senkou B Minimum component of the Ichimoku indicator

    Returns:

    The Senkou B Minimum component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Tenkan

    The Tenkan-sen component of the Ichimoku indicator

    Returns:

    The Tenkan-sen component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property TenkanMaximum

    The Tenkan-sen Maximum component of the Ichimoku indicator

    Returns:

    The Tenkan-sen Maximum component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property TenkanMinimum

    The Tenkan-sen Minimum component of the Ichimoku indicator

    Returns:

    The Tenkan-sen Minimum component of the Ichimoku indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of IchimokuKinkoHyo using the plotly library.

    IchimokuKinkoHyo line plot.

     

    Supported Indicators

    Identity

    Introduction

    This indicator represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using Identity Indicator

    To create an automatic indicators for Identity , call the Identity helper method from the QCAlgorithm class. The Identity method creates a Identity object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class IdentityAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Identity _identity;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _identity = Identity(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_identity.IsReady)
            {
                // The current value of _identity is represented by itself (_identity)
                // or _identity.Current.Value
                Plot("Identity", "identity", _identity);
                
            }
        }
    }
    class IdentityAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._identity = self.identity(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._identity.is_ready:
                # The current value of self._identity is represented by self._identity.current.value
                self.plot("Identity", "identity", self._identity.current.value)
                
    

    The following reference table describes the Identity method:

    identity( symbol, resolution, selector=None, field_name=None ) [source]

    Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new Identity indicator for the specified symbol and selector

    Return type:

    Identity

    Identity( symbol, resolution, selector=None, fieldName=None ) [source]

    Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new Identity indicator for the specified symbol and selector

    Return type:

    Identity

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Identity indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class IdentityAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Identity _identity;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _identity = new Identity("SPY");
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _identity.Update(bar.EndTime, bar.Close);
            }
       
            if (_identity.IsReady)
            {
                // The current value of _identity is represented by itself (_identity)
                // or _identity.Current.Value
                Plot("Identity", "identity", _identity);
                
            }
        }
    }
    class IdentityAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._identity = Identity("SPY")
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._identity.update(bar.EndTime, bar.Close)
            if self._identity.is_ready:
                # The current value of self._identity is represented by self._identity.current.value
                self.plot("Identity", "identity", self._identity.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class IdentityAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Identity _identity;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _identity = new Identity("SPY");
            RegisterIndicator(_symbol, _identity, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_identity.IsReady)
            {
                // The current value of _identity is represented by itself (_identity)
                // or _identity.Current.Value
                Plot("Identity", "identity", _identity);
                
            }
        }
    }
    class IdentityAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._identity = Identity("SPY")
            self.register_indicator(self._symbol, self._identity, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._identity.is_ready:
                # The current value of self._identity is represented by self._identity.current.value
                self.plot("Identity", "identity", self._identity.current.value)
                
    

    The following reference table describes the Identity constructor:

    Identity

    class QuantConnect.Indicators.Identity [source]

    Represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Identity

    class QuantConnect.Indicators.Identity [source]

    Represents an indicator that is a ready after ingesting a single sample and always returns the same value as it is given.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Identity using the plotly library.

    Identity line plot.

     

    Supported Indicators

    Implied Volatility

    Introduction

    Implied Volatility indicator that calculate the IV of an option using Black-Scholes Model

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using IV Indicator

    To create an automatic indicators for ImpliedVolatility , call the IV helper method from the QCAlgorithm class. The IV method creates a ImpliedVolatility object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ImpliedVolatilityAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private ImpliedVolatility _iv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _iv = IV(_option, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (_iv.IsReady)
            {
                // The current value of _iv is represented by itself (_iv)
                // or _iv.Current.Value
                Plot("ImpliedVolatility", "iv", _iv);
                // Plot all properties of iv
                Plot("ImpliedVolatility", "historicalvolatility", _iv.HistoricalVolatility);
                Plot("ImpliedVolatility", "riskfreerate", _iv.RiskFreeRate);
                Plot("ImpliedVolatility", "dividendyield", _iv.DividendYield);
                Plot("ImpliedVolatility", "price", _iv.Price);
                Plot("ImpliedVolatility", "oppositeprice", _iv.OppositePrice);
                Plot("ImpliedVolatility", "underlyingprice", _iv.UnderlyingPrice);
            }
        }
    }
    class ImpliedVolatilityAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._iv = self.iv(self.option, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            if self._iv.is_ready:
                # The current value of self._iv is represented by self._iv.current.value
                self.plot("ImpliedVolatility", "iv", self._iv.current.value)
                # Plot all attributes of self._iv
                self.plot("ImpliedVolatility", "historical_volatility", self._iv.historical_volatility.current.value)
                self.plot("ImpliedVolatility", "risk_free_rate", self._iv.risk_free_rate.current.value)
                self.plot("ImpliedVolatility", "dividend_yield", self._iv.dividend_yield.current.value)
                self.plot("ImpliedVolatility", "price", self._iv.price.current.value)
                self.plot("ImpliedVolatility", "opposite_price", self._iv.opposite_price.current.value)
                self.plot("ImpliedVolatility", "underlying_price", self._iv.underlying_price.current.value)
    

    The following reference table describes the IV method:

    iv( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, period=252, resolution=None ) [source]

    Creates a new ImpliedVolatility indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new ImpliedVolatility indicator for the specified symbol

    Return type:

    ImpliedVolatility

    IV( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, period=252, resolution=None ) [source]

    Creates a new ImpliedVolatility indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new ImpliedVolatility indicator for the specified symbol

    Return type:

    ImpliedVolatility

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ImpliedVolatility indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class ImpliedVolatilityAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private ImpliedVolatility _iv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _iv = new ImpliedVolatility(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _iv.Update(new IndicatorDataPoint(_symbol, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_option, out bar))
            {      
                _iv.Update(new IndicatorDataPoint(_option, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_mirrorOption, out bar))
            {      
                _iv.Update(new IndicatorDataPoint(_mirrorOption, bar.EndTime, bar.Close));
            }
       
            if (_iv.IsReady)
            {
                // The current value of _iv is represented by itself (_iv)
                // or _iv.Current.Value
                Plot("ImpliedVolatility", "iv", _iv);
                // Plot all properties of iv
                Plot("ImpliedVolatility", "historicalvolatility", _iv.HistoricalVolatility);
                Plot("ImpliedVolatility", "riskfreerate", _iv.RiskFreeRate);
                Plot("ImpliedVolatility", "dividendyield", _iv.DividendYield);
                Plot("ImpliedVolatility", "price", _iv.Price);
                Plot("ImpliedVolatility", "oppositeprice", _iv.OppositePrice);
                Plot("ImpliedVolatility", "underlyingprice", _iv.UnderlyingPrice);
            }
        }
    }
    class ImpliedVolatilityAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._iv = ImpliedVolatility(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._iv.update(IndicatorDataPoint(self._symbol, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.option)
            if bar:
                self._iv.update(IndicatorDataPoint(self.option, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.mirror_option)
            if bar:
                self._iv.update(IndicatorDataPoint(self.mirror_option, bar.end_time, bar.close))
            if self._iv.is_ready:
                # The current value of self._iv is represented by self._iv.current.value
                self.plot("ImpliedVolatility", "iv", self._iv.current.value)
                # Plot all attributes of self._iv
                self.plot("ImpliedVolatility", "historical_volatility", self._iv.historical_volatility.current.value)
                self.plot("ImpliedVolatility", "risk_free_rate", self._iv.risk_free_rate.current.value)
                self.plot("ImpliedVolatility", "dividend_yield", self._iv.dividend_yield.current.value)
                self.plot("ImpliedVolatility", "price", self._iv.price.current.value)
                self.plot("ImpliedVolatility", "opposite_price", self._iv.opposite_price.current.value)
                self.plot("ImpliedVolatility", "underlying_price", self._iv.underlying_price.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ImpliedVolatilityAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private ImpliedVolatility _iv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _iv = new ImpliedVolatility(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
            RegisterIndicator(_symbol, _iv, Resolution.Daily);
            RegisterIndicator(_option, _iv, Resolution.Daily);
            RegisterIndicator(_mirrorOption, _iv, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_iv.IsReady)
            {
                // The current value of _iv is represented by itself (_iv)
                // or _iv.Current.Value
                Plot("ImpliedVolatility", "iv", _iv);
                // Plot all properties of iv
                Plot("ImpliedVolatility", "historicalvolatility", _iv.HistoricalVolatility);
                Plot("ImpliedVolatility", "riskfreerate", _iv.RiskFreeRate);
                Plot("ImpliedVolatility", "dividendyield", _iv.DividendYield);
                Plot("ImpliedVolatility", "price", _iv.Price);
                Plot("ImpliedVolatility", "oppositeprice", _iv.OppositePrice);
                Plot("ImpliedVolatility", "underlyingprice", _iv.UnderlyingPrice);
            }
        }
    }
    class ImpliedVolatilityAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._iv = ImpliedVolatility(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
            self.register_indicator(self._symbol, self._iv, Resolution.DAILY)
            self.register_indicator(self.option, self._iv, Resolution.DAILY)
            self.register_indicator(self.mirror_option, self._iv, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._iv.is_ready:
                # The current value of self._iv is represented by self._iv.current.value
                self.plot("ImpliedVolatility", "iv", self._iv.current.value)
                # Plot all attributes of self._iv
                self.plot("ImpliedVolatility", "historical_volatility", self._iv.historical_volatility.current.value)
                self.plot("ImpliedVolatility", "risk_free_rate", self._iv.risk_free_rate.current.value)
                self.plot("ImpliedVolatility", "dividend_yield", self._iv.dividend_yield.current.value)
                self.plot("ImpliedVolatility", "price", self._iv.price.current.value)
                self.plot("ImpliedVolatility", "opposite_price", self._iv.opposite_price.current.value)
                self.plot("ImpliedVolatility", "underlying_price", self._iv.underlying_price.current.value)
    

    The following reference table describes the ImpliedVolatility constructor:

    ImpliedVolatility

    class QuantConnect.Indicators.ImpliedVolatility [source]

    Implied Volatility indicator that calculate the IV of an option using Black-Scholes Model

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and all sub-indicators

    set_smoothing_function( function )

    Set the smoothing function of IV, using both call and put IV value

    Parameters:
    • function ( PyObject | Callable[float, float, float] )
    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property dividend_yield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    datetime

    property historical_volatility

    Gets the historical volatility of the underlying

    Returns:

    Gets the historical volatility of the underlying

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property opposite_price

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property risk_free_rate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    float

    property style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property underlying_price

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property use_mirror_contract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ImpliedVolatility

    class QuantConnect.Indicators.ImpliedVolatility [source]

    Implied Volatility indicator that calculate the IV of an option using Black-Scholes Model

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and all sub-indicators

    SetSmoothingFunction( function )

    Set the smoothing function of IV, using both call and put IV value

    Parameters:
    • function ( Func[Decimal, Decimal, Decimal] | PyObject )
    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property DividendYield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property Expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    DateTime

    property HistoricalVolatility

    Gets the historical volatility of the underlying

    Returns:

    Gets the historical volatility of the underlying

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property OppositePrice

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property RiskFreeRate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    decimal

    property Style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property UnderlyingPrice

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property UseMirrorContract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of ImpliedVolatility using the plotly library.

    ImpliedVolatility line plot.

     

    Supported Indicators

    Intraday Vwap

    Introduction

    Defines the canonical intraday VWAP indicator

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using VWAP Indicator

    To create an automatic indicators for IntradayVwap , call the VWAP helper method from the QCAlgorithm class. The VWAP method creates a IntradayVwap object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class IntradayVwapAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private IntradayVwap _vwap;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _vwap = VWAP(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_vwap.IsReady)
            {
                // The current value of _vwap is represented by itself (_vwap)
                // or _vwap.Current.Value
                Plot("IntradayVwap", "vwap", _vwap);
                
            }
        }
    }
    class IntradayVwapAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._vwap = self.vwap(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._vwap.is_ready:
                # The current value of self._vwap is represented by self._vwap.current.value
                self.plot("IntradayVwap", "vwap", self._vwap.current.value)
                
    

    The following reference table describes the VWAP method:

    vwap( symbol ) [source]

    Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The IntradayVWAP for the specified symbol

    Return type:

    IntradayVwap

    vwap( symbol, period, resolution=None, selector=None ) [source]

    Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The VolumeWeightedAveragePrice for the given parameters

    Return type:

    VolumeWeightedAveragePriceIndicator

    VWAP( symbol ) [source]

    Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The IntradayVWAP for the specified symbol

    Return type:

    IntradayVwap

    VWAP( symbol, period, resolution=None, selector=None ) [source]

    Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The VolumeWeightedAveragePrice for the given parameters

    Return type:

    VolumeWeightedAveragePriceIndicator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a IntradayVwap indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class IntradayVwapAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private IntradayVwap _vwap;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _vwap = new IntradayVwap("SPY");
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _vwap.Update(bar.EndTime, bar.Close);
            }
       
            if (_vwap.IsReady)
            {
                // The current value of _vwap is represented by itself (_vwap)
                // or _vwap.Current.Value
                Plot("IntradayVwap", "vwap", _vwap);
                
            }
        }
    }
    class IntradayVwapAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._vwap = IntradayVwap("SPY")
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._vwap.update(bar.EndTime, bar.Close)
            if self._vwap.is_ready:
                # The current value of self._vwap is represented by self._vwap.current.value
                self.plot("IntradayVwap", "vwap", self._vwap.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class IntradayVwapAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private IntradayVwap _vwap;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _vwap = new IntradayVwap("SPY");
            RegisterIndicator(_symbol, _vwap, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_vwap.IsReady)
            {
                // The current value of _vwap is represented by itself (_vwap)
                // or _vwap.Current.Value
                Plot("IntradayVwap", "vwap", _vwap);
                
            }
        }
    }
    class IntradayVwapAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._vwap = IntradayVwap("SPY")
            self.register_indicator(self._symbol, self._vwap, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._vwap.is_ready:
                # The current value of self._vwap is represented by self._vwap.current.value
                self.plot("IntradayVwap", "vwap", self._vwap.current.value)
                
    

    The following reference table describes the IntradayVwap constructor:

    IntradayVwap

    class QuantConnect.Indicators.IntradayVwap [source]

    Defines the canonical intraday VWAP indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    IntradayVwap

    class QuantConnect.Indicators.IntradayVwap [source]

    Defines the canonical intraday VWAP indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of IntradayVwap using the plotly library.

    IntradayVwap line plot.

     

    Supported Indicators

    Kaufman Adaptive Moving Average

    Introduction

    This indicator computes the Kaufman Adaptive Moving Average (KAMA). The Kaufman Adaptive Moving Average is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:kaufman_s_adaptive_moving_average

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using KAMA Indicator

    To create an automatic indicators for KaufmanAdaptiveMovingAverage , call the KAMA helper method from the QCAlgorithm class. The KAMA method creates a KaufmanAdaptiveMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class KaufmanAdaptiveMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KaufmanAdaptiveMovingAverage _kama;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kama = KAMA(_symbol, 20, 10, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_kama.IsReady)
            {
                // The current value of _kama is represented by itself (_kama)
                // or _kama.Current.Value
                Plot("KaufmanAdaptiveMovingAverage", "kama", _kama);
                
            }
        }
    }
    class KaufmanAdaptiveMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kama = self.kama(self._symbol, 20, 10, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._kama.is_ready:
                # The current value of self._kama is represented by self._kama.current.value
                self.plot("KaufmanAdaptiveMovingAverage", "kama", self._kama.current.value)
                
    

    The following reference table describes the KAMA method:

    kama( symbol, period, fast_ema_period, slow_ema_period, resolution=None, selector=None ) [source]

    Creates a new KaufmanAdaptiveMovingAverage indicator.

    Parameters:
    Returns:

    The KaufmanAdaptiveMovingAverage indicator for the requested symbol over the specified period

    Return type:

    KaufmanAdaptiveMovingAverage

    KAMA( symbol, period, fastEmaPeriod, slowEmaPeriod, resolution=None, selector=None ) [source]

    Creates a new KaufmanAdaptiveMovingAverage indicator.

    Parameters:
    Returns:

    The KaufmanAdaptiveMovingAverage indicator for the requested symbol over the specified period

    Return type:

    KaufmanAdaptiveMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a KaufmanAdaptiveMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class KaufmanAdaptiveMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KaufmanAdaptiveMovingAverage _kama;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kama = new KaufmanAdaptiveMovingAverage(20, 10, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _kama.Update(bar.EndTime, bar.Close);
            }
       
            if (_kama.IsReady)
            {
                // The current value of _kama is represented by itself (_kama)
                // or _kama.Current.Value
                Plot("KaufmanAdaptiveMovingAverage", "kama", _kama);
                
            }
        }
    }
    class KaufmanAdaptiveMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kama = KaufmanAdaptiveMovingAverage(20, 10, 20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._kama.update(bar.EndTime, bar.Close)
            if self._kama.is_ready:
                # The current value of self._kama is represented by self._kama.current.value
                self.plot("KaufmanAdaptiveMovingAverage", "kama", self._kama.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class KaufmanAdaptiveMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KaufmanAdaptiveMovingAverage _kama;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kama = new KaufmanAdaptiveMovingAverage(20, 10, 20);
            RegisterIndicator(_symbol, _kama, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_kama.IsReady)
            {
                // The current value of _kama is represented by itself (_kama)
                // or _kama.Current.Value
                Plot("KaufmanAdaptiveMovingAverage", "kama", _kama);
                
            }
        }
    }
    class KaufmanAdaptiveMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kama = KaufmanAdaptiveMovingAverage(20, 10, 20)
            self.register_indicator(self._symbol, self._kama, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._kama.is_ready:
                # The current value of self._kama is represented by self._kama.current.value
                self.plot("KaufmanAdaptiveMovingAverage", "kama", self._kama.current.value)
                
    

    The following reference table describes the KaufmanAdaptiveMovingAverage constructor:

    KaufmanAdaptiveMovingAverage

    class QuantConnect.Indicators.KaufmanAdaptiveMovingAverage [source]

    This indicator computes the Kaufman Adaptive Moving Average (KAMA). The Kaufman Adaptive Moving Average is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:kaufman_s_adaptive_moving_average

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    KaufmanAdaptiveMovingAverage

    class QuantConnect.Indicators.KaufmanAdaptiveMovingAverage [source]

    This indicator computes the Kaufman Adaptive Moving Average (KAMA). The Kaufman Adaptive Moving Average is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:kaufman_s_adaptive_moving_average

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of KaufmanAdaptiveMovingAverage using the plotly library.

    KaufmanAdaptiveMovingAverage line plot.

     

    Supported Indicators

    Kaufman Efficiency Ratio

    Introduction

    This indicator computes the Kaufman Efficiency Ratio (KER). The Kaufman Efficiency Ratio is calculated as explained here: https://www.marketvolume.com/technicalanalysis/efficiencyratio.asp

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using KER Indicator

    To create an automatic indicators for KaufmanEfficiencyRatio , call the KER helper method from the QCAlgorithm class. The KER method creates a KaufmanEfficiencyRatio object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class KaufmanEfficiencyRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KaufmanEfficiencyRatio _ker;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ker = KER(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_ker.IsReady)
            {
                // The current value of _ker is represented by itself (_ker)
                // or _ker.Current.Value
                Plot("KaufmanEfficiencyRatio", "ker", _ker);
                
            }
        }
    }
    class KaufmanEfficiencyRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ker = self.ker(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._ker.is_ready:
                # The current value of self._ker is represented by self._ker.current.value
                self.plot("KaufmanEfficiencyRatio", "ker", self._ker.current.value)
                
    

    The following reference table describes the KER method:

    ker( symbol, period=2, resolution=None, selector=None ) [source]

    Creates an KaufmanEfficiencyRatio indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The KaufmanEfficiencyRatio indicator for the given parameters

    Return type:

    KaufmanEfficiencyRatio

    KER( symbol, period=2, resolution=None, selector=None ) [source]

    Creates an KaufmanEfficiencyRatio indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The KaufmanEfficiencyRatio indicator for the given parameters

    Return type:

    KaufmanEfficiencyRatio

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a KaufmanEfficiencyRatio indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class KaufmanEfficiencyRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KaufmanEfficiencyRatio _ker;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ker = new KaufmanEfficiencyRatio(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _ker.Update(bar.EndTime, bar.Close);
            }
       
            if (_ker.IsReady)
            {
                // The current value of _ker is represented by itself (_ker)
                // or _ker.Current.Value
                Plot("KaufmanEfficiencyRatio", "ker", _ker);
                
            }
        }
    }
    class KaufmanEfficiencyRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ker = KaufmanEfficiencyRatio(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._ker.update(bar.EndTime, bar.Close)
            if self._ker.is_ready:
                # The current value of self._ker is represented by self._ker.current.value
                self.plot("KaufmanEfficiencyRatio", "ker", self._ker.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class KaufmanEfficiencyRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KaufmanEfficiencyRatio _ker;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ker = new KaufmanEfficiencyRatio(20);
            RegisterIndicator(_symbol, _ker, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_ker.IsReady)
            {
                // The current value of _ker is represented by itself (_ker)
                // or _ker.Current.Value
                Plot("KaufmanEfficiencyRatio", "ker", _ker);
                
            }
        }
    }
    class KaufmanEfficiencyRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ker = KaufmanEfficiencyRatio(20)
            self.register_indicator(self._symbol, self._ker, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._ker.is_ready:
                # The current value of self._ker is represented by self._ker.current.value
                self.plot("KaufmanEfficiencyRatio", "ker", self._ker.current.value)
                
    

    The following reference table describes the KaufmanEfficiencyRatio constructor:

    KaufmanEfficiencyRatio

    class QuantConnect.Indicators.KaufmanEfficiencyRatio [source]

    This indicator computes the Kaufman Efficiency Ratio (KER). The Kaufman Efficiency Ratio is calculated as explained here: https://www.marketvolume.com/technicalanalysis/efficiencyratio.asp

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    KaufmanEfficiencyRatio

    class QuantConnect.Indicators.KaufmanEfficiencyRatio [source]

    This indicator computes the Kaufman Efficiency Ratio (KER). The Kaufman Efficiency Ratio is calculated as explained here: https://www.marketvolume.com/technicalanalysis/efficiencyratio.asp

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of KaufmanEfficiencyRatio using the plotly library.

    KaufmanEfficiencyRatio line plot.

     

    Supported Indicators

    Keltner Channels

    Introduction

    This indicator creates a moving average (middle band) with an upper band and lower band fixed at k average True range multiples away from the middle band.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using KCH Indicator

    To create an automatic indicators for KeltnerChannels , call the KCH helper method from the QCAlgorithm class. The KCH method creates a KeltnerChannels object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class KeltnerChannelsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KeltnerChannels _kch;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kch = KCH(_symbol, 20, 2, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (_kch.IsReady)
            {
                // The current value of _kch is represented by itself (_kch)
                // or _kch.Current.Value
                Plot("KeltnerChannels", "kch", _kch);
                // Plot all properties of kch
                Plot("KeltnerChannels", "middleband", _kch.MiddleBand);
                Plot("KeltnerChannels", "upperband", _kch.UpperBand);
                Plot("KeltnerChannels", "lowerband", _kch.LowerBand);
                Plot("KeltnerChannels", "averagetruerange", _kch.AverageTrueRange);
            }
        }
    }
    class KeltnerChannelsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kch = self.kch(self._symbol, 20, 2, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            if self._kch.is_ready:
                # The current value of self._kch is represented by self._kch.current.value
                self.plot("KeltnerChannels", "kch", self._kch.current.value)
                # Plot all attributes of self._kch
                self.plot("KeltnerChannels", "middle_band", self._kch.middle_band.current.value)
                self.plot("KeltnerChannels", "upper_band", self._kch.upper_band.current.value)
                self.plot("KeltnerChannels", "lower_band", self._kch.lower_band.current.value)
                self.plot("KeltnerChannels", "average_true_range", self._kch.average_True_range.current.value)
    

    The following reference table describes the KCH method:

    kch( symbol, period, k, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new Keltner Channels indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Keltner Channel indicator for the requested symbol.

    Return type:

    KeltnerChannels

    KCH( symbol, period, k, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new Keltner Channels indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Keltner Channel indicator for the requested symbol.

    Return type:

    KeltnerChannels

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a KeltnerChannels indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class KeltnerChannelsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KeltnerChannels _kch;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kch = new KeltnerChannels(20, 2, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _kch.Update(bar);
            }
       
            if (_kch.IsReady)
            {
                // The current value of _kch is represented by itself (_kch)
                // or _kch.Current.Value
                Plot("KeltnerChannels", "kch", _kch);
                // Plot all properties of kch
                Plot("KeltnerChannels", "middleband", _kch.MiddleBand);
                Plot("KeltnerChannels", "upperband", _kch.UpperBand);
                Plot("KeltnerChannels", "lowerband", _kch.LowerBand);
                Plot("KeltnerChannels", "averagetruerange", _kch.AverageTrueRange);
            }
        }
    }
    class KeltnerChannelsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kch = KeltnerChannels(20, 2, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._kch.update(bar)
            if self._kch.is_ready:
                # The current value of self._kch is represented by self._kch.current.value
                self.plot("KeltnerChannels", "kch", self._kch.current.value)
                # Plot all attributes of self._kch
                self.plot("KeltnerChannels", "middle_band", self._kch.middle_band.current.value)
                self.plot("KeltnerChannels", "upper_band", self._kch.upper_band.current.value)
                self.plot("KeltnerChannels", "lower_band", self._kch.lower_band.current.value)
                self.plot("KeltnerChannels", "average_true_range", self._kch.average_True_range.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class KeltnerChannelsAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private KeltnerChannels _kch;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _kch = new KeltnerChannels(20, 2, MovingAverageType.Simple);
            RegisterIndicator(_symbol, _kch, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_kch.IsReady)
            {
                // The current value of _kch is represented by itself (_kch)
                // or _kch.Current.Value
                Plot("KeltnerChannels", "kch", _kch);
                // Plot all properties of kch
                Plot("KeltnerChannels", "middleband", _kch.MiddleBand);
                Plot("KeltnerChannels", "upperband", _kch.UpperBand);
                Plot("KeltnerChannels", "lowerband", _kch.LowerBand);
                Plot("KeltnerChannels", "averagetruerange", _kch.AverageTrueRange);
            }
        }
    }
    class KeltnerChannelsAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._kch = KeltnerChannels(20, 2, MovingAverageType.Simple)
            self.register_indicator(self._symbol, self._kch, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._kch.is_ready:
                # The current value of self._kch is represented by self._kch.current.value
                self.plot("KeltnerChannels", "kch", self._kch.current.value)
                # Plot all attributes of self._kch
                self.plot("KeltnerChannels", "middle_band", self._kch.middle_band.current.value)
                self.plot("KeltnerChannels", "upper_band", self._kch.upper_band.current.value)
                self.plot("KeltnerChannels", "lower_band", self._kch.lower_band.current.value)
                self.plot("KeltnerChannels", "average_true_range", self._kch.average_True_range.current.value)
    

    The following reference table describes the KeltnerChannels constructor:

    KeltnerChannels

    class QuantConnect.Indicators.KeltnerChannels [source]

    This indicator creates a moving average (middle band) with an upper band and lower band fixed at k average true range multiples away from the middle band.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property average_true_range

    Gets the average true range

    Returns:

    Gets the average true range

    Return type:

    IndicatorBase[IBaseDataBar]

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property lower_band

    Gets the lower band of the channel

    Returns:

    Gets the lower band of the channel

    Return type:

    IndicatorBase[IBaseDataBar]

    property middle_band

    Gets the middle band of the channel

    Returns:

    Gets the middle band of the channel

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property upper_band

    Gets the upper band of the channel

    Returns:

    Gets the upper band of the channel

    Return type:

    IndicatorBase[IBaseDataBar]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    KeltnerChannels

    class QuantConnect.Indicators.KeltnerChannels [source]

    This indicator creates a moving average (middle band) with an upper band and lower band fixed at k average true range multiples away from the middle band.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property AverageTrueRange

    Gets the average true range

    Returns:

    Gets the average true range

    Return type:

    IndicatorBase<IBaseDataBar>

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property LowerBand

    Gets the lower band of the channel

    Returns:

    Gets the lower band of the channel

    Return type:

    IndicatorBase<IBaseDataBar>

    property MiddleBand

    Gets the middle band of the channel

    Returns:

    Gets the middle band of the channel

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property UpperBand

    Gets the upper band of the channel

    Returns:

    Gets the upper band of the channel

    Return type:

    IndicatorBase<IBaseDataBar>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of KeltnerChannels using the plotly library.

    KeltnerChannels line plot.

     

    Supported Indicators

    Least Squares Moving Average

    Introduction

    The Least Squares Moving Average (LSMA) first calculates a least squares regression line over the preceding time periods, and then projects it forward to the current period. In essence, it calculates what the value would be if the regression line continued. source

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using LSMA Indicator

    To create an automatic indicators for LeastSquaresMovingAverage , call the LSMA helper method from the QCAlgorithm class. The LSMA method creates a LeastSquaresMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class LeastSquaresMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LeastSquaresMovingAverage _lsma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _lsma = LSMA(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_lsma.IsReady)
            {
                // The current value of _lsma is represented by itself (_lsma)
                // or _lsma.Current.Value
                Plot("LeastSquaresMovingAverage", "lsma", _lsma);
                // Plot all properties of lsma
                Plot("LeastSquaresMovingAverage", "intercept", _lsma.Intercept);
                Plot("LeastSquaresMovingAverage", "slope", _lsma.Slope);
            }
        }
    }
    class LeastSquaresMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._lsma = self.lsma(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._lsma.is_ready:
                # The current value of self._lsma is represented by self._lsma.current.value
                self.plot("LeastSquaresMovingAverage", "lsma", self._lsma.current.value)
                # Plot all attributes of self._lsma
                self.plot("LeastSquaresMovingAverage", "intercept", self._lsma.intercept.current.value)
                self.plot("LeastSquaresMovingAverage", "slope", self._lsma.slope.current.value)
    

    The following reference table describes the LSMA method:

    lsma( symbol, period, resolution=None, selector=None ) [source]

    Creates and registers a new Least Squares Moving Average instance.

    Parameters:
    Returns:

    A LeastSquaredMovingAverage configured with the specified period

    Return type:

    LeastSquaresMovingAverage

    LSMA( symbol, period, resolution=None, selector=None ) [source]

    Creates and registers a new Least Squares Moving Average instance.

    Parameters:
    Returns:

    A LeastSquaredMovingAverage configured with the specified period

    Return type:

    LeastSquaresMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a LeastSquaresMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class LeastSquaresMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LeastSquaresMovingAverage _lsma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _lsma = new LeastSquaresMovingAverage(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _lsma.Update(bar.EndTime, bar.Close);
            }
       
            if (_lsma.IsReady)
            {
                // The current value of _lsma is represented by itself (_lsma)
                // or _lsma.Current.Value
                Plot("LeastSquaresMovingAverage", "lsma", _lsma);
                // Plot all properties of lsma
                Plot("LeastSquaresMovingAverage", "intercept", _lsma.Intercept);
                Plot("LeastSquaresMovingAverage", "slope", _lsma.Slope);
            }
        }
    }
    class LeastSquaresMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._lsma = LeastSquaresMovingAverage(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._lsma.update(bar.EndTime, bar.Close)
            if self._lsma.is_ready:
                # The current value of self._lsma is represented by self._lsma.current.value
                self.plot("LeastSquaresMovingAverage", "lsma", self._lsma.current.value)
                # Plot all attributes of self._lsma
                self.plot("LeastSquaresMovingAverage", "intercept", self._lsma.intercept.current.value)
                self.plot("LeastSquaresMovingAverage", "slope", self._lsma.slope.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class LeastSquaresMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LeastSquaresMovingAverage _lsma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _lsma = new LeastSquaresMovingAverage(20);
            RegisterIndicator(_symbol, _lsma, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_lsma.IsReady)
            {
                // The current value of _lsma is represented by itself (_lsma)
                // or _lsma.Current.Value
                Plot("LeastSquaresMovingAverage", "lsma", _lsma);
                // Plot all properties of lsma
                Plot("LeastSquaresMovingAverage", "intercept", _lsma.Intercept);
                Plot("LeastSquaresMovingAverage", "slope", _lsma.Slope);
            }
        }
    }
    class LeastSquaresMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._lsma = LeastSquaresMovingAverage(20)
            self.register_indicator(self._symbol, self._lsma, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._lsma.is_ready:
                # The current value of self._lsma is represented by self._lsma.current.value
                self.plot("LeastSquaresMovingAverage", "lsma", self._lsma.current.value)
                # Plot all attributes of self._lsma
                self.plot("LeastSquaresMovingAverage", "intercept", self._lsma.intercept.current.value)
                self.plot("LeastSquaresMovingAverage", "slope", self._lsma.slope.current.value)
    

    The following reference table describes the LeastSquaresMovingAverage constructor:

    LeastSquaresMovingAverage

    class QuantConnect.Indicators.LeastSquaresMovingAverage [source]

    The Least Squares Moving Average (LSMA) first calculates a least squares regression line over the preceding time periods, and then projects it forward to the current period. In essence, it calculates what the value would be if the regression line continued. Source: https://rtmath.net/assets/docs/finanalysis/html/b3fab79c-f4b2-40fb-8709-fdba43cdb363.htm

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and all sub-indicators (Intercept, Slope)

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property intercept

    The point where the regression line crosses the y-axis (price-axis)

    Returns:

    The point where the regression line crosses the y-axis (price-axis)

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property slope

    The regression line slope

    Returns:

    The regression line slope

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LeastSquaresMovingAverage

    class QuantConnect.Indicators.LeastSquaresMovingAverage [source]

    The Least Squares Moving Average (LSMA) first calculates a least squares regression line over the preceding time periods, and then projects it forward to the current period. In essence, it calculates what the value would be if the regression line continued. Source: https://rtmath.net/assets/docs/finanalysis/html/b3fab79c-f4b2-40fb-8709-fdba43cdb363.htm

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and all sub-indicators (Intercept, Slope)

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Intercept

    The point where the regression line crosses the y-axis (price-axis)

    Returns:

    The point where the regression line crosses the y-axis (price-axis)

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Slope

    The regression line slope

    Returns:

    The regression line slope

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of LeastSquaresMovingAverage using the plotly library.

    LeastSquaresMovingAverage line plot.

     

    Supported Indicators

    Linear Weighted Moving Average

    Introduction

    This indicator represents the traditional Weighted Moving Average indicator. The weight are linearly distributed according to the number of periods in the indicator. For example, a 4 period indicator will have a numerator of (4 * window[0]) + (3 * window[1]) + (2 * window[2]) + window[3] and a denominator of 4 + 3 + 2 + 1 = 10 During the warm up period, IsReady will return False, but the LWMA will still be computed correctly because the denominator will be the minimum of Samples factorial or Size factorial and the computation iterates over that minimum value. The RollingWindow of inputs is created when the indicator is created. A RollingWindow of LWMAs is not saved. That is up to the caller.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using LWMA Indicator

    To create an automatic indicators for LinearWeightedMovingAverage , call the LWMA helper method from the QCAlgorithm class. The LWMA method creates a LinearWeightedMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class LinearWeightedMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LinearWeightedMovingAverage _lwma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _lwma = LWMA(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_lwma.IsReady)
            {
                // The current value of _lwma is represented by itself (_lwma)
                // or _lwma.Current.Value
                Plot("LinearWeightedMovingAverage", "lwma", _lwma);
                
            }
        }
    }
    class LinearWeightedMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._lwma = self.lwma(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._lwma.is_ready:
                # The current value of self._lwma is represented by self._lwma.current.value
                self.plot("LinearWeightedMovingAverage", "lwma", self._lwma.current.value)
                
    

    The following reference table describes the LWMA method:

    lwma( symbol, period, resolution=None, selector=None ) [source]

    Creates a new LinearWeightedMovingAverage indicator. This indicator will linearly distribute the weights across the periods.

    Parameters:
    Return type:

    LinearWeightedMovingAverage

    LWMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new LinearWeightedMovingAverage indicator. This indicator will linearly distribute the weights across the periods.

    Parameters:
    Return type:

    LinearWeightedMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a LinearWeightedMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class LinearWeightedMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LinearWeightedMovingAverage _lwma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _lwma = new LinearWeightedMovingAverage(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _lwma.Update(bar.EndTime, bar.Close);
            }
       
            if (_lwma.IsReady)
            {
                // The current value of _lwma is represented by itself (_lwma)
                // or _lwma.Current.Value
                Plot("LinearWeightedMovingAverage", "lwma", _lwma);
                
            }
        }
    }
    class LinearWeightedMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._lwma = LinearWeightedMovingAverage(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._lwma.update(bar.EndTime, bar.Close)
            if self._lwma.is_ready:
                # The current value of self._lwma is represented by self._lwma.current.value
                self.plot("LinearWeightedMovingAverage", "lwma", self._lwma.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class LinearWeightedMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LinearWeightedMovingAverage _lwma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _lwma = new LinearWeightedMovingAverage(20);
            RegisterIndicator(_symbol, _lwma, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_lwma.IsReady)
            {
                // The current value of _lwma is represented by itself (_lwma)
                // or _lwma.Current.Value
                Plot("LinearWeightedMovingAverage", "lwma", _lwma);
                
            }
        }
    }
    class LinearWeightedMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._lwma = LinearWeightedMovingAverage(20)
            self.register_indicator(self._symbol, self._lwma, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._lwma.is_ready:
                # The current value of self._lwma is represented by self._lwma.current.value
                self.plot("LinearWeightedMovingAverage", "lwma", self._lwma.current.value)
                
    

    The following reference table describes the LinearWeightedMovingAverage constructor:

    LinearWeightedMovingAverage

    class QuantConnect.Indicators.LinearWeightedMovingAverage [source]

    Represents the traditional Weighted Moving Average indicator. The weight are linearly distributed according to the number of periods in the indicator. For example, a 4 period indicator will have a numerator of (4 * window[0]) + (3 * window[1]) + (2 * window[2]) + window[3] and a denominator of 4 + 3 + 2 + 1 = 10 During the warm up period, IsReady will return false, but the LWMA will still be computed correctly because the denominator will be the minimum of Samples factorial or Size factorial and the computation iterates over that minimum value. The RollingWindow of inputs is created when the indicator is created. A RollingWindow of LWMAs is not saved. That is up to the caller.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LinearWeightedMovingAverage

    class QuantConnect.Indicators.LinearWeightedMovingAverage [source]

    Represents the traditional Weighted Moving Average indicator. The weight are linearly distributed according to the number of periods in the indicator. For example, a 4 period indicator will have a numerator of (4 * window[0]) + (3 * window[1]) + (2 * window[2]) + window[3] and a denominator of 4 + 3 + 2 + 1 = 10 During the warm up period, IsReady will return false, but the LWMA will still be computed correctly because the denominator will be the minimum of Samples factorial or Size factorial and the computation iterates over that minimum value. The RollingWindow of inputs is created when the indicator is created. A RollingWindow of LWMAs is not saved. That is up to the caller.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of LinearWeightedMovingAverage using the plotly library.

    LinearWeightedMovingAverage line plot.

     

    Supported Indicators

    Log Return

    Introduction

    This indicator represents the LogReturn indicator (LOGR) - log returns are useful for identifying price convergence/divergence in a given period - logr = log (current price / last price in period)

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using LOGR Indicator

    To create an automatic indicators for LogReturn , call the LOGR helper method from the QCAlgorithm class. The LOGR method creates a LogReturn object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class LogReturnAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LogReturn _logr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _logr = LOGR(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_logr.IsReady)
            {
                // The current value of _logr is represented by itself (_logr)
                // or _logr.Current.Value
                Plot("LogReturn", "logr", _logr);
                
            }
        }
    }
    class LogReturnAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._logr = self.logr(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._logr.is_ready:
                # The current value of self._logr is represented by self._logr.current.value
                self.plot("LogReturn", "logr", self._logr.current.value)
                
    

    The following reference table describes the LOGR method:

    logr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new LogReturn indicator.

    Parameters:
    Returns:

    log return indicator for the requested symbol.

    Return type:

    LogReturn

    LOGR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new LogReturn indicator.

    Parameters:
    Returns:

    log return indicator for the requested symbol.

    Return type:

    LogReturn

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a LogReturn indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class LogReturnAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LogReturn _logr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _logr = new LogReturn(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _logr.Update(bar.EndTime, bar.Close);
            }
       
            if (_logr.IsReady)
            {
                // The current value of _logr is represented by itself (_logr)
                // or _logr.Current.Value
                Plot("LogReturn", "logr", _logr);
                
            }
        }
    }
    class LogReturnAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._logr = LogReturn(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._logr.update(bar.EndTime, bar.Close)
            if self._logr.is_ready:
                # The current value of self._logr is represented by self._logr.current.value
                self.plot("LogReturn", "logr", self._logr.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class LogReturnAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private LogReturn _logr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _logr = new LogReturn(20);
            RegisterIndicator(_symbol, _logr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_logr.IsReady)
            {
                // The current value of _logr is represented by itself (_logr)
                // or _logr.Current.Value
                Plot("LogReturn", "logr", _logr);
                
            }
        }
    }
    class LogReturnAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._logr = LogReturn(20)
            self.register_indicator(self._symbol, self._logr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._logr.is_ready:
                # The current value of self._logr is represented by self._logr.current.value
                self.plot("LogReturn", "logr", self._logr.current.value)
                
    

    The following reference table describes the LogReturn constructor:

    LogReturn

    class QuantConnect.Indicators.LogReturn [source]

    Represents the LogReturn indicator (LOGR) - log returns are useful for identifying price convergence/divergence in a given period - logr = log (current price / last price in period)

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LogReturn

    class QuantConnect.Indicators.LogReturn [source]

    Represents the LogReturn indicator (LOGR) - log returns are useful for identifying price convergence/divergence in a given period - logr = log (current price / last price in period)

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of LogReturn using the plotly library.

    LogReturn line plot.

     

    Supported Indicators

    Mass Index

    Introduction

    The Mass Index uses the high-low range to identify trend reversals based on range expansions. In this sense, the Mass Index is a volatility indicator that does not have a directional bias. Instead, the Mass Index identifies range bulges that can foreshadow a reversal of the current trend. Developed by Donald Dorsey.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MASS Indicator

    To create an automatic indicators for MassIndex , call the MASS helper method from the QCAlgorithm class. The MASS method creates a MassIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MassIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MassIndex _mass;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mass = MASS(_symbol, 9, 25);
        }
    
        public override void OnData(Slice data)
        {
            if (_mass.IsReady)
            {
                // The current value of _mass is represented by itself (_mass)
                // or _mass.Current.Value
                Plot("MassIndex", "mass", _mass);
                
            }
        }
    }
    class MassIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mass = self.mass(self._symbol, 9, 25)
    
        def on_data(self, slice: Slice) -> None:
            if self._mass.is_ready:
                # The current value of self._mass is represented by self._mass.current.value
                self.plot("MassIndex", "mass", self._mass.current.value)
                
    

    The following reference table describes the MASS method:

    mass( symbol, ema_period=9, sum_period=25, resolution=None, selector=None ) [source]

    Creates a new Mass Index indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Mass Index indicator for the requested symbol over the specified period

    Return type:

    MassIndex

    MASS( symbol, emaPeriod=9, sumPeriod=25, resolution=None, selector=None ) [source]

    Creates a new Mass Index indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Mass Index indicator for the requested symbol over the specified period

    Return type:

    MassIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MassIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class MassIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MassIndex _mass;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mass = new MassIndex(9, 25);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _mass.Update(bar);
            }
       
            if (_mass.IsReady)
            {
                // The current value of _mass is represented by itself (_mass)
                // or _mass.Current.Value
                Plot("MassIndex", "mass", _mass);
                
            }
        }
    }
    class MassIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mass = MassIndex(9, 25)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._mass.update(bar)
            if self._mass.is_ready:
                # The current value of self._mass is represented by self._mass.current.value
                self.plot("MassIndex", "mass", self._mass.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MassIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MassIndex _mass;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mass = new MassIndex(9, 25);
            RegisterIndicator(_symbol, _mass, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_mass.IsReady)
            {
                // The current value of _mass is represented by itself (_mass)
                // or _mass.Current.Value
                Plot("MassIndex", "mass", _mass);
                
            }
        }
    }
    class MassIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mass = MassIndex(9, 25)
            self.register_indicator(self._symbol, self._mass, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._mass.is_ready:
                # The current value of self._mass is represented by self._mass.current.value
                self.plot("MassIndex", "mass", self._mass.current.value)
                
    

    The following reference table describes the MassIndex constructor:

    MassIndex

    class QuantConnect.Indicators.MassIndex [source]

    The Mass Index uses the high-low range to identify trend reversals based on range expansions. In this sense, the Mass Index is a volatility indicator that does not have a directional bias. Instead, the Mass Index identifies range bulges that can foreshadow a reversal of the current trend. Developed by Donald Dorsey.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MassIndex

    class QuantConnect.Indicators.MassIndex [source]

    The Mass Index uses the high-low range to identify trend reversals based on range expansions. In this sense, the Mass Index is a volatility indicator that does not have a directional bias. Instead, the Mass Index identifies range bulges that can foreshadow a reversal of the current trend. Developed by Donald Dorsey.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of MassIndex using the plotly library.

    MassIndex line plot.

     

    Supported Indicators

    Maximum

    Introduction

    This indicator represents an indicator capable of tracking the maximum value and how many periods ago it occurred

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MAX Indicator

    To create an automatic indicators for Maximum , call the MAX helper method from the QCAlgorithm class. The MAX method creates a Maximum object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MaximumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Maximum _max;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _max = MAX(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_max.IsReady)
            {
                // The current value of _max is represented by itself (_max)
                // or _max.Current.Value
                Plot("Maximum", "max", _max);
                // Plot all properties of max
                Plot("Maximum", "periodssincemaximum", _max.PeriodsSinceMaximum);
            }
        }
    }
    class MaximumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._max = self.max(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._max.is_ready:
                # The current value of self._max is represented by self._max.current.value
                self.plot("Maximum", "max", self._max.current.value)
                # Plot all attributes of self._max
                self.plot("Maximum", "periods_since_maximum", self._max.periods_since_maximum)
    

    The following reference table describes the MAX method:

    max( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Maximum indicator to compute the maximum value

    Parameters:
    Returns:

    A Maximum indicator that compute the max value and the periods since the max value

    Return type:

    Maximum

    MAX( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Maximum indicator to compute the maximum value

    Parameters:
    Returns:

    A Maximum indicator that compute the max value and the periods since the max value

    Return type:

    Maximum

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Maximum indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class MaximumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Maximum _max;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _max = new Maximum(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _max.Update(bar.EndTime, bar.Close);
            }
       
            if (_max.IsReady)
            {
                // The current value of _max is represented by itself (_max)
                // or _max.Current.Value
                Plot("Maximum", "max", _max);
                // Plot all properties of max
                Plot("Maximum", "periodssincemaximum", _max.PeriodsSinceMaximum);
            }
        }
    }
    class MaximumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._max = Maximum(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._max.update(bar.EndTime, bar.Close)
            if self._max.is_ready:
                # The current value of self._max is represented by self._max.current.value
                self.plot("Maximum", "max", self._max.current.value)
                # Plot all attributes of self._max
                self.plot("Maximum", "periods_since_maximum", self._max.periods_since_maximum)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MaximumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Maximum _max;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _max = new Maximum(20);
            RegisterIndicator(_symbol, _max, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_max.IsReady)
            {
                // The current value of _max is represented by itself (_max)
                // or _max.Current.Value
                Plot("Maximum", "max", _max);
                
            }
        }
    }
    class MaximumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._max = Maximum(20)
            self.register_indicator(self._symbol, self._max, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._max.is_ready:
                # The current value of self._max is represented by self._max.current.value
                self.plot("Maximum", "max", self._max.current.value)
                
    

    The following reference table describes the Maximum constructor:

    Maximum

    class QuantConnect.Indicators.Maximum [source]

    Represents an indicator capable of tracking the maximum value and how many periods ago it occurred

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property periods_since_maximum

    The number of periods since the maximum value was encountered

    Returns:

    The number of periods since the maximum value was encountered

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Maximum

    class QuantConnect.Indicators.Maximum [source]

    Represents an indicator capable of tracking the maximum value and how many periods ago it occurred

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property PeriodsSinceMaximum

    The number of periods since the maximum value was encountered

    Returns:

    The number of periods since the maximum value was encountered

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Maximum using the plotly library.

    Maximum line plot.

     

    Supported Indicators

    Mc Clellan Oscillator

    Introduction

    The McClellan Oscillator is a market breadth indicator which was developed by Sherman and Marian McClellan. It is based on the difference between the number of advancing and declining periods.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MOSC Indicator

    To create an automatic indicators for McClellanOscillator , call the MOSC helper method from the QCAlgorithm class. The MOSC method creates a McClellanOscillator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class McClellanOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private McClellanOscillator _mosc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _mosc = MOSC([_symbol, reference]);
        }
    
        public override void OnData(Slice data)
        {
            if (_mosc.IsReady)
            {
                // The current value of _mosc is represented by itself (_mosc)
                // or _mosc.Current.Value
                Plot("McClellanOscillator", "mosc", _mosc);
                // Plot all properties of mosc
                Plot("McClellanOscillator", "emafast", _mosc.EMAFast);
                Plot("McClellanOscillator", "emaslow", _mosc.EMASlow);
                Plot("McClellanOscillator", "addifference", _mosc.ADDifference);
            }
        }
    }
    class McClellanOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._mosc = self.mosc([self._symbol, reference])
    
        def on_data(self, slice: Slice) -> None:
            if self._mosc.is_ready:
                # The current value of self._mosc is represented by self._mosc.current.value
                self.plot("McClellanOscillator", "mosc", self._mosc.current.value)
                # Plot all attributes of self._mosc
                self.plot("McClellanOscillator", "ema_fast", self._mosc.ema_fast.current.value)
                self.plot("McClellanOscillator", "ema_slow", self._mosc.ema_slow.current.value)
                self.plot("McClellanOscillator", "ad_difference", self._mosc.ad_difference.current.value)
    

    The following reference table describes the MOSC method:

    mosc( symbols, fast_period=19, slow_period=39, resolution=None, selector=None ) [source]

    Creates a new McClellan Oscillator indicator

    Parameters:
    Returns:

    The McClellan Oscillator indicator for the requested symbol over the specified period

    Return type:

    McClellanOscillator

    MOSC( symbols, fastPeriod=19, slowPeriod=39, resolution=None, selector=None ) [source]

    Creates a new McClellan Oscillator indicator

    Parameters:
    Returns:

    The McClellan Oscillator indicator for the requested symbol over the specified period

    Return type:

    McClellanOscillator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a McClellanOscillator indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class McClellanOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private McClellanOscillator _mosc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _mosc = new McClellanOscillator("");
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _mosc.Update(bar);
            }
            if (data.Bars.TryGetValue(_reference, out bar))
            {      
                _mosc.Update(bar);
            }
       
            if (_mosc.IsReady)
            {
                // The current value of _mosc is represented by itself (_mosc)
                // or _mosc.Current.Value
                Plot("McClellanOscillator", "mosc", _mosc);
                // Plot all properties of mosc
                Plot("McClellanOscillator", "emafast", _mosc.EMAFast);
                Plot("McClellanOscillator", "emaslow", _mosc.EMASlow);
                Plot("McClellanOscillator", "addifference", _mosc.ADDifference);
            }
        }
    }
    class McClellanOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._mosc = McClellanOscillator("")
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._mosc.update(bar)
            bar = slice.bars.get(self.referece)
            if bar:
                self._mosc.update(bar)
            if self._mosc.is_ready:
                # The current value of self._mosc is represented by self._mosc.current.value
                self.plot("McClellanOscillator", "mosc", self._mosc.current.value)
                # Plot all attributes of self._mosc
                self.plot("McClellanOscillator", "ema_fast", self._mosc.ema_fast.current.value)
                self.plot("McClellanOscillator", "ema_slow", self._mosc.ema_slow.current.value)
                self.plot("McClellanOscillator", "ad_difference", self._mosc.ad_difference.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class McClellanOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private McClellanOscillator _mosc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _mosc = new McClellanOscillator("");
            RegisterIndicator(_symbol, _mosc, Resolution.Daily);
            RegisterIndicator(reference, _mosc, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_mosc.IsReady)
            {
                // The current value of _mosc is represented by itself (_mosc)
                // or _mosc.Current.Value
                Plot("McClellanOscillator", "mosc", _mosc);
                // Plot all properties of mosc
                Plot("McClellanOscillator", "emafast", _mosc.EMAFast);
                Plot("McClellanOscillator", "emaslow", _mosc.EMASlow);
                Plot("McClellanOscillator", "addifference", _mosc.ADDifference);
            }
        }
    }
    class McClellanOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._mosc = McClellanOscillator("")
            self.register_indicator(self._symbol, self._mosc, Resolution.DAILY)
            self.register_indicator(reference, self._mosc, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._mosc.is_ready:
                # The current value of self._mosc is represented by self._mosc.current.value
                self.plot("McClellanOscillator", "mosc", self._mosc.current.value)
                # Plot all attributes of self._mosc
                self.plot("McClellanOscillator", "ema_fast", self._mosc.ema_fast.current.value)
                self.plot("McClellanOscillator", "ema_slow", self._mosc.ema_slow.current.value)
                self.plot("McClellanOscillator", "ad_difference", self._mosc.ad_difference.current.value)
    

    The following reference table describes the McClellanOscillator constructor:

    McClellanOscillator

    class QuantConnect.Indicators.McClellanOscillator [source]

    The McClellan Oscillator is a market breadth indicator which was developed by Sherman and Marian McClellan. It is based on the difference between the number of advancing and declining periods.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property ad_difference

    The number of advance assets minus the number of decline assets

    Returns:

    The number of advance assets minus the number of decline assets

    Return type:

    AdvanceDeclineDifference

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property ema_fast

    Fast period EMA of advance decline difference

    Returns:

    Fast period EMA of advance decline difference

    Return type:

    ExponentialMovingAverage

    property ema_slow

    Slow period EMA of advance decline difference

    Returns:

    Slow period EMA of advance decline difference

    Return type:

    ExponentialMovingAverage

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    McClellanOscillator

    class QuantConnect.Indicators.McClellanOscillator [source]

    The McClellan Oscillator is a market breadth indicator which was developed by Sherman and Marian McClellan. It is based on the difference between the number of advancing and declining periods.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property ADDifference

    The number of advance assets minus the number of decline assets

    Returns:

    The number of advance assets minus the number of decline assets

    Return type:

    AdvanceDeclineDifference

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property EMAFast

    Fast period EMA of advance decline difference

    Returns:

    Fast period EMA of advance decline difference

    Return type:

    ExponentialMovingAverage

    property EMASlow

    Slow period EMA of advance decline difference

    Returns:

    Slow period EMA of advance decline difference

    Return type:

    ExponentialMovingAverage

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of McClellanOscillator using the plotly library.

    McClellanOscillator line plot.

     

    Supported Indicators

    Mc Clellan Summation Index

    Introduction

    The McClellan Summation Index (MSI) is a market breadth indicator that is based on the rolling average of difference between the number of advancing and declining issues on a stock exchange. It is generally considered as is a long-term version of the

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MSI Indicator

    To create an automatic indicators for McClellanSummationIndex , call the MSI helper method from the QCAlgorithm class. The MSI method creates a McClellanSummationIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class McClellanSummationIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private McClellanSummationIndex _msi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _msi = MSI([_symbol, reference]);
        }
    
        public override void OnData(Slice data)
        {
            if (_msi.IsReady)
            {
                // The current value of _msi is represented by itself (_msi)
                // or _msi.Current.Value
                Plot("McClellanSummationIndex", "msi", _msi);
                // Plot all properties of msi
                Plot("McClellanSummationIndex", "mcclellanoscillator", _msi.McClellanOscillator);
            }
        }
    }
    class McClellanSummationIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._msi = self.msi([self._symbol, reference])
    
        def on_data(self, slice: Slice) -> None:
            if self._msi.is_ready:
                # The current value of self._msi is represented by self._msi.current.value
                self.plot("McClellanSummationIndex", "msi", self._msi.current.value)
                # Plot all attributes of self._msi
                self.plot("McClellanSummationIndex", "mc_clellan_oscillator", self._msi.mc_clellan_oscillator.current.value)
    

    The following reference table describes the MSI method:

    msi( symbols, fast_period=19, slow_period=39, resolution=None, selector=None ) [source]

    Creates a new McClellan Summation Index indicator

    Parameters:
    Returns:

    The McClellan Summation Index indicator for the requested symbol over the specified period

    Return type:

    McClellanSummationIndex

    MSI( symbols, fastPeriod=19, slowPeriod=39, resolution=None, selector=None ) [source]

    Creates a new McClellan Summation Index indicator

    Parameters:
    Returns:

    The McClellan Summation Index indicator for the requested symbol over the specified period

    Return type:

    McClellanSummationIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a McClellanSummationIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class McClellanSummationIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private McClellanSummationIndex _msi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _msi = new McClellanSummationIndex("");
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _msi.Update(bar);
            }
            if (data.Bars.TryGetValue(_reference, out bar))
            {      
                _msi.Update(bar);
            }
       
            if (_msi.IsReady)
            {
                // The current value of _msi is represented by itself (_msi)
                // or _msi.Current.Value
                Plot("McClellanSummationIndex", "msi", _msi);
                // Plot all properties of msi
                Plot("McClellanSummationIndex", "mcclellanoscillator", _msi.McClellanOscillator);
            }
        }
    }
    class McClellanSummationIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._msi = McClellanSummationIndex("")
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._msi.update(bar)
            bar = slice.bars.get(self.referece)
            if bar:
                self._msi.update(bar)
            if self._msi.is_ready:
                # The current value of self._msi is represented by self._msi.current.value
                self.plot("McClellanSummationIndex", "msi", self._msi.current.value)
                # Plot all attributes of self._msi
                self.plot("McClellanSummationIndex", "mc_clellan_oscillator", self._msi.mc_clellan_oscillator.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class McClellanSummationIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _reference;
        private McClellanSummationIndex _msi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _reference = AddEquity("QQQ", Resolution.Daily).Symbol;
            _msi = new McClellanSummationIndex("");
            RegisterIndicator(_symbol, _msi, Resolution.Daily);
            RegisterIndicator(reference, _msi, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_msi.IsReady)
            {
                // The current value of _msi is represented by itself (_msi)
                // or _msi.Current.Value
                Plot("McClellanSummationIndex", "msi", _msi);
                // Plot all properties of msi
                Plot("McClellanSummationIndex", "mcclellanoscillator", _msi.McClellanOscillator);
            }
        }
    }
    class McClellanSummationIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.reference = self.add_equity("QQQ", Resolution.DAILY).symbol
            self._msi = McClellanSummationIndex("")
            self.register_indicator(self._symbol, self._msi, Resolution.DAILY)
            self.register_indicator(reference, self._msi, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._msi.is_ready:
                # The current value of self._msi is represented by self._msi.current.value
                self.plot("McClellanSummationIndex", "msi", self._msi.current.value)
                # Plot all attributes of self._msi
                self.plot("McClellanSummationIndex", "mc_clellan_oscillator", self._msi.mc_clellan_oscillator.current.value)
    

    The following reference table describes the McClellanSummationIndex constructor:

    McClellanSummationIndex

    class QuantConnect.Indicators.McClellanSummationIndex [source]

    The McClellan Summation Index (MSI) is a market breadth indicator that is based on the rolling average of difference between the number of advancing and declining issues on a stock exchange. It is generally considered as is a long-term version of the McClellanOscillator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property mc_clellan_oscillator

    The McClellan Oscillator is a market breadth indicator which was developed by Sherman and Marian McClellan. It is based on the difference between the number of advancing and declining periods.

    Returns:

    The McClellan Oscillator is a market breadth indicator which was developed by Sherman and Marian McClellan. It is based on the difference between the number of advancing and declining periods.

    Return type:

    McClellanOscillator

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    McClellanSummationIndex

    class QuantConnect.Indicators.McClellanSummationIndex [source]

    The McClellan Summation Index (MSI) is a market breadth indicator that is based on the rolling average of difference between the number of advancing and declining issues on a stock exchange. It is generally considered as is a long-term version of the McClellanOscillator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property McClellanOscillator

    The McClellan Oscillator is a market breadth indicator which was developed by Sherman and Marian McClellan. It is based on the difference between the number of advancing and declining periods.

    Returns:

    The McClellan Oscillator is a market breadth indicator which was developed by Sherman and Marian McClellan. It is based on the difference between the number of advancing and declining periods.

    Return type:

    McClellanOscillator

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of McClellanSummationIndex using the plotly library.

    McClellanSummationIndex line plot.

     

    Supported Indicators

    Mean Absolute Deviation

    Introduction

    This indicator computes the n-period mean absolute deviation.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MAD Indicator

    To create an automatic indicators for MeanAbsoluteDeviation , call the MAD helper method from the QCAlgorithm class. The MAD method creates a MeanAbsoluteDeviation object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MeanAbsoluteDeviationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MeanAbsoluteDeviation _mad;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mad = MAD(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_mad.IsReady)
            {
                // The current value of _mad is represented by itself (_mad)
                // or _mad.Current.Value
                Plot("MeanAbsoluteDeviation", "mad", _mad);
                // Plot all properties of mad
                Plot("MeanAbsoluteDeviation", "mean", _mad.Mean);
            }
        }
    }
    class MeanAbsoluteDeviationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mad = self.mad(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._mad.is_ready:
                # The current value of self._mad is represented by self._mad.current.value
                self.plot("MeanAbsoluteDeviation", "mad", self._mad.current.value)
                # Plot all attributes of self._mad
                self.plot("MeanAbsoluteDeviation", "mean", self._mad.mean.current.value)
    

    The following reference table describes the MAD method:

    mad( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MeanAbsoluteDeviation indicator.

    Parameters:
    Returns:

    The MeanAbsoluteDeviation indicator for the requested symbol over the specified period

    Return type:

    MeanAbsoluteDeviation

    MAD( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MeanAbsoluteDeviation indicator.

    Parameters:
    Returns:

    The MeanAbsoluteDeviation indicator for the requested symbol over the specified period

    Return type:

    MeanAbsoluteDeviation

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MeanAbsoluteDeviation indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class MeanAbsoluteDeviationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MeanAbsoluteDeviation _mad;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mad = new MeanAbsoluteDeviation(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _mad.Update(bar.EndTime, bar.Close);
            }
       
            if (_mad.IsReady)
            {
                // The current value of _mad is represented by itself (_mad)
                // or _mad.Current.Value
                Plot("MeanAbsoluteDeviation", "mad", _mad);
                // Plot all properties of mad
                Plot("MeanAbsoluteDeviation", "mean", _mad.Mean);
            }
        }
    }
    class MeanAbsoluteDeviationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mad = MeanAbsoluteDeviation(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._mad.update(bar.EndTime, bar.Close)
            if self._mad.is_ready:
                # The current value of self._mad is represented by self._mad.current.value
                self.plot("MeanAbsoluteDeviation", "mad", self._mad.current.value)
                # Plot all attributes of self._mad
                self.plot("MeanAbsoluteDeviation", "mean", self._mad.mean.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MeanAbsoluteDeviationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MeanAbsoluteDeviation _mad;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mad = new MeanAbsoluteDeviation(20);
            RegisterIndicator(_symbol, _mad, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_mad.IsReady)
            {
                // The current value of _mad is represented by itself (_mad)
                // or _mad.Current.Value
                Plot("MeanAbsoluteDeviation", "mad", _mad);
                // Plot all properties of mad
                Plot("MeanAbsoluteDeviation", "mean", _mad.Mean);
            }
        }
    }
    class MeanAbsoluteDeviationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mad = MeanAbsoluteDeviation(20)
            self.register_indicator(self._symbol, self._mad, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._mad.is_ready:
                # The current value of self._mad is represented by self._mad.current.value
                self.plot("MeanAbsoluteDeviation", "mad", self._mad.current.value)
                # Plot all attributes of self._mad
                self.plot("MeanAbsoluteDeviation", "mean", self._mad.mean.current.value)
    

    The following reference table describes the MeanAbsoluteDeviation constructor:

    MeanAbsoluteDeviation

    class QuantConnect.Indicators.MeanAbsoluteDeviation [source]

    This indicator computes the n-period mean absolute deviation.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and its sub-indicator Mean to their initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property mean

    Gets the mean used to compute the deviation

    Returns:

    Gets the mean used to compute the deviation

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MeanAbsoluteDeviation

    class QuantConnect.Indicators.MeanAbsoluteDeviation [source]

    This indicator computes the n-period mean absolute deviation.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and its sub-indicator Mean to their initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Mean

    Gets the mean used to compute the deviation

    Returns:

    Gets the mean used to compute the deviation

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of MeanAbsoluteDeviation using the plotly library.

    MeanAbsoluteDeviation line plot.

     

    Supported Indicators

    Mid Point

    Introduction

    This indicator computes the MidPoint (MIDPOINT) The MidPoint is calculated using the following formula: MIDPOINT = (Highest Value + Lowest Value) / 2

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MIDPOINT Indicator

    To create an automatic indicators for MidPoint , call the MIDPOINT helper method from the QCAlgorithm class. The MIDPOINT method creates a MidPoint object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MidPointAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MidPoint _midpoint;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _midpoint = MIDPOINT(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_midpoint.IsReady)
            {
                // The current value of _midpoint is represented by itself (_midpoint)
                // or _midpoint.Current.Value
                Plot("MidPoint", "midpoint", _midpoint);
                
            }
        }
    }
    class MidPointAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._midpoint = self.midpoint(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._midpoint.is_ready:
                # The current value of self._midpoint is represented by self._midpoint.current.value
                self.plot("MidPoint", "midpoint", self._midpoint.current.value)
                
    

    The following reference table describes the MIDPOINT method:

    midpoint( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MidPoint indicator.

    Parameters:
    Returns:

    The MidPoint indicator for the requested symbol over the specified period

    Return type:

    MidPoint

    MIDPOINT( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MidPoint indicator.

    Parameters:
    Returns:

    The MidPoint indicator for the requested symbol over the specified period

    Return type:

    MidPoint

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MidPoint indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class MidPointAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MidPoint _midpoint;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _midpoint = new MidPoint(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _midpoint.Update(bar.EndTime, bar.Close);
            }
       
            if (_midpoint.IsReady)
            {
                // The current value of _midpoint is represented by itself (_midpoint)
                // or _midpoint.Current.Value
                Plot("MidPoint", "midpoint", _midpoint);
                
            }
        }
    }
    class MidPointAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._midpoint = MidPoint(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._midpoint.update(bar.EndTime, bar.Close)
            if self._midpoint.is_ready:
                # The current value of self._midpoint is represented by self._midpoint.current.value
                self.plot("MidPoint", "midpoint", self._midpoint.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MidPointAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MidPoint _midpoint;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _midpoint = new MidPoint(20);
            RegisterIndicator(_symbol, _midpoint, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_midpoint.IsReady)
            {
                // The current value of _midpoint is represented by itself (_midpoint)
                // or _midpoint.Current.Value
                Plot("MidPoint", "midpoint", _midpoint);
                
            }
        }
    }
    class MidPointAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._midpoint = MidPoint(20)
            self.register_indicator(self._symbol, self._midpoint, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._midpoint.is_ready:
                # The current value of self._midpoint is represented by self._midpoint.current.value
                self.plot("MidPoint", "midpoint", self._midpoint.current.value)
                
    

    The following reference table describes the MidPoint constructor:

    MidPoint

    class QuantConnect.Indicators.MidPoint [source]

    This indicator computes the MidPoint (MIDPOINT) The MidPoint is calculated using the following formula: MIDPOINT = (Highest Value + Lowest Value) / 2

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MidPoint

    class QuantConnect.Indicators.MidPoint [source]

    This indicator computes the MidPoint (MIDPOINT) The MidPoint is calculated using the following formula: MIDPOINT = (Highest Value + Lowest Value) / 2

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of MidPoint using the plotly library.

    MidPoint line plot.

     

    Supported Indicators

    Mid Price

    Introduction

    This indicator computes the MidPrice (MIDPRICE). The MidPrice is calculated using the following formula: MIDPRICE = (Highest High + Lowest Low) / 2

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MIDPRICE Indicator

    To create an automatic indicators for MidPrice , call the MIDPRICE helper method from the QCAlgorithm class. The MIDPRICE method creates a MidPrice object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MidPriceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MidPrice _midprice;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _midprice = MIDPRICE(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_midprice.IsReady)
            {
                // The current value of _midprice is represented by itself (_midprice)
                // or _midprice.Current.Value
                Plot("MidPrice", "midprice", _midprice);
                
            }
        }
    }
    class MidPriceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._midprice = self.midprice(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._midprice.is_ready:
                # The current value of self._midprice is represented by self._midprice.current.value
                self.plot("MidPrice", "midprice", self._midprice.current.value)
                
    

    The following reference table describes the MIDPRICE method:

    midprice( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MidPrice indicator.

    Parameters:
    Returns:

    The MidPrice indicator for the requested symbol over the specified period

    Return type:

    MidPrice

    MIDPRICE( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MidPrice indicator.

    Parameters:
    Returns:

    The MidPrice indicator for the requested symbol over the specified period

    Return type:

    MidPrice

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MidPrice indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class MidPriceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MidPrice _midprice;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _midprice = new MidPrice(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _midprice.Update(bar);
            }
       
            if (_midprice.IsReady)
            {
                // The current value of _midprice is represented by itself (_midprice)
                // or _midprice.Current.Value
                Plot("MidPrice", "midprice", _midprice);
                
            }
        }
    }
    class MidPriceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._midprice = MidPrice(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._midprice.update(bar)
            if self._midprice.is_ready:
                # The current value of self._midprice is represented by self._midprice.current.value
                self.plot("MidPrice", "midprice", self._midprice.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MidPriceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MidPrice _midprice;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _midprice = new MidPrice(20);
            RegisterIndicator(_symbol, _midprice, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_midprice.IsReady)
            {
                // The current value of _midprice is represented by itself (_midprice)
                // or _midprice.Current.Value
                Plot("MidPrice", "midprice", _midprice);
                
            }
        }
    }
    class MidPriceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._midprice = MidPrice(20)
            self.register_indicator(self._symbol, self._midprice, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._midprice.is_ready:
                # The current value of self._midprice is represented by self._midprice.current.value
                self.plot("MidPrice", "midprice", self._midprice.current.value)
                
    

    The following reference table describes the MidPrice constructor:

    MidPrice

    class QuantConnect.Indicators.MidPrice [source]

    This indicator computes the MidPrice (MIDPRICE). The MidPrice is calculated using the following formula: MIDPRICE = (Highest High + Lowest Low) / 2

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MidPrice

    class QuantConnect.Indicators.MidPrice [source]

    This indicator computes the MidPrice (MIDPRICE). The MidPrice is calculated using the following formula: MIDPRICE = (Highest High + Lowest Low) / 2

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of MidPrice using the plotly library.

    MidPrice line plot.

     

    Supported Indicators

    Minimum

    Introduction

    This indicator represents an indicator capable of tracking the minimum value and how many periods ago it occurred

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MIN Indicator

    To create an automatic indicators for Minimum , call the MIN helper method from the QCAlgorithm class. The MIN method creates a Minimum object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MinimumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Minimum _min;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _min = MIN(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_min.IsReady)
            {
                // The current value of _min is represented by itself (_min)
                // or _min.Current.Value
                Plot("Minimum", "min", _min);
                // Plot all properties of min
                Plot("Minimum", "periodssinceminimum", _min.PeriodsSinceMinimum);
            }
        }
    }
    class MinimumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._min = self.min(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._min.is_ready:
                # The current value of self._min is represented by self._min.current.value
                self.plot("Minimum", "min", self._min.current.value)
                # Plot all attributes of self._min
                self.plot("Minimum", "periods_since_minimum", self._min.periods_since_minimum)
    

    The following reference table describes the MIN method:

    min( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Minimum indicator to compute the minimum value

    Parameters:
    Returns:

    A Minimum indicator that compute the in value and the periods since the min value

    Return type:

    Minimum

    MIN( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Minimum indicator to compute the minimum value

    Parameters:
    Returns:

    A Minimum indicator that compute the in value and the periods since the min value

    Return type:

    Minimum

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Minimum indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class MinimumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Minimum _min;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _min = new Minimum(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _min.Update(bar.EndTime, bar.Close);
            }
       
            if (_min.IsReady)
            {
                // The current value of _min is represented by itself (_min)
                // or _min.Current.Value
                Plot("Minimum", "min", _min);
                // Plot all properties of min
                Plot("Minimum", "periodssinceminimum", _min.PeriodsSinceMinimum);
            }
        }
    }
    class MinimumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._min = Minimum(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._min.update(bar.EndTime, bar.Close)
            if self._min.is_ready:
                # The current value of self._min is represented by self._min.current.value
                self.plot("Minimum", "min", self._min.current.value)
                # Plot all attributes of self._min
                self.plot("Minimum", "periods_since_minimum", self._min.periods_since_minimum)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MinimumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Minimum _min;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _min = new Minimum(20);
            RegisterIndicator(_symbol, _min, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_min.IsReady)
            {
                // The current value of _min is represented by itself (_min)
                // or _min.Current.Value
                Plot("Minimum", "min", _min);
                
            }
        }
    }
    class MinimumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._min = Minimum(20)
            self.register_indicator(self._symbol, self._min, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._min.is_ready:
                # The current value of self._min is represented by self._min.current.value
                self.plot("Minimum", "min", self._min.current.value)
                
    

    The following reference table describes the Minimum constructor:

    Minimum

    class QuantConnect.Indicators.Minimum [source]

    Represents an indicator capable of tracking the minimum value and how many periods ago it occurred

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property periods_since_minimum

    The number of periods since the minimum value was encountered

    Returns:

    The number of periods since the minimum value was encountered

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Minimum

    class QuantConnect.Indicators.Minimum [source]

    Represents an indicator capable of tracking the minimum value and how many periods ago it occurred

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property PeriodsSinceMinimum

    The number of periods since the minimum value was encountered

    Returns:

    The number of periods since the minimum value was encountered

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Minimum using the plotly library.

    Minimum line plot.

     

    Supported Indicators

    Momentum

    Introduction

    This indicator computes the n-period change in a value using the following: value_0 - value_n

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MOM Indicator

    To create an automatic indicators for Momentum , call the MOM helper method from the QCAlgorithm class. The MOM method creates a Momentum object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MomentumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Momentum _mom;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mom = MOM(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_mom.IsReady)
            {
                // The current value of _mom is represented by itself (_mom)
                // or _mom.Current.Value
                Plot("Momentum", "mom", _mom);
                
            }
        }
    }
    class MomentumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mom = self.mom(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._mom.is_ready:
                # The current value of self._mom is represented by self._mom.current.value
                self.plot("Momentum", "mom", self._mom.current.value)
                
    

    The following reference table describes the MOM method:

    mom( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Momentum indicator. This will compute the absolute n-period change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The momentum indicator for the requested symbol over the specified period

    Return type:

    Momentum

    MOM( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Momentum indicator. This will compute the absolute n-period change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The momentum indicator for the requested symbol over the specified period

    Return type:

    Momentum

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Momentum indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class MomentumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Momentum _mom;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mom = new Momentum(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _mom.Update(bar.EndTime, bar.Close);
            }
       
            if (_mom.IsReady)
            {
                // The current value of _mom is represented by itself (_mom)
                // or _mom.Current.Value
                Plot("Momentum", "mom", _mom);
                
            }
        }
    }
    class MomentumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mom = Momentum(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._mom.update(bar.EndTime, bar.Close)
            if self._mom.is_ready:
                # The current value of self._mom is represented by self._mom.current.value
                self.plot("Momentum", "mom", self._mom.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MomentumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Momentum _mom;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mom = new Momentum(20);
            RegisterIndicator(_symbol, _mom, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_mom.IsReady)
            {
                // The current value of _mom is represented by itself (_mom)
                // or _mom.Current.Value
                Plot("Momentum", "mom", _mom);
                
            }
        }
    }
    class MomentumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mom = Momentum(20)
            self.register_indicator(self._symbol, self._mom, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._mom.is_ready:
                # The current value of self._mom is represented by self._mom.current.value
                self.plot("Momentum", "mom", self._mom.current.value)
                
    

    The following reference table describes the Momentum constructor:

    Momentum

    class QuantConnect.Indicators.Momentum [source]

    This indicator computes the n-period change in a value using the following: value_0 - value_n

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Momentum

    class QuantConnect.Indicators.Momentum [source]

    This indicator computes the n-period change in a value using the following: value_0 - value_n

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Momentum using the plotly library.

    Momentum line plot.

     

    Supported Indicators

    Momentum Percent

    Introduction

    This indicator computes the n-period percentage rate of change in a value using the following: 100 * (value_0 - value_n) / value_n This indicator yields the same results of RateOfChangePercent

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MOMP Indicator

    To create an automatic indicators for MomentumPercent , call the MOMP helper method from the QCAlgorithm class. The MOMP method creates a MomentumPercent object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MomentumPercentAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MomentumPercent _momp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _momp = MOMP(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_momp.IsReady)
            {
                // The current value of _momp is represented by itself (_momp)
                // or _momp.Current.Value
                Plot("MomentumPercent", "momp", _momp);
                
            }
        }
    }
    class MomentumPercentAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._momp = self.momp(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._momp.is_ready:
                # The current value of self._momp is represented by self._momp.current.value
                self.plot("MomentumPercent", "momp", self._momp.current.value)
                
    

    The following reference table describes the MOMP method:

    momp( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MomentumPercent indicator. This will compute the n-period percent change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The momentum indicator for the requested symbol over the specified period

    Return type:

    MomentumPercent

    MOMP( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MomentumPercent indicator. This will compute the n-period percent change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The momentum indicator for the requested symbol over the specified period

    Return type:

    MomentumPercent

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MomentumPercent indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class MomentumPercentAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MomentumPercent _momp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _momp = new MomentumPercent(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _momp.Update(bar.EndTime, bar.Close);
            }
       
            if (_momp.IsReady)
            {
                // The current value of _momp is represented by itself (_momp)
                // or _momp.Current.Value
                Plot("MomentumPercent", "momp", _momp);
                
            }
        }
    }
    class MomentumPercentAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._momp = MomentumPercent(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._momp.update(bar.EndTime, bar.Close)
            if self._momp.is_ready:
                # The current value of self._momp is represented by self._momp.current.value
                self.plot("MomentumPercent", "momp", self._momp.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MomentumPercentAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MomentumPercent _momp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _momp = new MomentumPercent(20);
            RegisterIndicator(_symbol, _momp, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_momp.IsReady)
            {
                // The current value of _momp is represented by itself (_momp)
                // or _momp.Current.Value
                Plot("MomentumPercent", "momp", _momp);
                
            }
        }
    }
    class MomentumPercentAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._momp = MomentumPercent(20)
            self.register_indicator(self._symbol, self._momp, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._momp.is_ready:
                # The current value of self._momp is represented by self._momp.current.value
                self.plot("MomentumPercent", "momp", self._momp.current.value)
                
    

    The following reference table describes the MomentumPercent constructor:

    MomentumPercent

    class QuantConnect.Indicators.MomentumPercent [source]

    This indicator computes the n-period percentage rate of change in a value using the following: 100 * (value_0 - value_n) / value_n This indicator yields the same results of RateOfChangePercent

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MomentumPercent

    class QuantConnect.Indicators.MomentumPercent [source]

    This indicator computes the n-period percentage rate of change in a value using the following: 100 * (value_0 - value_n) / value_n This indicator yields the same results of RateOfChangePercent

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of MomentumPercent using the plotly library.

    MomentumPercent line plot.

     

    Supported Indicators

    Money Flow Index

    Introduction

    The Money Flow Index (MFI) is an oscillator that uses both price and volume to measure buying and selling pressure Typical Price = (High + Low + Close)/3 Money Flow = Typical Price x Volume Positive Money Flow = Sum of the money flows of all days where the typical price is greater than the previous day's typical price Negative Money Flow = Sum of the money flows of all days where the typical price is less than the previous day's typical price Money Flow Ratio = (14-period Positive Money Flow)/(14-period Negative Money Flow) Money Flow Index = 100 x Positive Money Flow / ( Positive Money Flow + Negative Money Flow)

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MFI Indicator

    To create an automatic indicators for MoneyFlowIndex , call the MFI helper method from the QCAlgorithm class. The MFI method creates a MoneyFlowIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MoneyFlowIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MoneyFlowIndex _mfi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mfi = MFI(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_mfi.IsReady)
            {
                // The current value of _mfi is represented by itself (_mfi)
                // or _mfi.Current.Value
                Plot("MoneyFlowIndex", "mfi", _mfi);
                // Plot all properties of mfi
                Plot("MoneyFlowIndex", "positivemoneyflow", _mfi.PositiveMoneyFlow);
                Plot("MoneyFlowIndex", "negativemoneyflow", _mfi.NegativeMoneyFlow);
                Plot("MoneyFlowIndex", "previoustypicalprice", _mfi.PreviousTypicalPrice);
            }
        }
    }
    class MoneyFlowIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mfi = self.mfi(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._mfi.is_ready:
                # The current value of self._mfi is represented by self._mfi.current.value
                self.plot("MoneyFlowIndex", "mfi", self._mfi.current.value)
                # Plot all attributes of self._mfi
                self.plot("MoneyFlowIndex", "positive_money_flow", self._mfi.positive_money_flow.current.value)
                self.plot("MoneyFlowIndex", "negative_money_flow", self._mfi.negative_money_flow.current.value)
                self.plot("MoneyFlowIndex", "previous_typical_price", self._mfi.previous_typical_price)
    

    The following reference table describes the MFI method:

    mfi( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MoneyFlowIndex indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The MoneyFlowIndex indicator for the requested symbol over the specified period

    Return type:

    MoneyFlowIndex

    MFI( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MoneyFlowIndex indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The MoneyFlowIndex indicator for the requested symbol over the specified period

    Return type:

    MoneyFlowIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MoneyFlowIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class MoneyFlowIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MoneyFlowIndex _mfi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mfi = new MoneyFlowIndex(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _mfi.Update(bar);
            }
       
            if (_mfi.IsReady)
            {
                // The current value of _mfi is represented by itself (_mfi)
                // or _mfi.Current.Value
                Plot("MoneyFlowIndex", "mfi", _mfi);
                // Plot all properties of mfi
                Plot("MoneyFlowIndex", "positivemoneyflow", _mfi.PositiveMoneyFlow);
                Plot("MoneyFlowIndex", "negativemoneyflow", _mfi.NegativeMoneyFlow);
                Plot("MoneyFlowIndex", "previoustypicalprice", _mfi.PreviousTypicalPrice);
            }
        }
    }
    class MoneyFlowIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mfi = MoneyFlowIndex(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._mfi.update(bar)
            if self._mfi.is_ready:
                # The current value of self._mfi is represented by self._mfi.current.value
                self.plot("MoneyFlowIndex", "mfi", self._mfi.current.value)
                # Plot all attributes of self._mfi
                self.plot("MoneyFlowIndex", "positive_money_flow", self._mfi.positive_money_flow.current.value)
                self.plot("MoneyFlowIndex", "negative_money_flow", self._mfi.negative_money_flow.current.value)
                self.plot("MoneyFlowIndex", "previous_typical_price", self._mfi.previous_typical_price)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MoneyFlowIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MoneyFlowIndex _mfi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _mfi = new MoneyFlowIndex(20);
            RegisterIndicator(_symbol, _mfi, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_mfi.IsReady)
            {
                // The current value of _mfi is represented by itself (_mfi)
                // or _mfi.Current.Value
                Plot("MoneyFlowIndex", "mfi", _mfi);
                // Plot all properties of mfi
                Plot("MoneyFlowIndex", "positivemoneyflow", _mfi.PositiveMoneyFlow);
                Plot("MoneyFlowIndex", "negativemoneyflow", _mfi.NegativeMoneyFlow);
            }
        }
    }
    class MoneyFlowIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._mfi = MoneyFlowIndex(20)
            self.register_indicator(self._symbol, self._mfi, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._mfi.is_ready:
                # The current value of self._mfi is represented by self._mfi.current.value
                self.plot("MoneyFlowIndex", "mfi", self._mfi.current.value)
                # Plot all attributes of self._mfi
                self.plot("MoneyFlowIndex", "positive_money_flow", self._mfi.positive_money_flow.current.value)
                self.plot("MoneyFlowIndex", "negative_money_flow", self._mfi.negative_money_flow.current.value)
    

    The following reference table describes the MoneyFlowIndex constructor:

    MoneyFlowIndex

    class QuantConnect.Indicators.MoneyFlowIndex [source]

    The Money Flow Index (MFI) is an oscillator that uses both price and volume to measure buying and selling pressure Typical Price = (High + Low + Close)/3 Money Flow = Typical Price x Volume Positive Money Flow = Sum of the money flows of all days where the typical price is greater than the previous day's typical price Negative Money Flow = Sum of the money flows of all days where the typical price is less than the previous day's typical price Money Flow Ratio = (14-period Positive Money Flow)/(14-period Negative Money Flow) Money Flow Index = 100 x Positive Money Flow / ( Positive Money Flow + Negative Money Flow)

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property negative_money_flow

    The sum of negative money flow to compute money flow ratio

    Returns:

    The sum of negative money flow to compute money flow ratio

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property positive_money_flow

    The sum of positive money flow to compute money flow ratio

    Returns:

    The sum of positive money flow to compute money flow ratio

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property previous_typical_price

    The current and previous typical price is used to determine positive or negative money flow

    Returns:

    The current and previous typical price is used to determine positive or negative money flow

    Return type:

    float

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MoneyFlowIndex

    class QuantConnect.Indicators.MoneyFlowIndex [source]

    The Money Flow Index (MFI) is an oscillator that uses both price and volume to measure buying and selling pressure Typical Price = (High + Low + Close)/3 Money Flow = Typical Price x Volume Positive Money Flow = Sum of the money flows of all days where the typical price is greater than the previous day's typical price Negative Money Flow = Sum of the money flows of all days where the typical price is less than the previous day's typical price Money Flow Ratio = (14-period Positive Money Flow)/(14-period Negative Money Flow) Money Flow Index = 100 x Positive Money Flow / ( Positive Money Flow + Negative Money Flow)

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property NegativeMoneyFlow

    The sum of negative money flow to compute money flow ratio

    Returns:

    The sum of negative money flow to compute money flow ratio

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property PositiveMoneyFlow

    The sum of positive money flow to compute money flow ratio

    Returns:

    The sum of positive money flow to compute money flow ratio

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property PreviousTypicalPrice

    The current and previous typical price is used to determine positive or negative money flow

    Returns:

    The current and previous typical price is used to determine positive or negative money flow

    Return type:

    decimal

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of MoneyFlowIndex using the plotly library.

    MoneyFlowIndex line plot.

     

    Supported Indicators

    Moving Average Convergence Divergence

    Introduction

    This indicator creates two moving averages defined on a base indicator and produces the difference between the fast and slow averages.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using MACD Indicator

    To create an automatic indicators for MovingAverageConvergenceDivergence , call the MACD helper method from the QCAlgorithm class. The MACD method creates a MovingAverageConvergenceDivergence object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class MovingAverageConvergenceDivergenceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MovingAverageConvergenceDivergence _macd;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _macd = MACD(_symbol, 12, 26, 9, MovingAverageType.Exponential);
        }
    
        public override void OnData(Slice data)
        {
            if (_macd.IsReady)
            {
                // The current value of _macd is represented by itself (_macd)
                // or _macd.Current.Value
                Plot("MovingAverageConvergenceDivergence", "macd", _macd);
                // Plot all properties of macd
                Plot("MovingAverageConvergenceDivergence", "fast", _macd.Fast);
                Plot("MovingAverageConvergenceDivergence", "slow", _macd.Slow);
                Plot("MovingAverageConvergenceDivergence", "signal", _macd.Signal);
                Plot("MovingAverageConvergenceDivergence", "histogram", _macd.Histogram);
            }
        }
    }
    class MovingAverageConvergenceDivergenceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._macd = self.macd(self._symbol, 12, 26, 9, MovingAverageType.Exponential)
    
        def on_data(self, slice: Slice) -> None:
            if self._macd.is_ready:
                # The current value of self._macd is represented by self._macd.current.value
                self.plot("MovingAverageConvergenceDivergence", "macd", self._macd.current.value)
                # Plot all attributes of self._macd
                self.plot("MovingAverageConvergenceDivergence", "fast", self._macd.fast.current.value)
                self.plot("MovingAverageConvergenceDivergence", "slow", self._macd.slow.current.value)
                self.plot("MovingAverageConvergenceDivergence", "signal", self._macd.signal.current.value)
                self.plot("MovingAverageConvergenceDivergence", "histogram", self._macd.histogram.current.value)
    

    The following reference table describes the MACD method:

    macd( symbol, fast_period, slow_period, signal_period, type=1, resolution=None, selector=None ) [source]

    Creates a MACD indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The moving average convergence divergence between the fast and slow averages

    Return type:

    MovingAverageConvergenceDivergence

    MACD( symbol, fastPeriod, slowPeriod, signalPeriod, type=1, resolution=None, selector=None ) [source]

    Creates a MACD indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The moving average convergence divergence between the fast and slow averages

    Return type:

    MovingAverageConvergenceDivergence

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a MovingAverageConvergenceDivergence indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class MovingAverageConvergenceDivergenceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MovingAverageConvergenceDivergence _macd;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _macd = new MovingAverageConvergenceDivergence(12, 26, 9, MovingAverageType.Exponential);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _macd.Update(bar.EndTime, bar.Close);
            }
       
            if (_macd.IsReady)
            {
                // The current value of _macd is represented by itself (_macd)
                // or _macd.Current.Value
                Plot("MovingAverageConvergenceDivergence", "macd", _macd);
                // Plot all properties of macd
                Plot("MovingAverageConvergenceDivergence", "fast", _macd.Fast);
                Plot("MovingAverageConvergenceDivergence", "slow", _macd.Slow);
                Plot("MovingAverageConvergenceDivergence", "signal", _macd.Signal);
                Plot("MovingAverageConvergenceDivergence", "histogram", _macd.Histogram);
            }
        }
    }
    class MovingAverageConvergenceDivergenceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._macd = MovingAverageConvergenceDivergence(12, 26, 9, MovingAverageType.Exponential)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._macd.update(bar.EndTime, bar.Close)
            if self._macd.is_ready:
                # The current value of self._macd is represented by self._macd.current.value
                self.plot("MovingAverageConvergenceDivergence", "macd", self._macd.current.value)
                # Plot all attributes of self._macd
                self.plot("MovingAverageConvergenceDivergence", "fast", self._macd.fast.current.value)
                self.plot("MovingAverageConvergenceDivergence", "slow", self._macd.slow.current.value)
                self.plot("MovingAverageConvergenceDivergence", "signal", self._macd.signal.current.value)
                self.plot("MovingAverageConvergenceDivergence", "histogram", self._macd.histogram.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class MovingAverageConvergenceDivergenceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private MovingAverageConvergenceDivergence _macd;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _macd = new MovingAverageConvergenceDivergence(12, 26, 9, MovingAverageType.Exponential);
            RegisterIndicator(_symbol, _macd, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_macd.IsReady)
            {
                // The current value of _macd is represented by itself (_macd)
                // or _macd.Current.Value
                Plot("MovingAverageConvergenceDivergence", "macd", _macd);
                // Plot all properties of macd
                Plot("MovingAverageConvergenceDivergence", "fast", _macd.Fast);
                Plot("MovingAverageConvergenceDivergence", "slow", _macd.Slow);
                Plot("MovingAverageConvergenceDivergence", "signal", _macd.Signal);
                Plot("MovingAverageConvergenceDivergence", "histogram", _macd.Histogram);
            }
        }
    }
    class MovingAverageConvergenceDivergenceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._macd = MovingAverageConvergenceDivergence(12, 26, 9, MovingAverageType.Exponential)
            self.register_indicator(self._symbol, self._macd, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._macd.is_ready:
                # The current value of self._macd is represented by self._macd.current.value
                self.plot("MovingAverageConvergenceDivergence", "macd", self._macd.current.value)
                # Plot all attributes of self._macd
                self.plot("MovingAverageConvergenceDivergence", "fast", self._macd.fast.current.value)
                self.plot("MovingAverageConvergenceDivergence", "slow", self._macd.slow.current.value)
                self.plot("MovingAverageConvergenceDivergence", "signal", self._macd.signal.current.value)
                self.plot("MovingAverageConvergenceDivergence", "histogram", self._macd.histogram.current.value)
    

    The following reference table describes the MovingAverageConvergenceDivergence constructor:

    MovingAverageConvergenceDivergence

    class QuantConnect.Indicators.MovingAverageConvergenceDivergence [source]

    This indicator creates two moving averages defined on a base indicator and produces the difference between the fast and slow averages.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property fast

    Gets the fast average indicator

    Returns:

    Gets the fast average indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property histogram

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Returns:

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property signal

    Gets the signal of the MACD

    Returns:

    Gets the signal of the MACD

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property slow

    Gets the slow average indicator

    Returns:

    Gets the slow average indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MovingAverageConvergenceDivergence

    class QuantConnect.Indicators.MovingAverageConvergenceDivergence [source]

    This indicator creates two moving averages defined on a base indicator and produces the difference between the fast and slow averages.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Fast

    Gets the fast average indicator

    Returns:

    Gets the fast average indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Histogram

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Returns:

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Signal

    Gets the signal of the MACD

    Returns:

    Gets the signal of the MACD

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Slow

    Gets the slow average indicator

    Returns:

    Gets the slow average indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of MovingAverageConvergenceDivergence using the plotly library.

    MovingAverageConvergenceDivergence line plot.

     

    Supported Indicators

    Normalized Average True Range

    Introduction

    This indicator computes the Normalized Average True Range (NATR). The Normalized Average True Range is calculated with the following formula: NATR = (ATR(period) / Close) * 100

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using NATR Indicator

    To create an automatic indicators for NormalizedAverageTrueRange , call the NATR helper method from the QCAlgorithm class. The NATR method creates a NormalizedAverageTrueRange object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class NormalizedAverageTrueRangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private NormalizedAverageTrueRange _natr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _natr = NATR(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_natr.IsReady)
            {
                // The current value of _natr is represented by itself (_natr)
                // or _natr.Current.Value
                Plot("NormalizedAverageTrueRange", "natr", _natr);
                
            }
        }
    }
    class NormalizedAverageTrueRangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._natr = self.natr(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._natr.is_ready:
                # The current value of self._natr is represented by self._natr.current.value
                self.plot("NormalizedAverageTrueRange", "natr", self._natr.current.value)
                
    

    The following reference table describes the NATR method:

    natr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new NormalizedAverageTrueRange indicator.

    Parameters:
    Returns:

    The NormalizedAverageTrueRange indicator for the requested symbol over the specified period

    Return type:

    NormalizedAverageTrueRange

    NATR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new NormalizedAverageTrueRange indicator.

    Parameters:
    Returns:

    The NormalizedAverageTrueRange indicator for the requested symbol over the specified period

    Return type:

    NormalizedAverageTrueRange

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a NormalizedAverageTrueRange indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class NormalizedAverageTrueRangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private NormalizedAverageTrueRange _natr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _natr = new NormalizedAverageTrueRange(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _natr.Update(bar);
            }
       
            if (_natr.IsReady)
            {
                // The current value of _natr is represented by itself (_natr)
                // or _natr.Current.Value
                Plot("NormalizedAverageTrueRange", "natr", _natr);
                
            }
        }
    }
    class NormalizedAverageTrueRangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._natr = NormalizedAverageTrueRange(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._natr.update(bar)
            if self._natr.is_ready:
                # The current value of self._natr is represented by self._natr.current.value
                self.plot("NormalizedAverageTrueRange", "natr", self._natr.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class NormalizedAverageTrueRangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private NormalizedAverageTrueRange _natr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _natr = new NormalizedAverageTrueRange(20);
            RegisterIndicator(_symbol, _natr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_natr.IsReady)
            {
                // The current value of _natr is represented by itself (_natr)
                // or _natr.Current.Value
                Plot("NormalizedAverageTrueRange", "natr", _natr);
                
            }
        }
    }
    class NormalizedAverageTrueRangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._natr = NormalizedAverageTrueRange(20)
            self.register_indicator(self._symbol, self._natr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._natr.is_ready:
                # The current value of self._natr is represented by self._natr.current.value
                self.plot("NormalizedAverageTrueRange", "natr", self._natr.current.value)
                
    

    The following reference table describes the NormalizedAverageTrueRange constructor:

    NormalizedAverageTrueRange

    class QuantConnect.Indicators.NormalizedAverageTrueRange [source]

    This indicator computes the Normalized Average True Range (NATR). The Normalized Average True Range is calculated with the following formula: NATR = (ATR(period) / Close) * 100

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    NormalizedAverageTrueRange

    class QuantConnect.Indicators.NormalizedAverageTrueRange [source]

    This indicator computes the Normalized Average True Range (NATR). The Normalized Average True Range is calculated with the following formula: NATR = (ATR(period) / Close) * 100

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of NormalizedAverageTrueRange using the plotly library.

    NormalizedAverageTrueRange line plot.

     

    Supported Indicators

    On Balance Volume

    Introduction

    This indicator computes the On Balance Volume (OBV). The On Balance Volume is calculated by determining the price of the current close price and previous close price. If the current close price is equivalent to the previous price the OBV remains the same, If the current close price is higher the volume of that day is added to the OBV, while a lower close price will result in negative value.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using OBV Indicator

    To create an automatic indicators for OnBalanceVolume , call the OBV helper method from the QCAlgorithm class. The OBV method creates a OnBalanceVolume object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class OnBalanceVolumeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private OnBalanceVolume _obv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _obv = OBV(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_obv.IsReady)
            {
                // The current value of _obv is represented by itself (_obv)
                // or _obv.Current.Value
                Plot("OnBalanceVolume", "obv", _obv);
                
            }
        }
    }
    class OnBalanceVolumeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._obv = self.obv(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._obv.is_ready:
                # The current value of self._obv is represented by self._obv.current.value
                self.plot("OnBalanceVolume", "obv", self._obv.current.value)
                
    

    The following reference table describes the OBV method:

    obv( symbol, resolution=None, selector=None ) [source]

    Creates a new On Balance Volume indicator. This will compute the cumulative total volume based on whether the close price being higher or lower than the previous period. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The On Balance Volume indicator for the requested symbol.

    Return type:

    OnBalanceVolume

    OBV( symbol, resolution=None, selector=None ) [source]

    Creates a new On Balance Volume indicator. This will compute the cumulative total volume based on whether the close price being higher or lower than the previous period. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The On Balance Volume indicator for the requested symbol.

    Return type:

    OnBalanceVolume

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a OnBalanceVolume indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class OnBalanceVolumeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private OnBalanceVolume _obv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _obv = new OnBalanceVolume();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _obv.Update(bar);
            }
       
            if (_obv.IsReady)
            {
                // The current value of _obv is represented by itself (_obv)
                // or _obv.Current.Value
                Plot("OnBalanceVolume", "obv", _obv);
                
            }
        }
    }
    class OnBalanceVolumeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._obv = OnBalanceVolume()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._obv.update(bar)
            if self._obv.is_ready:
                # The current value of self._obv is represented by self._obv.current.value
                self.plot("OnBalanceVolume", "obv", self._obv.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class OnBalanceVolumeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private OnBalanceVolume _obv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _obv = new OnBalanceVolume();
            RegisterIndicator(_symbol, _obv, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_obv.IsReady)
            {
                // The current value of _obv is represented by itself (_obv)
                // or _obv.Current.Value
                Plot("OnBalanceVolume", "obv", _obv);
                
            }
        }
    }
    class OnBalanceVolumeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._obv = OnBalanceVolume()
            self.register_indicator(self._symbol, self._obv, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._obv.is_ready:
                # The current value of self._obv is represented by self._obv.current.value
                self.plot("OnBalanceVolume", "obv", self._obv.current.value)
                
    

    The following reference table describes the OnBalanceVolume constructor:

    OnBalanceVolume

    class QuantConnect.Indicators.OnBalanceVolume [source]

    This indicator computes the On Balance Volume (OBV). The On Balance Volume is calculated by determining the price of the current close price and previous close price. If the current close price is equivalent to the previous price the OBV remains the same, If the current close price is higher the volume of that day is added to the OBV, while a lower close price will result in negative value.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    OnBalanceVolume

    class QuantConnect.Indicators.OnBalanceVolume [source]

    This indicator computes the On Balance Volume (OBV). The On Balance Volume is calculated by determining the price of the current close price and previous close price. If the current close price is equivalent to the previous price the OBV remains the same, If the current close price is higher the volume of that day is added to the OBV, while a lower close price will result in negative value.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of OnBalanceVolume using the plotly library.

    OnBalanceVolume line plot.

     

    Supported Indicators

    Parabolic Stop And Reverse

    Introduction

    Parabolic SAR Indicator Based on TA-Lib implementation

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using PSAR Indicator

    To create an automatic indicators for ParabolicStopAndReverse , call the PSAR helper method from the QCAlgorithm class. The PSAR method creates a ParabolicStopAndReverse object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ParabolicStopAndReverseAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ParabolicStopAndReverse _psar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _psar = PSAR(_symbol, 0.02, 0.02, 0.2);
        }
    
        public override void OnData(Slice data)
        {
            if (_psar.IsReady)
            {
                // The current value of _psar is represented by itself (_psar)
                // or _psar.Current.Value
                Plot("ParabolicStopAndReverse", "psar", _psar);
                
            }
        }
    }
    class ParabolicStopAndReverseAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._psar = self.psar(self._symbol, 0.02, 0.02, 0.2)
    
        def on_data(self, slice: Slice) -> None:
            if self._psar.is_ready:
                # The current value of self._psar is represented by self._psar.current.value
                self.plot("ParabolicStopAndReverse", "psar", self._psar.current.value)
                
    

    The following reference table describes the PSAR method:

    psar( symbol, af_start=0.02, af_increment=0.02, af_max=0.2, resolution=None, selector=None ) [source]

    Creates a new Parabolic SAR indicator

    Parameters:
    Returns:

    A ParabolicStopAndReverse configured with the specified periods

    Return type:

    ParabolicStopAndReverse

    PSAR( symbol, afStart=0.02, afIncrement=0.02, afMax=0.2, resolution=None, selector=None ) [source]

    Creates a new Parabolic SAR indicator

    Parameters:
    Returns:

    A ParabolicStopAndReverse configured with the specified periods

    Return type:

    ParabolicStopAndReverse

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ParabolicStopAndReverse indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class ParabolicStopAndReverseAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ParabolicStopAndReverse _psar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _psar = new ParabolicStopAndReverse(0.02, 0.02, 0.2);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _psar.Update(bar);
            }
       
            if (_psar.IsReady)
            {
                // The current value of _psar is represented by itself (_psar)
                // or _psar.Current.Value
                Plot("ParabolicStopAndReverse", "psar", _psar);
                
            }
        }
    }
    class ParabolicStopAndReverseAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._psar = ParabolicStopAndReverse(0.02, 0.02, 0.2)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._psar.update(bar)
            if self._psar.is_ready:
                # The current value of self._psar is represented by self._psar.current.value
                self.plot("ParabolicStopAndReverse", "psar", self._psar.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ParabolicStopAndReverseAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ParabolicStopAndReverse _psar;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _psar = new ParabolicStopAndReverse(0.02, 0.02, 0.2);
            RegisterIndicator(_symbol, _psar, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_psar.IsReady)
            {
                // The current value of _psar is represented by itself (_psar)
                // or _psar.Current.Value
                Plot("ParabolicStopAndReverse", "psar", _psar);
                
            }
        }
    }
    class ParabolicStopAndReverseAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._psar = ParabolicStopAndReverse(0.02, 0.02, 0.2)
            self.register_indicator(self._symbol, self._psar, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._psar.is_ready:
                # The current value of self._psar is represented by self._psar.current.value
                self.plot("ParabolicStopAndReverse", "psar", self._psar.current.value)
                
    

    The following reference table describes the ParabolicStopAndReverse constructor:

    ParabolicStopAndReverse

    class QuantConnect.Indicators.ParabolicStopAndReverse [source]

    Parabolic SAR Indicator Based on TA-Lib implementation

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ParabolicStopAndReverse

    class QuantConnect.Indicators.ParabolicStopAndReverse [source]

    Parabolic SAR Indicator Based on TA-Lib implementation

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of ParabolicStopAndReverse using the plotly library.

    ParabolicStopAndReverse line plot.

     

    Supported Indicators

    Percentage Price Oscillator

    Introduction

    This indicator computes the Percentage Price Oscillator (PPO) The Percentage Price Oscillator is calculated using the following formula: PPO[i] = 100 * (FastMA[i] - SlowMA[i]) / SlowMA[i]

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using PPO Indicator

    To create an automatic indicators for PercentagePriceOscillator , call the PPO helper method from the QCAlgorithm class. The PPO method creates a PercentagePriceOscillator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class PercentagePriceOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private PercentagePriceOscillator _ppo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ppo = PPO(_symbol, 10, 20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (_ppo.IsReady)
            {
                // The current value of _ppo is represented by itself (_ppo)
                // or _ppo.Current.Value
                Plot("PercentagePriceOscillator", "ppo", _ppo);
                // Plot all properties of ppo
                Plot("PercentagePriceOscillator", "fast", _ppo.Fast);
                Plot("PercentagePriceOscillator", "slow", _ppo.Slow);
                Plot("PercentagePriceOscillator", "signal", _ppo.Signal);
                Plot("PercentagePriceOscillator", "histogram", _ppo.Histogram);
            }
        }
    }
    class PercentagePriceOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ppo = self.ppo(self._symbol, 10, 20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            if self._ppo.is_ready:
                # The current value of self._ppo is represented by self._ppo.current.value
                self.plot("PercentagePriceOscillator", "ppo", self._ppo.current.value)
                # Plot all attributes of self._ppo
                self.plot("PercentagePriceOscillator", "fast", self._ppo.fast.current.value)
                self.plot("PercentagePriceOscillator", "slow", self._ppo.slow.current.value)
                self.plot("PercentagePriceOscillator", "signal", self._ppo.signal.current.value)
                self.plot("PercentagePriceOscillator", "histogram", self._ppo.histogram.current.value)
    

    The following reference table describes the PPO method:

    ppo( symbol, fast_period, slow_period, moving_average_type, resolution=None, selector=None ) [source]

    Creates a new PercentagePriceOscillator indicator.

    Parameters:
    Returns:

    The PercentagePriceOscillator indicator for the requested symbol over the specified period

    Return type:

    PercentagePriceOscillator

    PPO( symbol, fastPeriod, slowPeriod, movingAverageType, resolution=None, selector=None ) [source]

    Creates a new PercentagePriceOscillator indicator.

    Parameters:
    Returns:

    The PercentagePriceOscillator indicator for the requested symbol over the specified period

    Return type:

    PercentagePriceOscillator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a PercentagePriceOscillator indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class PercentagePriceOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private PercentagePriceOscillator _ppo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ppo = new PercentagePriceOscillator(10, 20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _ppo.Update(bar.EndTime, bar.Close);
            }
       
            if (_ppo.IsReady)
            {
                // The current value of _ppo is represented by itself (_ppo)
                // or _ppo.Current.Value
                Plot("PercentagePriceOscillator", "ppo", _ppo);
                // Plot all properties of ppo
                Plot("PercentagePriceOscillator", "fast", _ppo.Fast);
                Plot("PercentagePriceOscillator", "slow", _ppo.Slow);
                Plot("PercentagePriceOscillator", "signal", _ppo.Signal);
                Plot("PercentagePriceOscillator", "histogram", _ppo.Histogram);
            }
        }
    }
    class PercentagePriceOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ppo = PercentagePriceOscillator(10, 20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._ppo.update(bar.EndTime, bar.Close)
            if self._ppo.is_ready:
                # The current value of self._ppo is represented by self._ppo.current.value
                self.plot("PercentagePriceOscillator", "ppo", self._ppo.current.value)
                # Plot all attributes of self._ppo
                self.plot("PercentagePriceOscillator", "fast", self._ppo.fast.current.value)
                self.plot("PercentagePriceOscillator", "slow", self._ppo.slow.current.value)
                self.plot("PercentagePriceOscillator", "signal", self._ppo.signal.current.value)
                self.plot("PercentagePriceOscillator", "histogram", self._ppo.histogram.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class PercentagePriceOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private PercentagePriceOscillator _ppo;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ppo = new PercentagePriceOscillator(10, 20, MovingAverageType.Simple);
            RegisterIndicator(_symbol, _ppo, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_ppo.IsReady)
            {
                // The current value of _ppo is represented by itself (_ppo)
                // or _ppo.Current.Value
                Plot("PercentagePriceOscillator", "ppo", _ppo);
                // Plot all properties of ppo
                Plot("PercentagePriceOscillator", "fast", _ppo.Fast);
                Plot("PercentagePriceOscillator", "slow", _ppo.Slow);
                Plot("PercentagePriceOscillator", "signal", _ppo.Signal);
                Plot("PercentagePriceOscillator", "histogram", _ppo.Histogram);
            }
        }
    }
    class PercentagePriceOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ppo = PercentagePriceOscillator(10, 20, MovingAverageType.Simple)
            self.register_indicator(self._symbol, self._ppo, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._ppo.is_ready:
                # The current value of self._ppo is represented by self._ppo.current.value
                self.plot("PercentagePriceOscillator", "ppo", self._ppo.current.value)
                # Plot all attributes of self._ppo
                self.plot("PercentagePriceOscillator", "fast", self._ppo.fast.current.value)
                self.plot("PercentagePriceOscillator", "slow", self._ppo.slow.current.value)
                self.plot("PercentagePriceOscillator", "signal", self._ppo.signal.current.value)
                self.plot("PercentagePriceOscillator", "histogram", self._ppo.histogram.current.value)
    

    The following reference table describes the PercentagePriceOscillator constructor:

    PercentagePriceOscillator

    class QuantConnect.Indicators.PercentagePriceOscillator [source]

    This indicator computes the Percentage Price Oscillator (PPO) The Percentage Price Oscillator is calculated using the following formula: PPO[i] = 100 * (FastMA[i] - SlowMA[i]) / SlowMA[i]

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property fast

    Gets the fast average indicator

    Returns:

    Gets the fast average indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property histogram

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Returns:

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property signal

    Gets the signal of the MACD

    Returns:

    Gets the signal of the MACD

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property slow

    Gets the slow average indicator

    Returns:

    Gets the slow average indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    PercentagePriceOscillator

    class QuantConnect.Indicators.PercentagePriceOscillator [source]

    This indicator computes the Percentage Price Oscillator (PPO) The Percentage Price Oscillator is calculated using the following formula: PPO[i] = 100 * (FastMA[i] - SlowMA[i]) / SlowMA[i]

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Fast

    Gets the fast average indicator

    Returns:

    Gets the fast average indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Histogram

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Returns:

    Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Signal

    Gets the signal of the MACD

    Returns:

    Gets the signal of the MACD

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Slow

    Gets the slow average indicator

    Returns:

    Gets the slow average indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of PercentagePriceOscillator using the plotly library.

    PercentagePriceOscillator line plot.

     

    Supported Indicators

    Pivot Points High Low

    Introduction

    Pivot Points (High/Low), also known as Bar Count Reversals, indicator. https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/pivot-points-high-low

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using PPHL Indicator

    To create an automatic indicators for PivotPointsHighLow , call the PPHL helper method from the QCAlgorithm class. The PPHL method creates a PivotPointsHighLow object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class PivotPointsHighLowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private PivotPointsHighLow _pphl;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _pphl = PPHL(_symbol, 10, 10, 100);
        }
    
        public override void OnData(Slice data)
        {
            if (_pphl.IsReady)
            {
                // The current value of _pphl is represented by itself (_pphl)
                // or _pphl.Current.Value
                Plot("PivotPointsHighLow", "pphl", _pphl);
                
            }
        }
    }
    class PivotPointsHighLowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._pphl = self.pphl(self._symbol, 10, 10, 100)
    
        def on_data(self, slice: Slice) -> None:
            if self._pphl.is_ready:
                # The current value of self._pphl is represented by self._pphl.current.value
                self.plot("PivotPointsHighLow", "pphl", self._pphl.current.value)
                
    

    The following reference table describes the PPHL method:

    pphl( symbol, length_high, length_low, last_stored_values=100, resolution=None, selector=None ) [source]

    Creates a new PivotPointsHighLow indicator

    Parameters:
    Returns:

    The PivotPointsHighLow indicator for the requested symbol.

    Return type:

    PivotPointsHighLow

    PPHL( symbol, lengthHigh, lengthLow, lastStoredValues=100, resolution=None, selector=None ) [source]

    Creates a new PivotPointsHighLow indicator

    Parameters:
    Returns:

    The PivotPointsHighLow indicator for the requested symbol.

    Return type:

    PivotPointsHighLow

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a PivotPointsHighLow indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class PivotPointsHighLowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private PivotPointsHighLow _pphl;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _pphl = new PivotPointsHighLow(10, 10, 100);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _pphl.Update(bar.EndTime, bar.Close);
            }
       
            if (_pphl.IsReady)
            {
                // The current value of _pphl is represented by itself (_pphl)
                // or _pphl.Current.Value
                Plot("PivotPointsHighLow", "pphl", _pphl);
                
            }
        }
    }
    class PivotPointsHighLowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._pphl = PivotPointsHighLow(10, 10, 100)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._pphl.update(bar.EndTime, bar.Close)
            if self._pphl.is_ready:
                # The current value of self._pphl is represented by self._pphl.current.value
                self.plot("PivotPointsHighLow", "pphl", self._pphl.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class PivotPointsHighLowAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private PivotPointsHighLow _pphl;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _pphl = new PivotPointsHighLow(10, 10, 100);
            RegisterIndicator(_symbol, _pphl, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_pphl.IsReady)
            {
                // The current value of _pphl is represented by itself (_pphl)
                // or _pphl.Current.Value
                Plot("PivotPointsHighLow", "pphl", _pphl);
                
            }
        }
    }
    class PivotPointsHighLowAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._pphl = PivotPointsHighLow(10, 10, 100)
            self.register_indicator(self._symbol, self._pphl, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._pphl.is_ready:
                # The current value of self._pphl is represented by self._pphl.current.value
                self.plot("PivotPointsHighLow", "pphl", self._pphl.current.value)
                
    

    The following reference table describes the PivotPointsHighLow constructor:

    PivotPointsHighLow

    class QuantConnect.Indicators.PivotPointsHighLow [source]

    Pivot Points (High/Low), also known as Bar Count Reversals, indicator. https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/pivot-points-high-low

    get_all_pivot_points_array()

    Get all pivot points, in the order such that first element in collection is the nearest to the present date

    Return type:

    PivotPoint[]

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    get_high_pivot_points_array()

    Get current high pivot points, in the order such that first element in collection is the nearest to the present date

    Return type:

    PivotPoint[]

    get_low_pivot_points_array()

    Get current low pivot points, in the order such that first element in collection is the nearest to the present date

    Return type:

    PivotPoint[]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    PivotPointsHighLow

    class QuantConnect.Indicators.PivotPointsHighLow [source]

    Pivot Points (High/Low), also known as Bar Count Reversals, indicator. https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/pivot-points-high-low

    GetAllPivotPointsArray()

    Get all pivot points, in the order such that first element in collection is the nearest to the present date

    Return type:

    PivotPoint[]

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    GetHighPivotPointsArray()

    Get current high pivot points, in the order such that first element in collection is the nearest to the present date

    Return type:

    PivotPoint[]

    GetLowPivotPointsArray()

    Get current low pivot points, in the order such that first element in collection is the nearest to the present date

    Return type:

    PivotPoint[]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of PivotPointsHighLow using the plotly library.

    PivotPointsHighLow line plot.

     

    Supported Indicators

    Rate Of Change

    Introduction

    This indicator computes the n-period rate of change in a value using the following: (value_0 - value_n) / value_n

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ROC Indicator

    To create an automatic indicators for RateOfChange , call the ROC helper method from the QCAlgorithm class. The ROC method creates a RateOfChange object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RateOfChangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RateOfChange _roc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _roc = ROC(_symbol, 10);
        }
    
        public override void OnData(Slice data)
        {
            if (_roc.IsReady)
            {
                // The current value of _roc is represented by itself (_roc)
                // or _roc.Current.Value
                Plot("RateOfChange", "roc", _roc);
                
            }
        }
    }
    class RateOfChangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._roc = self.roc(self._symbol, 10)
    
        def on_data(self, slice: Slice) -> None:
            if self._roc.is_ready:
                # The current value of self._roc is represented by self._roc.current.value
                self.plot("RateOfChange", "roc", self._roc.current.value)
                
    

    The following reference table describes the ROC method:

    roc( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChange indicator. This will compute the n-period rate of change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The RateOfChange indicator for the requested symbol over the specified period

    Return type:

    RateOfChange

    ROC( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChange indicator. This will compute the n-period rate of change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The RateOfChange indicator for the requested symbol over the specified period

    Return type:

    RateOfChange

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a RateOfChange indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class RateOfChangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RateOfChange _roc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _roc = new RateOfChange(10);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _roc.Update(bar.EndTime, bar.Close);
            }
       
            if (_roc.IsReady)
            {
                // The current value of _roc is represented by itself (_roc)
                // or _roc.Current.Value
                Plot("RateOfChange", "roc", _roc);
                
            }
        }
    }
    class RateOfChangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._roc = RateOfChange(10)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._roc.update(bar.EndTime, bar.Close)
            if self._roc.is_ready:
                # The current value of self._roc is represented by self._roc.current.value
                self.plot("RateOfChange", "roc", self._roc.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RateOfChangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RateOfChange _roc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _roc = new RateOfChange(10);
            RegisterIndicator(_symbol, _roc, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_roc.IsReady)
            {
                // The current value of _roc is represented by itself (_roc)
                // or _roc.Current.Value
                Plot("RateOfChange", "roc", _roc);
                
            }
        }
    }
    class RateOfChangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._roc = RateOfChange(10)
            self.register_indicator(self._symbol, self._roc, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._roc.is_ready:
                # The current value of self._roc is represented by self._roc.current.value
                self.plot("RateOfChange", "roc", self._roc.current.value)
                
    

    The following reference table describes the RateOfChange constructor:

    RateOfChange

    class QuantConnect.Indicators.RateOfChange [source]

    This indicator computes the n-period rate of change in a value using the following: (value_0 - value_n) / value_n

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RateOfChange

    class QuantConnect.Indicators.RateOfChange [source]

    This indicator computes the n-period rate of change in a value using the following: (value_0 - value_n) / value_n

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of RateOfChange using the plotly library.

    RateOfChange line plot.

     

    Supported Indicators

    Rate Of Change Percent

    Introduction

    This indicator computes the n-period percentage rate of change in a value using the following: 100 * (value_0 - value_n) / value_n

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ROCP Indicator

    To create an automatic indicators for RateOfChangePercent , call the ROCP helper method from the QCAlgorithm class. The ROCP method creates a RateOfChangePercent object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RateOfChangePercentAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RateOfChangePercent _rocp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rocp = ROCP(_symbol, 10);
        }
    
        public override void OnData(Slice data)
        {
            if (_rocp.IsReady)
            {
                // The current value of _rocp is represented by itself (_rocp)
                // or _rocp.Current.Value
                Plot("RateOfChangePercent", "rocp", _rocp);
                
            }
        }
    }
    class RateOfChangePercentAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rocp = self.rocp(self._symbol, 10)
    
        def on_data(self, slice: Slice) -> None:
            if self._rocp.is_ready:
                # The current value of self._rocp is represented by self._rocp.current.value
                self.plot("RateOfChangePercent", "rocp", self._rocp.current.value)
                
    

    The following reference table describes the ROCP method:

    rocp( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChangePercent indicator. This will compute the n-period percentage rate of change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The RateOfChangePercent indicator for the requested symbol over the specified period

    Return type:

    RateOfChangePercent

    ROCP( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChangePercent indicator. This will compute the n-period percentage rate of change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The RateOfChangePercent indicator for the requested symbol over the specified period

    Return type:

    RateOfChangePercent

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a RateOfChangePercent indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class RateOfChangePercentAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RateOfChangePercent _rocp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rocp = new RateOfChangePercent(10);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _rocp.Update(bar.EndTime, bar.Close);
            }
       
            if (_rocp.IsReady)
            {
                // The current value of _rocp is represented by itself (_rocp)
                // or _rocp.Current.Value
                Plot("RateOfChangePercent", "rocp", _rocp);
                
            }
        }
    }
    class RateOfChangePercentAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rocp = RateOfChangePercent(10)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._rocp.update(bar.EndTime, bar.Close)
            if self._rocp.is_ready:
                # The current value of self._rocp is represented by self._rocp.current.value
                self.plot("RateOfChangePercent", "rocp", self._rocp.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RateOfChangePercentAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RateOfChangePercent _rocp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rocp = new RateOfChangePercent(10);
            RegisterIndicator(_symbol, _rocp, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_rocp.IsReady)
            {
                // The current value of _rocp is represented by itself (_rocp)
                // or _rocp.Current.Value
                Plot("RateOfChangePercent", "rocp", _rocp);
                
            }
        }
    }
    class RateOfChangePercentAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rocp = RateOfChangePercent(10)
            self.register_indicator(self._symbol, self._rocp, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._rocp.is_ready:
                # The current value of self._rocp is represented by self._rocp.current.value
                self.plot("RateOfChangePercent", "rocp", self._rocp.current.value)
                
    

    The following reference table describes the RateOfChangePercent constructor:

    RateOfChangePercent

    class QuantConnect.Indicators.RateOfChangePercent [source]

    This indicator computes the n-period percentage rate of change in a value using the following: 100 * (value_0 - value_n) / value_n

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RateOfChangePercent

    class QuantConnect.Indicators.RateOfChangePercent [source]

    This indicator computes the n-period percentage rate of change in a value using the following: 100 * (value_0 - value_n) / value_n

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of RateOfChangePercent using the plotly library.

    RateOfChangePercent line plot.

     

    Supported Indicators

    Rate Of Change Ratio

    Introduction

    This indicator computes the Rate Of Change Ratio (ROCR). The Rate Of Change Ratio is calculated with the following formula: ROCR = price / prevPrice

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ROCR Indicator

    To create an automatic indicators for RateOfChangeRatio , call the ROCR helper method from the QCAlgorithm class. The ROCR method creates a RateOfChangeRatio object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RateOfChangeRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RateOfChangeRatio _rocr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rocr = ROCR(_symbol, 10);
        }
    
        public override void OnData(Slice data)
        {
            if (_rocr.IsReady)
            {
                // The current value of _rocr is represented by itself (_rocr)
                // or _rocr.Current.Value
                Plot("RateOfChangeRatio", "rocr", _rocr);
                
            }
        }
    }
    class RateOfChangeRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rocr = self.rocr(self._symbol, 10)
    
        def on_data(self, slice: Slice) -> None:
            if self._rocr.is_ready:
                # The current value of self._rocr is represented by self._rocr.current.value
                self.plot("RateOfChangeRatio", "rocr", self._rocr.current.value)
                
    

    The following reference table describes the ROCR method:

    rocr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChangeRatio indicator.

    Parameters:
    Returns:

    The RateOfChangeRatio indicator for the requested symbol over the specified period

    Return type:

    RateOfChangeRatio

    ROCR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChangeRatio indicator.

    Parameters:
    Returns:

    The RateOfChangeRatio indicator for the requested symbol over the specified period

    Return type:

    RateOfChangeRatio

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a RateOfChangeRatio indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class RateOfChangeRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RateOfChangeRatio _rocr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rocr = new RateOfChangeRatio(10);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _rocr.Update(bar.EndTime, bar.Close);
            }
       
            if (_rocr.IsReady)
            {
                // The current value of _rocr is represented by itself (_rocr)
                // or _rocr.Current.Value
                Plot("RateOfChangeRatio", "rocr", _rocr);
                
            }
        }
    }
    class RateOfChangeRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rocr = RateOfChangeRatio(10)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._rocr.update(bar.EndTime, bar.Close)
            if self._rocr.is_ready:
                # The current value of self._rocr is represented by self._rocr.current.value
                self.plot("RateOfChangeRatio", "rocr", self._rocr.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RateOfChangeRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RateOfChangeRatio _rocr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rocr = new RateOfChangeRatio(10);
            RegisterIndicator(_symbol, _rocr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_rocr.IsReady)
            {
                // The current value of _rocr is represented by itself (_rocr)
                // or _rocr.Current.Value
                Plot("RateOfChangeRatio", "rocr", _rocr);
                
            }
        }
    }
    class RateOfChangeRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rocr = RateOfChangeRatio(10)
            self.register_indicator(self._symbol, self._rocr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._rocr.is_ready:
                # The current value of self._rocr is represented by self._rocr.current.value
                self.plot("RateOfChangeRatio", "rocr", self._rocr.current.value)
                
    

    The following reference table describes the RateOfChangeRatio constructor:

    RateOfChangeRatio

    class QuantConnect.Indicators.RateOfChangeRatio [source]

    This indicator computes the Rate Of Change Ratio (ROCR). The Rate Of Change Ratio is calculated with the following formula: ROCR = price / prevPrice

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RateOfChangeRatio

    class QuantConnect.Indicators.RateOfChangeRatio [source]

    This indicator computes the Rate Of Change Ratio (ROCR). The Rate Of Change Ratio is calculated with the following formula: ROCR = price / prevPrice

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of RateOfChangeRatio using the plotly library.

    RateOfChangeRatio line plot.

     

    Supported Indicators

    Regression Channel

    Introduction

    The Regression Channel indicator extends the with the inclusion of two (upper and lower) channel lines that are distanced from the linear regression line by a user defined number of standard deviations. Reference: http://www.onlinetradingconcepts.com/TechnicalAnalysis/LinRegChannel.html

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using RC Indicator

    To create an automatic indicators for RegressionChannel , call the RC helper method from the QCAlgorithm class. The RC method creates a RegressionChannel object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RegressionChannelAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RegressionChannel _rc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rc = RC(_symbol, 20, 2);
        }
    
        public override void OnData(Slice data)
        {
            if (_rc.IsReady)
            {
                // The current value of _rc is represented by itself (_rc)
                // or _rc.Current.Value
                Plot("RegressionChannel", "rc", _rc);
                // Plot all properties of rc
                Plot("RegressionChannel", "linearregression", _rc.LinearRegression);
                Plot("RegressionChannel", "upperchannel", _rc.UpperChannel);
                Plot("RegressionChannel", "lowerchannel", _rc.LowerChannel);
                Plot("RegressionChannel", "intercept", _rc.Intercept);
                Plot("RegressionChannel", "slope", _rc.Slope);
            }
        }
    }
    class RegressionChannelAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rc = self.rc(self._symbol, 20, 2)
    
        def on_data(self, slice: Slice) -> None:
            if self._rc.is_ready:
                # The current value of self._rc is represented by self._rc.current.value
                self.plot("RegressionChannel", "rc", self._rc.current.value)
                # Plot all attributes of self._rc
                self.plot("RegressionChannel", "linear_regression", self._rc.linear_regression.current.value)
                self.plot("RegressionChannel", "upper_channel", self._rc.upper_channel.current.value)
                self.plot("RegressionChannel", "lower_channel", self._rc.lower_channel.current.value)
                self.plot("RegressionChannel", "intercept", self._rc.intercept.current.value)
                self.plot("RegressionChannel", "slope", self._rc.slope.current.value)
    

    The following reference table describes the RC method:

    rc( symbol, period, k, resolution=None, selector=None ) [source]

    Creates a new RegressionChannel indicator which will compute the LinearRegression, UpperChannel and LowerChannel lines, the intercept and slope

    Parameters:
    Returns:

    A Regression Channel configured with the specified period and number of standard deviation

    Return type:

    RegressionChannel

    RC( symbol, period, k, resolution=None, selector=None ) [source]

    Creates a new RegressionChannel indicator which will compute the LinearRegression, UpperChannel and LowerChannel lines, the intercept and slope

    Parameters:
    Returns:

    A Regression Channel configured with the specified period and number of standard deviation

    Return type:

    RegressionChannel

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a RegressionChannel indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class RegressionChannelAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RegressionChannel _rc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rc = new RegressionChannel(20, 2);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _rc.Update(bar.EndTime, bar.Close);
            }
       
            if (_rc.IsReady)
            {
                // The current value of _rc is represented by itself (_rc)
                // or _rc.Current.Value
                Plot("RegressionChannel", "rc", _rc);
                // Plot all properties of rc
                Plot("RegressionChannel", "linearregression", _rc.LinearRegression);
                Plot("RegressionChannel", "upperchannel", _rc.UpperChannel);
                Plot("RegressionChannel", "lowerchannel", _rc.LowerChannel);
                Plot("RegressionChannel", "intercept", _rc.Intercept);
                Plot("RegressionChannel", "slope", _rc.Slope);
            }
        }
    }
    class RegressionChannelAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rc = RegressionChannel(20, 2)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._rc.update(bar.EndTime, bar.Close)
            if self._rc.is_ready:
                # The current value of self._rc is represented by self._rc.current.value
                self.plot("RegressionChannel", "rc", self._rc.current.value)
                # Plot all attributes of self._rc
                self.plot("RegressionChannel", "linear_regression", self._rc.linear_regression.current.value)
                self.plot("RegressionChannel", "upper_channel", self._rc.upper_channel.current.value)
                self.plot("RegressionChannel", "lower_channel", self._rc.lower_channel.current.value)
                self.plot("RegressionChannel", "intercept", self._rc.intercept.current.value)
                self.plot("RegressionChannel", "slope", self._rc.slope.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RegressionChannelAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RegressionChannel _rc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rc = new RegressionChannel(20, 2);
            RegisterIndicator(_symbol, _rc, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_rc.IsReady)
            {
                // The current value of _rc is represented by itself (_rc)
                // or _rc.Current.Value
                Plot("RegressionChannel", "rc", _rc);
                // Plot all properties of rc
                Plot("RegressionChannel", "linearregression", _rc.LinearRegression);
                Plot("RegressionChannel", "upperchannel", _rc.UpperChannel);
                Plot("RegressionChannel", "lowerchannel", _rc.LowerChannel);
                Plot("RegressionChannel", "intercept", _rc.Intercept);
                Plot("RegressionChannel", "slope", _rc.Slope);
            }
        }
    }
    class RegressionChannelAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rc = RegressionChannel(20, 2)
            self.register_indicator(self._symbol, self._rc, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._rc.is_ready:
                # The current value of self._rc is represented by self._rc.current.value
                self.plot("RegressionChannel", "rc", self._rc.current.value)
                # Plot all attributes of self._rc
                self.plot("RegressionChannel", "linear_regression", self._rc.linear_regression.current.value)
                self.plot("RegressionChannel", "upper_channel", self._rc.upper_channel.current.value)
                self.plot("RegressionChannel", "lower_channel", self._rc.lower_channel.current.value)
                self.plot("RegressionChannel", "intercept", self._rc.intercept.current.value)
                self.plot("RegressionChannel", "slope", self._rc.slope.current.value)
    

    The following reference table describes the RegressionChannel constructor:

    RegressionChannel

    class QuantConnect.Indicators.RegressionChannel [source]

    The Regression Channel indicator extends the LeastSquaresMovingAverage with the inclusion of two (upper and lower) channel lines that are distanced from the linear regression line by a user defined number of standard deviations. Reference: http://www.onlinetradingconcepts.com/TechnicalAnalysis/LinRegChannel.html

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and all sub-indicators (StandardDeviation, LowerBand, MiddleBand, UpperBand)

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property intercept

    The point where the regression line crosses the y-axis (price-axis)

    Returns:

    The point where the regression line crosses the y-axis (price-axis)

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property linear_regression

    Gets the linear regression

    Returns:

    Gets the linear regression

    Return type:

    LeastSquaresMovingAverage

    property lower_channel

    Gets the lower channel (linear regression - k * stdDev)

    Returns:

    Gets the lower channel (linear regression - k * stdDev)

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property slope

    The regression line slope

    Returns:

    The regression line slope

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property upper_channel

    Gets the upper channel (linear regression + k * stdDev)

    Returns:

    Gets the upper channel (linear regression + k * stdDev)

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RegressionChannel

    class QuantConnect.Indicators.RegressionChannel [source]

    The Regression Channel indicator extends the LeastSquaresMovingAverage with the inclusion of two (upper and lower) channel lines that are distanced from the linear regression line by a user defined number of standard deviations. Reference: http://www.onlinetradingconcepts.com/TechnicalAnalysis/LinRegChannel.html

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and all sub-indicators (StandardDeviation, LowerBand, MiddleBand, UpperBand)

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Intercept

    The point where the regression line crosses the y-axis (price-axis)

    Returns:

    The point where the regression line crosses the y-axis (price-axis)

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property LinearRegression

    Gets the linear regression

    Returns:

    Gets the linear regression

    Return type:

    LeastSquaresMovingAverage

    property LowerChannel

    Gets the lower channel (linear regression - k * stdDev)

    Returns:

    Gets the lower channel (linear regression - k * stdDev)

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Slope

    The regression line slope

    Returns:

    The regression line slope

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property UpperChannel

    Gets the upper channel (linear regression + k * stdDev)

    Returns:

    Gets the upper channel (linear regression + k * stdDev)

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of RegressionChannel using the plotly library.

    RegressionChannel line plot.

     

    Supported Indicators

    Relative Daily Volume

    Introduction

    The Relative Daily Volume indicator is an indicator that compares current cumulative volume to the cumulative volume for a given time of day, measured as a ratio. Current volume from open to current time of day / Average over the past x days from open to current time of day

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using RDV Indicator

    To create an automatic indicators for RelativeDailyVolume , call the RDV helper method from the QCAlgorithm class. The RDV method creates a RelativeDailyVolume object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RelativeDailyVolumeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeDailyVolume _rdv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rdv = RDV(_symbol, 2);
        }
    
        public override void OnData(Slice data)
        {
            if (_rdv.IsReady)
            {
                // The current value of _rdv is represented by itself (_rdv)
                // or _rdv.Current.Value
                Plot("RelativeDailyVolume", "rdv", _rdv);
                
            }
        }
    }
    class RelativeDailyVolumeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rdv = self.rdv(self._symbol, 2)
    
        def on_data(self, slice: Slice) -> None:
            if self._rdv.is_ready:
                # The current value of self._rdv is represented by self._rdv.current.value
                self.plot("RelativeDailyVolume", "rdv", self._rdv.current.value)
                
    

    The following reference table describes the RDV method:

    rdv( symbol, period=2, resolution=4, selector=None ) [source]

    Creates an RelativeDailyVolume indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Relative Volume indicator for the given parameters

    Return type:

    RelativeDailyVolume

    RDV( symbol, period=2, resolution=4, selector=None ) [source]

    Creates an RelativeDailyVolume indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Relative Volume indicator for the given parameters

    Return type:

    RelativeDailyVolume

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a RelativeDailyVolume indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class RelativeDailyVolumeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeDailyVolume _rdv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rdv = new RelativeDailyVolume(2);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _rdv.Update(bar);
            }
       
            if (_rdv.IsReady)
            {
                // The current value of _rdv is represented by itself (_rdv)
                // or _rdv.Current.Value
                Plot("RelativeDailyVolume", "rdv", _rdv);
                
            }
        }
    }
    class RelativeDailyVolumeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rdv = RelativeDailyVolume(2)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._rdv.update(bar)
            if self._rdv.is_ready:
                # The current value of self._rdv is represented by self._rdv.current.value
                self.plot("RelativeDailyVolume", "rdv", self._rdv.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RelativeDailyVolumeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeDailyVolume _rdv;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rdv = new RelativeDailyVolume(2);
            RegisterIndicator(_symbol, _rdv, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_rdv.IsReady)
            {
                // The current value of _rdv is represented by itself (_rdv)
                // or _rdv.Current.Value
                Plot("RelativeDailyVolume", "rdv", _rdv);
                
            }
        }
    }
    class RelativeDailyVolumeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rdv = RelativeDailyVolume(2)
            self.register_indicator(self._symbol, self._rdv, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._rdv.is_ready:
                # The current value of self._rdv is represented by self._rdv.current.value
                self.plot("RelativeDailyVolume", "rdv", self._rdv.current.value)
                
    

    The following reference table describes the RelativeDailyVolume constructor:

    RelativeDailyVolume

    class QuantConnect.Indicators.RelativeDailyVolume [source]

    The Relative Daily Volume indicator is an indicator that compares current cumulative volume to the cumulative volume for a given time of day, measured as a ratio. Current volume from open to current time of day / Average over the past x days from open to current time of day

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RelativeDailyVolume

    class QuantConnect.Indicators.RelativeDailyVolume [source]

    The Relative Daily Volume indicator is an indicator that compares current cumulative volume to the cumulative volume for a given time of day, measured as a ratio. Current volume from open to current time of day / Average over the past x days from open to current time of day

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of RelativeDailyVolume using the plotly library.

    RelativeDailyVolume line plot.

     

    Supported Indicators

    Relative Moving Average

    Introduction

    This indicator represents the relative moving average indicator (RMA). RMA = SMA(3 x Period) - SMA(2 x Period) + SMA(1 x Period) per formula: https://www.hybrid-solutions.com/plugins/client-vtl-plugins/free/rma.html

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using RMA Indicator

    To create an automatic indicators for RelativeMovingAverage , call the RMA helper method from the QCAlgorithm class. The RMA method creates a RelativeMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RelativeMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeMovingAverage _rma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rma = RMA(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_rma.IsReady)
            {
                // The current value of _rma is represented by itself (_rma)
                // or _rma.Current.Value
                Plot("RelativeMovingAverage", "rma", _rma);
                // Plot all properties of rma
                Plot("RelativeMovingAverage", "shortaverage", _rma.ShortAverage);
                Plot("RelativeMovingAverage", "mediumaverage", _rma.MediumAverage);
                Plot("RelativeMovingAverage", "longaverage", _rma.LongAverage);
            }
        }
    }
    class RelativeMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rma = self.rma(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._rma.is_ready:
                # The current value of self._rma is represented by self._rma.current.value
                self.plot("RelativeMovingAverage", "rma", self._rma.current.value)
                # Plot all attributes of self._rma
                self.plot("RelativeMovingAverage", "short_average", self._rma.short_average.current.value)
                self.plot("RelativeMovingAverage", "medium_average", self._rma.medium_average.current.value)
                self.plot("RelativeMovingAverage", "long_average", self._rma.long_average.current.value)
    

    The following reference table describes the RMA method:

    rma( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Relative Moving Average indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A relative moving average configured with the specified period and number of standard deviation

    Return type:

    RelativeMovingAverage

    RMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Relative Moving Average indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A relative moving average configured with the specified period and number of standard deviation

    Return type:

    RelativeMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a RelativeMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class RelativeMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeMovingAverage _rma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rma = new RelativeMovingAverage(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _rma.Update(bar.EndTime, bar.Close);
            }
       
            if (_rma.IsReady)
            {
                // The current value of _rma is represented by itself (_rma)
                // or _rma.Current.Value
                Plot("RelativeMovingAverage", "rma", _rma);
                // Plot all properties of rma
                Plot("RelativeMovingAverage", "shortaverage", _rma.ShortAverage);
                Plot("RelativeMovingAverage", "mediumaverage", _rma.MediumAverage);
                Plot("RelativeMovingAverage", "longaverage", _rma.LongAverage);
            }
        }
    }
    class RelativeMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rma = RelativeMovingAverage(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._rma.update(bar.EndTime, bar.Close)
            if self._rma.is_ready:
                # The current value of self._rma is represented by self._rma.current.value
                self.plot("RelativeMovingAverage", "rma", self._rma.current.value)
                # Plot all attributes of self._rma
                self.plot("RelativeMovingAverage", "short_average", self._rma.short_average.current.value)
                self.plot("RelativeMovingAverage", "medium_average", self._rma.medium_average.current.value)
                self.plot("RelativeMovingAverage", "long_average", self._rma.long_average.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RelativeMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeMovingAverage _rma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rma = new RelativeMovingAverage(20);
            RegisterIndicator(_symbol, _rma, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_rma.IsReady)
            {
                // The current value of _rma is represented by itself (_rma)
                // or _rma.Current.Value
                Plot("RelativeMovingAverage", "rma", _rma);
                // Plot all properties of rma
                Plot("RelativeMovingAverage", "shortaverage", _rma.ShortAverage);
                Plot("RelativeMovingAverage", "mediumaverage", _rma.MediumAverage);
                Plot("RelativeMovingAverage", "longaverage", _rma.LongAverage);
            }
        }
    }
    class RelativeMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rma = RelativeMovingAverage(20)
            self.register_indicator(self._symbol, self._rma, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._rma.is_ready:
                # The current value of self._rma is represented by self._rma.current.value
                self.plot("RelativeMovingAverage", "rma", self._rma.current.value)
                # Plot all attributes of self._rma
                self.plot("RelativeMovingAverage", "short_average", self._rma.short_average.current.value)
                self.plot("RelativeMovingAverage", "medium_average", self._rma.medium_average.current.value)
                self.plot("RelativeMovingAverage", "long_average", self._rma.long_average.current.value)
    

    The following reference table describes the RelativeMovingAverage constructor:

    RelativeMovingAverage

    class QuantConnect.Indicators.RelativeMovingAverage [source]

    Represents the relative moving average indicator (RMA). RMA = SMA(3 x Period) - SMA(2 x Period) + SMA(1 x Period) per formula: https://www.hybrid-solutions.com/plugins/client-vtl-plugins/free/rma.html

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property long_average

    Gets the Long Term SMA with 3 x Period of RMA

    Returns:

    Gets the Long Term SMA with 3 x Period of RMA

    Return type:

    SimpleMovingAverage

    property medium_average

    Gets the Medium Term SMA with 2 x Period of RMA

    Returns:

    Gets the Medium Term SMA with 2 x Period of RMA

    Return type:

    SimpleMovingAverage

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property short_average

    Gets the Short Term SMA with 1 x Period of RMA

    Returns:

    Gets the Short Term SMA with 1 x Period of RMA

    Return type:

    SimpleMovingAverage

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RelativeMovingAverage

    class QuantConnect.Indicators.RelativeMovingAverage [source]

    Represents the relative moving average indicator (RMA). RMA = SMA(3 x Period) - SMA(2 x Period) + SMA(1 x Period) per formula: https://www.hybrid-solutions.com/plugins/client-vtl-plugins/free/rma.html

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property LongAverage

    Gets the Long Term SMA with 3 x Period of RMA

    Returns:

    Gets the Long Term SMA with 3 x Period of RMA

    Return type:

    SimpleMovingAverage

    property MediumAverage

    Gets the Medium Term SMA with 2 x Period of RMA

    Returns:

    Gets the Medium Term SMA with 2 x Period of RMA

    Return type:

    SimpleMovingAverage

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property ShortAverage

    Gets the Short Term SMA with 1 x Period of RMA

    Returns:

    Gets the Short Term SMA with 1 x Period of RMA

    Return type:

    SimpleMovingAverage

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of RelativeMovingAverage using the plotly library.

    RelativeMovingAverage line plot.

     

    Supported Indicators

    Relative Strength Index

    Introduction

    This indicator represents the Relative Strength Index (RSI) developed by K. Welles Wilder. You can optionally specified a different moving average type to be used in the computation

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using RSI Indicator

    To create an automatic indicators for RelativeStrengthIndex , call the RSI helper method from the QCAlgorithm class. The RSI method creates a RelativeStrengthIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RelativeStrengthIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeStrengthIndex _rsi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rsi = RSI(_symbol, 14);
        }
    
        public override void OnData(Slice data)
        {
            if (_rsi.IsReady)
            {
                // The current value of _rsi is represented by itself (_rsi)
                // or _rsi.Current.Value
                Plot("RelativeStrengthIndex", "rsi", _rsi);
                // Plot all properties of rsi
                Plot("RelativeStrengthIndex", "averageloss", _rsi.AverageLoss);
                Plot("RelativeStrengthIndex", "averagegain", _rsi.AverageGain);
            }
        }
    }
    class RelativeStrengthIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rsi = self.rsi(self._symbol, 14)
    
        def on_data(self, slice: Slice) -> None:
            if self._rsi.is_ready:
                # The current value of self._rsi is represented by self._rsi.current.value
                self.plot("RelativeStrengthIndex", "rsi", self._rsi.current.value)
                # Plot all attributes of self._rsi
                self.plot("RelativeStrengthIndex", "average_loss", self._rsi.average_loss.current.value)
                self.plot("RelativeStrengthIndex", "average_gain", self._rsi.average_gain.current.value)
    

    The following reference table describes the RSI method:

    rsi( symbol, period, moving_average_type=2, resolution=None, selector=None ) [source]

    Creates a new RelativeStrengthIndex indicator. This will produce an oscillator that ranges from 0 to 100 based on the ratio of average gains to average losses over the specified period.

    Parameters:
    Returns:

    The RelativeStrengthIndex indicator for the requested symbol over the specified period

    Return type:

    RelativeStrengthIndex

    RSI( symbol, period, movingAverageType=2, resolution=None, selector=None ) [source]

    Creates a new RelativeStrengthIndex indicator. This will produce an oscillator that ranges from 0 to 100 based on the ratio of average gains to average losses over the specified period.

    Parameters:
    Returns:

    The RelativeStrengthIndex indicator for the requested symbol over the specified period

    Return type:

    RelativeStrengthIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    The following table describes the MovingAverageType enumeration members:

    To avoid parameter ambiguity, use the resolution argument to set the Resolution .

    public class RelativeStrengthIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeStrengthIndex _rsi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Hour).Symbol;
            _rsi = RSI(_symbol, 14, resolution: Resolution.Daily);
        }
    }
    class RelativeStrengthIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.HOUR).Symbol
            self._rsi = self.rsi(self._symbol, 14, resolution=Resolution.DAILY)
    

    You can manually create a RelativeStrengthIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class RelativeStrengthIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeStrengthIndex _rsi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rsi = new RelativeStrengthIndex(14);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _rsi.Update(bar.EndTime, bar.Close);
            }
       
            if (_rsi.IsReady)
            {
                // The current value of _rsi is represented by itself (_rsi)
                // or _rsi.Current.Value
                Plot("RelativeStrengthIndex", "rsi", _rsi);
                // Plot all properties of rsi
                Plot("RelativeStrengthIndex", "averageloss", _rsi.AverageLoss);
                Plot("RelativeStrengthIndex", "averagegain", _rsi.AverageGain);
            }
        }
    }
    class RelativeStrengthIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rsi = RelativeStrengthIndex(14)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._rsi.update(bar.EndTime, bar.Close)
            if self._rsi.is_ready:
                # The current value of self._rsi is represented by self._rsi.current.value
                self.plot("RelativeStrengthIndex", "rsi", self._rsi.current.value)
                # Plot all attributes of self._rsi
                self.plot("RelativeStrengthIndex", "average_loss", self._rsi.average_loss.current.value)
                self.plot("RelativeStrengthIndex", "average_gain", self._rsi.average_gain.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RelativeStrengthIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeStrengthIndex _rsi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rsi = new RelativeStrengthIndex(14);
            RegisterIndicator(_symbol, _rsi, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_rsi.IsReady)
            {
                // The current value of _rsi is represented by itself (_rsi)
                // or _rsi.Current.Value
                Plot("RelativeStrengthIndex", "rsi", _rsi);
                // Plot all properties of rsi
                Plot("RelativeStrengthIndex", "averageloss", _rsi.AverageLoss);
                Plot("RelativeStrengthIndex", "averagegain", _rsi.AverageGain);
            }
        }
    }
    class RelativeStrengthIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rsi = RelativeStrengthIndex(14)
            self.register_indicator(self._symbol, self._rsi, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._rsi.is_ready:
                # The current value of self._rsi is represented by self._rsi.current.value
                self.plot("RelativeStrengthIndex", "rsi", self._rsi.current.value)
                # Plot all attributes of self._rsi
                self.plot("RelativeStrengthIndex", "average_loss", self._rsi.average_loss.current.value)
                self.plot("RelativeStrengthIndex", "average_gain", self._rsi.average_gain.current.value)
    

    The following reference table describes the RelativeStrengthIndex constructor:

    RelativeStrengthIndex

    class QuantConnect.Indicators.RelativeStrengthIndex [source]

    Represents the Relative Strength Index (RSI) developed by K. Welles Wilder. You can optionally specified a different moving average type to be used in the computation

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property average_gain

    Gets the indicator for average gain

    Returns:

    Gets the indicator for average gain

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property average_loss

    Gets the EMA for the down days

    Returns:

    Gets the EMA for the down days

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property moving_average_type

    Gets the type of indicator used to compute AverageGain and AverageLoss

    Returns:

    Gets the type of indicator used to compute AverageGain and AverageLoss

    Return type:

    MovingAverageType

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RelativeStrengthIndex

    class QuantConnect.Indicators.RelativeStrengthIndex [source]

    Represents the Relative Strength Index (RSI) developed by K. Welles Wilder. You can optionally specified a different moving average type to be used in the computation

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property AverageGain

    Gets the indicator for average gain

    Returns:

    Gets the indicator for average gain

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property AverageLoss

    Gets the EMA for the down days

    Returns:

    Gets the EMA for the down days

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property MovingAverageType

    Gets the type of indicator used to compute AverageGain and AverageLoss

    Returns:

    Gets the type of indicator used to compute AverageGain and AverageLoss

    Return type:

    MovingAverageType

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of RelativeStrengthIndex using the plotly library.

    RelativeStrengthIndex line plot.

     

    Supported Indicators

    Relative Vigor Index

    Introduction

    The Relative Vigor Index (RVI) compares the ratio of the closing price of a security to its trading range. For illustration, let: a = Close−Open b = Close−Open of One Bar Prior to a c = Close−Open of One Bar Prior to b d = Close−Open of One Bar Prior to c e = High−Low of Bar a f = High−Low of Bar b g = High−Low of Bar c h = High−Low of Bar d Then let (a+2*(b+c)+d)/6 be NUM and (e+2*(f+g)+h)/6 be DENOM. RVI = SMA(NUM)/SMA(DENOM) for a specified period. https://www.investopedia.com/terms/r/relative_vigor_index.asp

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using RVI Indicator

    To create an automatic indicators for RelativeVigorIndex , call the RVI helper method from the QCAlgorithm class. The RVI method creates a RelativeVigorIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RelativeVigorIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeVigorIndex _rvi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rvi = RVI(_symbol, 20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (_rvi.IsReady)
            {
                // The current value of _rvi is represented by itself (_rvi)
                // or _rvi.Current.Value
                Plot("RelativeVigorIndex", "rvi", _rvi);
                // Plot all properties of rvi
                Plot("RelativeVigorIndex", "signal", _rvi.Signal);
            }
        }
    }
    class RelativeVigorIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rvi = self.rvi(self._symbol, 20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            if self._rvi.is_ready:
                # The current value of self._rvi is represented by self._rvi.current.value
                self.plot("RelativeVigorIndex", "rvi", self._rvi.current.value)
                # Plot all attributes of self._rvi
                self.plot("RelativeVigorIndex", "signal", self._rvi.signal.current.value)
    

    The following reference table describes the RVI method:

    rvi( symbol, period, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new RelativeVigorIndex indicator.

    Parameters:
    Returns:

    The RelativeVigorIndex indicator for the requested symbol over the specified period

    Return type:

    RelativeVigorIndex

    RVI( symbol, period, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new RelativeVigorIndex indicator.

    Parameters:
    Returns:

    The RelativeVigorIndex indicator for the requested symbol over the specified period

    Return type:

    RelativeVigorIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a RelativeVigorIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class RelativeVigorIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeVigorIndex _rvi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rvi = new RelativeVigorIndex(20, MovingAverageType.Simple);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _rvi.Update(bar);
            }
       
            if (_rvi.IsReady)
            {
                // The current value of _rvi is represented by itself (_rvi)
                // or _rvi.Current.Value
                Plot("RelativeVigorIndex", "rvi", _rvi);
                // Plot all properties of rvi
                Plot("RelativeVigorIndex", "signal", _rvi.Signal);
            }
        }
    }
    class RelativeVigorIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rvi = RelativeVigorIndex(20, MovingAverageType.Simple)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._rvi.update(bar)
            if self._rvi.is_ready:
                # The current value of self._rvi is represented by self._rvi.current.value
                self.plot("RelativeVigorIndex", "rvi", self._rvi.current.value)
                # Plot all attributes of self._rvi
                self.plot("RelativeVigorIndex", "signal", self._rvi.signal.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RelativeVigorIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private RelativeVigorIndex _rvi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _rvi = new RelativeVigorIndex(20, MovingAverageType.Simple);
            RegisterIndicator(_symbol, _rvi, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_rvi.IsReady)
            {
                // The current value of _rvi is represented by itself (_rvi)
                // or _rvi.Current.Value
                Plot("RelativeVigorIndex", "rvi", _rvi);
                // Plot all properties of rvi
                Plot("RelativeVigorIndex", "signal", _rvi.Signal);
            }
        }
    }
    class RelativeVigorIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._rvi = RelativeVigorIndex(20, MovingAverageType.Simple)
            self.register_indicator(self._symbol, self._rvi, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._rvi.is_ready:
                # The current value of self._rvi is represented by self._rvi.current.value
                self.plot("RelativeVigorIndex", "rvi", self._rvi.current.value)
                # Plot all attributes of self._rvi
                self.plot("RelativeVigorIndex", "signal", self._rvi.signal.current.value)
    

    The following reference table describes the RelativeVigorIndex constructor:

    RelativeVigorIndex

    class QuantConnect.Indicators.RelativeVigorIndex [source]

    The Relative Vigor Index (RVI) compares the ratio of the closing price of a security to its trading range. For illustration, let: a = Close−Open b = Close−Open of One Bar Prior to a c = Close−Open of One Bar Prior to b d = Close−Open of One Bar Prior to c e = High−Low of Bar a f = High−Low of Bar b g = High−Low of Bar c h = High−Low of Bar d Then let (a+2*(b+c)+d)/6 be NUM and (e+2*(f+g)+h)/6 be DENOM. RVI = SMA(NUM)/SMA(DENOM) for a specified period. https://www.investopedia.com/terms/r/relative_vigor_index.asp

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property signal

    A signal line which behaves like a slowed version of the RVI.

    Returns:

    A signal line which behaves like a slowed version of the RVI.

    Return type:

    RelativeVigorIndexSignal

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RelativeVigorIndex

    class QuantConnect.Indicators.RelativeVigorIndex [source]

    The Relative Vigor Index (RVI) compares the ratio of the closing price of a security to its trading range. For illustration, let: a = Close−Open b = Close−Open of One Bar Prior to a c = Close−Open of One Bar Prior to b d = Close−Open of One Bar Prior to c e = High−Low of Bar a f = High−Low of Bar b g = High−Low of Bar c h = High−Low of Bar d Then let (a+2*(b+c)+d)/6 be NUM and (e+2*(f+g)+h)/6 be DENOM. RVI = SMA(NUM)/SMA(DENOM) for a specified period. https://www.investopedia.com/terms/r/relative_vigor_index.asp

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Signal

    A signal line which behaves like a slowed version of the RVI.

    Returns:

    A signal line which behaves like a slowed version of the RVI.

    Return type:

    RelativeVigorIndexSignal

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of RelativeVigorIndex using the plotly library.

    RelativeVigorIndex line plot.

     

    Supported Indicators

    Rho

    Introduction

    Option Rho indicator that calculate the rho of an option

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using R Indicator

    To create an automatic indicators for Rho , call the R helper method from the QCAlgorithm class. The R method creates a Rho object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class RhoAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Rho _r;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _r = R(_option, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (_r.IsReady)
            {
                // The current value of _r is represented by itself (_r)
                // or _r.Current.Value
                Plot("Rho", "r", _r);
                // Plot all properties of r
                Plot("Rho", "impliedvolatility", _r.ImpliedVolatility);
                Plot("Rho", "riskfreerate", _r.RiskFreeRate);
                Plot("Rho", "dividendyield", _r.DividendYield);
                Plot("Rho", "price", _r.Price);
                Plot("Rho", "oppositeprice", _r.OppositePrice);
                Plot("Rho", "underlyingprice", _r.UnderlyingPrice);
            }
        }
    }
    class RhoAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._r = self.r(self.option, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            if self._r.is_ready:
                # The current value of self._r is represented by self._r.current.value
                self.plot("Rho", "r", self._r.current.value)
                # Plot all attributes of self._r
                self.plot("Rho", "implied_volatility", self._r.implied_volatility.current.value)
                self.plot("Rho", "risk_free_rate", self._r.risk_free_rate.current.value)
                self.plot("Rho", "dividend_yield", self._r.dividend_yield.current.value)
                self.plot("Rho", "price", self._r.price.current.value)
                self.plot("Rho", "opposite_price", self._r.opposite_price.current.value)
                self.plot("Rho", "underlying_price", self._r.underlying_price.current.value)
    

    The following reference table describes the R method:

    r( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

    Parameters:
    Returns:

    A new Rho indicator for the specified symbol

    Return type:

    Rho

    R( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

    Parameters:
    Returns:

    A new Rho indicator for the specified symbol

    Return type:

    Rho

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Rho indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class RhoAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Rho _r;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _r = new Rho(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _r.Update(new IndicatorDataPoint(_symbol, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_option, out bar))
            {      
                _r.Update(new IndicatorDataPoint(_option, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_mirrorOption, out bar))
            {      
                _r.Update(new IndicatorDataPoint(_mirrorOption, bar.EndTime, bar.Close));
            }
       
            if (_r.IsReady)
            {
                // The current value of _r is represented by itself (_r)
                // or _r.Current.Value
                Plot("Rho", "r", _r);
                // Plot all properties of r
                Plot("Rho", "impliedvolatility", _r.ImpliedVolatility);
                Plot("Rho", "riskfreerate", _r.RiskFreeRate);
                Plot("Rho", "dividendyield", _r.DividendYield);
                Plot("Rho", "price", _r.Price);
                Plot("Rho", "oppositeprice", _r.OppositePrice);
                Plot("Rho", "underlyingprice", _r.UnderlyingPrice);
            }
        }
    }
    class RhoAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._r = Rho(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._r.update(IndicatorDataPoint(self._symbol, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.option)
            if bar:
                self._r.update(IndicatorDataPoint(self.option, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.mirror_option)
            if bar:
                self._r.update(IndicatorDataPoint(self.mirror_option, bar.end_time, bar.close))
            if self._r.is_ready:
                # The current value of self._r is represented by self._r.current.value
                self.plot("Rho", "r", self._r.current.value)
                # Plot all attributes of self._r
                self.plot("Rho", "implied_volatility", self._r.implied_volatility.current.value)
                self.plot("Rho", "risk_free_rate", self._r.risk_free_rate.current.value)
                self.plot("Rho", "dividend_yield", self._r.dividend_yield.current.value)
                self.plot("Rho", "price", self._r.price.current.value)
                self.plot("Rho", "opposite_price", self._r.opposite_price.current.value)
                self.plot("Rho", "underlying_price", self._r.underlying_price.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class RhoAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Rho _r;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _r = new Rho(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
            RegisterIndicator(_symbol, _r, Resolution.Daily);
            RegisterIndicator(_option, _r, Resolution.Daily);
            RegisterIndicator(_mirrorOption, _r, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_r.IsReady)
            {
                // The current value of _r is represented by itself (_r)
                // or _r.Current.Value
                Plot("Rho", "r", _r);
                // Plot all properties of r
                Plot("Rho", "impliedvolatility", _r.ImpliedVolatility);
                Plot("Rho", "riskfreerate", _r.RiskFreeRate);
                Plot("Rho", "dividendyield", _r.DividendYield);
                Plot("Rho", "price", _r.Price);
                Plot("Rho", "oppositeprice", _r.OppositePrice);
                Plot("Rho", "underlyingprice", _r.UnderlyingPrice);
            }
        }
    }
    class RhoAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._r = Rho(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
            self.register_indicator(self._symbol, self._r, Resolution.DAILY)
            self.register_indicator(self.option, self._r, Resolution.DAILY)
            self.register_indicator(self.mirror_option, self._r, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._r.is_ready:
                # The current value of self._r is represented by self._r.current.value
                self.plot("Rho", "r", self._r.current.value)
                # Plot all attributes of self._r
                self.plot("Rho", "implied_volatility", self._r.implied_volatility.current.value)
                self.plot("Rho", "risk_free_rate", self._r.risk_free_rate.current.value)
                self.plot("Rho", "dividend_yield", self._r.dividend_yield.current.value)
                self.plot("Rho", "price", self._r.price.current.value)
                self.plot("Rho", "opposite_price", self._r.opposite_price.current.value)
                self.plot("Rho", "underlying_price", self._r.underlying_price.current.value)
    

    The following reference table describes the Rho constructor:

    Rho

    class QuantConnect.Indicators.Rho [source]

    Option Rho indicator that calculate the rho of an option

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and all sub-indicators

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property dividend_yield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    datetime

    property implied_volatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property opposite_price

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property risk_free_rate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    float

    property style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property underlying_price

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property use_mirror_contract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Rho

    class QuantConnect.Indicators.Rho [source]

    Option Rho indicator that calculate the rho of an option

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and all sub-indicators

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property DividendYield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property Expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    DateTime

    property ImpliedVolatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property OppositePrice

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property RiskFreeRate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    decimal

    property Style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property UnderlyingPrice

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property UseMirrorContract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Rho using the plotly library.

    Rho line plot.

     

    Supported Indicators

    Schaff Trend Cycle

    Introduction

    This indicator creates the Schaff Trend Cycle

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using STC Indicator

    To create an automatic indicators for SchaffTrendCycle , call the STC helper method from the QCAlgorithm class. The STC method creates a SchaffTrendCycle object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class SchaffTrendCycleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SchaffTrendCycle _stc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _stc = STC(_symbol, 5, 10, 20, MovingAverageType.Exponential);
        }
    
        public override void OnData(Slice data)
        {
            if (_stc.IsReady)
            {
                // The current value of _stc is represented by itself (_stc)
                // or _stc.Current.Value
                Plot("SchaffTrendCycle", "stc", _stc);
                
            }
        }
    }
    class SchaffTrendCycleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._stc = self.stc(self._symbol, 5, 10, 20, MovingAverageType.Exponential)
    
        def on_data(self, slice: Slice) -> None:
            if self._stc.is_ready:
                # The current value of self._stc is represented by self._stc.current.value
                self.plot("SchaffTrendCycle", "stc", self._stc.current.value)
                
    

    The following reference table describes the STC method:

    stc( symbol, cycle_period, fast_period, slow_period, moving_average_type=1, resolution=None, selector=None ) [source]

    Creates a new Schaff Trend Cycle indicator

    Parameters:
    Returns:

    The SchaffTrendCycle indicator for the requested symbol over the specified period

    Return type:

    SchaffTrendCycle

    STC( symbol, cyclePeriod, fastPeriod, slowPeriod, movingAverageType=1, resolution=None, selector=None ) [source]

    Creates a new Schaff Trend Cycle indicator

    Parameters:
    Returns:

    The SchaffTrendCycle indicator for the requested symbol over the specified period

    Return type:

    SchaffTrendCycle

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a SchaffTrendCycle indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class SchaffTrendCycleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SchaffTrendCycle _stc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _stc = new SchaffTrendCycle(5, 10, 20, MovingAverageType.Exponential);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _stc.Update(bar.EndTime, bar.Close);
            }
       
            if (_stc.IsReady)
            {
                // The current value of _stc is represented by itself (_stc)
                // or _stc.Current.Value
                Plot("SchaffTrendCycle", "stc", _stc);
                
            }
        }
    }
    class SchaffTrendCycleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._stc = SchaffTrendCycle(5, 10, 20, MovingAverageType.Exponential)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._stc.update(bar.EndTime, bar.Close)
            if self._stc.is_ready:
                # The current value of self._stc is represented by self._stc.current.value
                self.plot("SchaffTrendCycle", "stc", self._stc.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class SchaffTrendCycleAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SchaffTrendCycle _stc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _stc = new SchaffTrendCycle(5, 10, 20, MovingAverageType.Exponential);
            RegisterIndicator(_symbol, _stc, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_stc.IsReady)
            {
                // The current value of _stc is represented by itself (_stc)
                // or _stc.Current.Value
                Plot("SchaffTrendCycle", "stc", _stc);
                
            }
        }
    }
    class SchaffTrendCycleAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._stc = SchaffTrendCycle(5, 10, 20, MovingAverageType.Exponential)
            self.register_indicator(self._symbol, self._stc, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._stc.is_ready:
                # The current value of self._stc is represented by self._stc.current.value
                self.plot("SchaffTrendCycle", "stc", self._stc.current.value)
                
    

    The following reference table describes the SchaffTrendCycle constructor:

    SchaffTrendCycle

    class QuantConnect.Indicators.SchaffTrendCycle [source]

    This indicator creates the Schaff Trend Cycle

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SchaffTrendCycle

    class QuantConnect.Indicators.SchaffTrendCycle [source]

    This indicator creates the Schaff Trend Cycle

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of SchaffTrendCycle using the plotly library.

    SchaffTrendCycle line plot.

     

    Supported Indicators

    Sharpe Ratio

    Introduction

    Calculation of the Sharpe Ratio (SR) developed by William F. Sharpe. Reference: https://www.investopedia.com/articles/07/sharpe_ratio.asp Formula: S(x) = (Rx - Rf) / stdDev(Rx) Where: S(x) - sharpe ratio of x Rx - average rate of return for x Rf - risk-free rate

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using SR Indicator

    To create an automatic indicators for SharpeRatio , call the SR helper method from the QCAlgorithm class. The SR method creates a SharpeRatio object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class SharpeRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SharpeRatio _sr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sr = SR(_symbol, 22, 0.03);
        }
    
        public override void OnData(Slice data)
        {
            if (_sr.IsReady)
            {
                // The current value of _sr is represented by itself (_sr)
                // or _sr.Current.Value
                Plot("SharpeRatio", "sr", _sr);
                
            }
        }
    }
    class SharpeRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sr = self.sr(self._symbol, 22, 0.03)
    
        def on_data(self, slice: Slice) -> None:
            if self._sr.is_ready:
                # The current value of self._sr is represented by self._sr.current.value
                self.plot("SharpeRatio", "sr", self._sr.current.value)
                
    

    The following reference table describes the SR method:

    sr( symbol, sharpe_period, risk_free_rate=None, resolution=None, selector=None ) [source]

    Creates a new SharpeRatio indicator.

    Parameters:
    Returns:

    The SharpeRatio indicator for the requested symbol over the specified period

    Return type:

    SharpeRatio

    SR( symbol, sharpePeriod, riskFreeRate=None, resolution=None, selector=None ) [source]

    Creates a new SharpeRatio indicator.

    Parameters:
    Returns:

    The SharpeRatio indicator for the requested symbol over the specified period

    Return type:

    SharpeRatio

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a SharpeRatio indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class SharpeRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SharpeRatio _sr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sr = new SharpeRatio(22, 0.03);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _sr.Update(bar.EndTime, bar.Close);
            }
       
            if (_sr.IsReady)
            {
                // The current value of _sr is represented by itself (_sr)
                // or _sr.Current.Value
                Plot("SharpeRatio", "sr", _sr);
                
            }
        }
    }
    class SharpeRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sr = SharpeRatio(22, 0.03)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._sr.update(bar.EndTime, bar.Close)
            if self._sr.is_ready:
                # The current value of self._sr is represented by self._sr.current.value
                self.plot("SharpeRatio", "sr", self._sr.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class SharpeRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SharpeRatio _sr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sr = new SharpeRatio(22, 0.03);
            RegisterIndicator(_symbol, _sr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_sr.IsReady)
            {
                // The current value of _sr is represented by itself (_sr)
                // or _sr.Current.Value
                Plot("SharpeRatio", "sr", _sr);
                
            }
        }
    }
    class SharpeRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sr = SharpeRatio(22, 0.03)
            self.register_indicator(self._symbol, self._sr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._sr.is_ready:
                # The current value of self._sr is represented by self._sr.current.value
                self.plot("SharpeRatio", "sr", self._sr.current.value)
                
    

    The following reference table describes the SharpeRatio constructor:

    SharpeRatio

    class QuantConnect.Indicators.SharpeRatio [source]

    Calculation of the Sharpe Ratio (SR) developed by William F. Sharpe. Reference: https://www.investopedia.com/articles/07/sharpe_ratio.asp Formula: S(x) = (Rx - Rf) / stdDev(Rx) Where: S(x) - sharpe ratio of x Rx - average rate of return for x Rf - risk-free rate

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Returns whether the indicator is properly initialized with data

    Returns:

    Returns whether the indicator is properly initialized with data

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SharpeRatio

    class QuantConnect.Indicators.SharpeRatio [source]

    Calculation of the Sharpe Ratio (SR) developed by William F. Sharpe. Reference: https://www.investopedia.com/articles/07/sharpe_ratio.asp Formula: S(x) = (Rx - Rf) / stdDev(Rx) Where: S(x) - sharpe ratio of x Rx - average rate of return for x Rf - risk-free rate

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Returns whether the indicator is properly initialized with data

    Returns:

    Returns whether the indicator is properly initialized with data

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of SharpeRatio using the plotly library.

    SharpeRatio line plot.

     

    Supported Indicators

    Simple Moving Average

    Introduction

    This indicator represents the traditional simple moving average indicator (SMA)

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using SMA Indicator

    To create an automatic indicators for SimpleMovingAverage , call the SMA helper method from the QCAlgorithm class. The SMA method creates a SimpleMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class SimpleMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SimpleMovingAverage _sma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sma = SMA(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_sma.IsReady)
            {
                // The current value of _sma is represented by itself (_sma)
                // or _sma.Current.Value
                Plot("SimpleMovingAverage", "sma", _sma);
                // Plot all properties of sma
                Plot("SimpleMovingAverage", "rollingsum", _sma.RollingSum);
            }
        }
    }
    class SimpleMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sma = self.sma(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._sma.is_ready:
                # The current value of self._sma is represented by self._sma.current.value
                self.plot("SimpleMovingAverage", "sma", self._sma.current.value)
                # Plot all attributes of self._sma
                self.plot("SimpleMovingAverage", "rolling_sum", self._sma.rolling_sum.current.value)
    

    The following reference table describes the SMA method:

    sma( symbol, period, resolution=None, selector=None ) [source]

    Creates an SimpleMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The SimpleMovingAverage for the given parameters

    Return type:

    SimpleMovingAverage

    SMA( symbol, period, resolution=None, selector=None ) [source]

    Creates an SimpleMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The SimpleMovingAverage for the given parameters

    Return type:

    SimpleMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a SimpleMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class SimpleMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SimpleMovingAverage _sma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sma = new SimpleMovingAverage(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _sma.Update(bar.EndTime, bar.Close);
            }
       
            if (_sma.IsReady)
            {
                // The current value of _sma is represented by itself (_sma)
                // or _sma.Current.Value
                Plot("SimpleMovingAverage", "sma", _sma);
                // Plot all properties of sma
                Plot("SimpleMovingAverage", "rollingsum", _sma.RollingSum);
            }
        }
    }
    class SimpleMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sma = SimpleMovingAverage(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._sma.update(bar.EndTime, bar.Close)
            if self._sma.is_ready:
                # The current value of self._sma is represented by self._sma.current.value
                self.plot("SimpleMovingAverage", "sma", self._sma.current.value)
                # Plot all attributes of self._sma
                self.plot("SimpleMovingAverage", "rolling_sum", self._sma.rolling_sum.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class SimpleMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SimpleMovingAverage _sma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sma = new SimpleMovingAverage(20);
            RegisterIndicator(_symbol, _sma, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_sma.IsReady)
            {
                // The current value of _sma is represented by itself (_sma)
                // or _sma.Current.Value
                Plot("SimpleMovingAverage", "sma", _sma);
                // Plot all properties of sma
                Plot("SimpleMovingAverage", "rollingsum", _sma.RollingSum);
            }
        }
    }
    class SimpleMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sma = SimpleMovingAverage(20)
            self.register_indicator(self._symbol, self._sma, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._sma.is_ready:
                # The current value of self._sma is represented by self._sma.current.value
                self.plot("SimpleMovingAverage", "sma", self._sma.current.value)
                # Plot all attributes of self._sma
                self.plot("SimpleMovingAverage", "rolling_sum", self._sma.rolling_sum.current.value)
    

    The following reference table describes the SimpleMovingAverage constructor:

    SimpleMovingAverage

    class QuantConnect.Indicators.SimpleMovingAverage [source]

    Represents the traditional simple moving average indicator (SMA)

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property rolling_sum

    A rolling sum for computing the average for the given period

    Returns:

    A rolling sum for computing the average for the given period

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SimpleMovingAverage

    class QuantConnect.Indicators.SimpleMovingAverage [source]

    Represents the traditional simple moving average indicator (SMA)

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property RollingSum

    A rolling sum for computing the average for the given period

    Returns:

    A rolling sum for computing the average for the given period

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of SimpleMovingAverage using the plotly library.

    SimpleMovingAverage line plot.

     

    Supported Indicators

    Sortino Ratio

    Introduction

    Calculation of the Sortino Ratio, a modification of the . Reference: https://www.cmegroup.com/education/files/rr-sortino-a-sharper-ratio.pdf Formula: S(x) = (R - T) / TDD Where: S(x) - Sortino ratio of x R - the average period return T - the target or required rate of return for the investment strategy under consideration. In Sortino’s early work, T was originally known as the minimum acceptable return, or MAR. In his more recent work, MAR is now referred to as the Desired Target Return. TDD - the target downside deviation.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using SORTINO Indicator

    To create an automatic indicators for SortinoRatio , call the SORTINO helper method from the QCAlgorithm class. The SORTINO method creates a SortinoRatio object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class SortinoRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SortinoRatio _sortino;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sortino = SORTINO(_symbol, 22);
        }
    
        public override void OnData(Slice data)
        {
            if (_sortino.IsReady)
            {
                // The current value of _sortino is represented by itself (_sortino)
                // or _sortino.Current.Value
                Plot("SortinoRatio", "sortino", _sortino);
                
            }
        }
    }
    class SortinoRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sortino = self.sortino(self._symbol, 22)
    
        def on_data(self, slice: Slice) -> None:
            if self._sortino.is_ready:
                # The current value of self._sortino is represented by self._sortino.current.value
                self.plot("SortinoRatio", "sortino", self._sortino.current.value)
                
    

    The following reference table describes the SORTINO method:

    sortino( symbol, sortino_period, minimum_acceptable_return=0.0, resolution=None, selector=None ) [source]

    Creates a new Sortino indicator.

    Parameters:
    Returns:

    The SortinoRatio indicator for the requested symbol over the specified period

    Return type:

    SortinoRatio

    SORTINO( symbol, sortinoPeriod, minimumAcceptableReturn=0.0, resolution=None, selector=None ) [source]

    Creates a new Sortino indicator.

    Parameters:
    Returns:

    The SortinoRatio indicator for the requested symbol over the specified period

    Return type:

    SortinoRatio

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a SortinoRatio indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class SortinoRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SortinoRatio _sortino;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sortino = new SortinoRatio(22);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _sortino.Update(bar.EndTime, bar.Close);
            }
       
            if (_sortino.IsReady)
            {
                // The current value of _sortino is represented by itself (_sortino)
                // or _sortino.Current.Value
                Plot("SortinoRatio", "sortino", _sortino);
                
            }
        }
    }
    class SortinoRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sortino = SortinoRatio(22)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._sortino.update(bar.EndTime, bar.Close)
            if self._sortino.is_ready:
                # The current value of self._sortino is represented by self._sortino.current.value
                self.plot("SortinoRatio", "sortino", self._sortino.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class SortinoRatioAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SortinoRatio _sortino;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sortino = new SortinoRatio(22);
            RegisterIndicator(_symbol, _sortino, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_sortino.IsReady)
            {
                // The current value of _sortino is represented by itself (_sortino)
                // or _sortino.Current.Value
                Plot("SortinoRatio", "sortino", _sortino);
                
            }
        }
    }
    class SortinoRatioAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sortino = SortinoRatio(22)
            self.register_indicator(self._symbol, self._sortino, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._sortino.is_ready:
                # The current value of self._sortino is represented by self._sortino.current.value
                self.plot("SortinoRatio", "sortino", self._sortino.current.value)
                
    

    The following reference table describes the SortinoRatio constructor:

    SortinoRatio

    class QuantConnect.Indicators.SortinoRatio [source]

    Calculation of the Sortino Ratio, a modification of the SharpeRatio . Reference: https://www.cmegroup.com/education/files/rr-sortino-a-sharper-ratio.pdf Formula: S(x) = (R - T) / TDD Where: S(x) - Sortino ratio of x R - the average period return T - the target or required rate of return for the investment strategy under consideration. In Sortino’s early work, T was originally known as the minimum acceptable return, or MAR. In his more recent work, MAR is now referred to as the Desired Target Return. TDD - the target downside deviation. TargetDownsideDeviation

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Returns whether the indicator is properly initialized with data

    Returns:

    Returns whether the indicator is properly initialized with data

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SortinoRatio

    class QuantConnect.Indicators.SortinoRatio [source]

    Calculation of the Sortino Ratio, a modification of the SharpeRatio . Reference: https://www.cmegroup.com/education/files/rr-sortino-a-sharper-ratio.pdf Formula: S(x) = (R - T) / TDD Where: S(x) - Sortino ratio of x R - the average period return T - the target or required rate of return for the investment strategy under consideration. In Sortino’s early work, T was originally known as the minimum acceptable return, or MAR. In his more recent work, MAR is now referred to as the Desired Target Return. TDD - the target downside deviation. TargetDownsideDeviation

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Returns whether the indicator is properly initialized with data

    Returns:

    Returns whether the indicator is properly initialized with data

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of SortinoRatio using the plotly library.

    SortinoRatio line plot.

     

    Supported Indicators

    Standard Deviation

    Introduction

    This indicator computes the n-period population standard deviation.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using STD Indicator

    To create an automatic indicators for StandardDeviation , call the STD helper method from the QCAlgorithm class. The STD method creates a StandardDeviation object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class StandardDeviationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private StandardDeviation _std;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _std = STD(_symbol, 22);
        }
    
        public override void OnData(Slice data)
        {
            if (_std.IsReady)
            {
                // The current value of _std is represented by itself (_std)
                // or _std.Current.Value
                Plot("StandardDeviation", "std", _std);
                
            }
        }
    }
    class StandardDeviationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._std = self.std(self._symbol, 22)
    
        def on_data(self, slice: Slice) -> None:
            if self._std.is_ready:
                # The current value of self._std is represented by self._std.current.value
                self.plot("StandardDeviation", "std", self._std.current.value)
                
    

    The following reference table describes the STD method:

    std( symbol, period, resolution=None, selector=None ) [source]

    Creates a new StandardDeviation indicator. This will return the population standard deviation of samples over the specified period.

    Parameters:
    Returns:

    The StandardDeviation indicator for the requested symbol over the specified period

    Return type:

    StandardDeviation

    STD( symbol, period, resolution=None, selector=None ) [source]

    Creates a new StandardDeviation indicator. This will return the population standard deviation of samples over the specified period.

    Parameters:
    Returns:

    The StandardDeviation indicator for the requested symbol over the specified period

    Return type:

    StandardDeviation

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a StandardDeviation indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class StandardDeviationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private StandardDeviation _std;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _std = new StandardDeviation(22);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _std.Update(bar.EndTime, bar.Close);
            }
       
            if (_std.IsReady)
            {
                // The current value of _std is represented by itself (_std)
                // or _std.Current.Value
                Plot("StandardDeviation", "std", _std);
                
            }
        }
    }
    class StandardDeviationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._std = StandardDeviation(22)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._std.update(bar.EndTime, bar.Close)
            if self._std.is_ready:
                # The current value of self._std is represented by self._std.current.value
                self.plot("StandardDeviation", "std", self._std.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class StandardDeviationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private StandardDeviation _std;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _std = new StandardDeviation(22);
            RegisterIndicator(_symbol, _std, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_std.IsReady)
            {
                // The current value of _std is represented by itself (_std)
                // or _std.Current.Value
                Plot("StandardDeviation", "std", _std);
                
            }
        }
    }
    class StandardDeviationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._std = StandardDeviation(22)
            self.register_indicator(self._symbol, self._std, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._std.is_ready:
                # The current value of self._std is represented by self._std.current.value
                self.plot("StandardDeviation", "std", self._std.current.value)
                
    

    The following reference table describes the StandardDeviation constructor:

    StandardDeviation

    class QuantConnect.Indicators.StandardDeviation [source]

    This indicator computes the n-period population standard deviation.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    StandardDeviation

    class QuantConnect.Indicators.StandardDeviation [source]

    This indicator computes the n-period population standard deviation.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of StandardDeviation using the plotly library.

    StandardDeviation line plot.

     

    Supported Indicators

    Stochastic

    Introduction

    This indicator computes the Slow Stochastics %K and %D. The Fast Stochastics %K is is computed by (Current Close Price - Lowest Price of given Period) / (Highest Price of given Period - Lowest Price of given Period) multiplied by 100. Once the Fast Stochastics %K is calculated the Slow Stochastic %K is calculated by the average/smoothed price of of the Fast %K with the given period. The Slow Stochastics %D is then derived from the Slow Stochastics %K with the given period.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using STO Indicator

    To create an automatic indicators for Stochastic , call the STO helper method from the QCAlgorithm class. The STO method creates a Stochastic object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class StochasticAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Stochastic _sto;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sto = STO(_symbol, 20, 10, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_sto.IsReady)
            {
                // The current value of _sto is represented by itself (_sto)
                // or _sto.Current.Value
                Plot("Stochastic", "sto", _sto);
                // Plot all properties of sto
                Plot("Stochastic", "faststoch", _sto.FastStoch);
                Plot("Stochastic", "stochk", _sto.StochK);
                Plot("Stochastic", "stochd", _sto.StochD);
            }
        }
    }
    class StochasticAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sto = self.sto(self._symbol, 20, 10, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._sto.is_ready:
                # The current value of self._sto is represented by self._sto.current.value
                self.plot("Stochastic", "sto", self._sto.current.value)
                # Plot all attributes of self._sto
                self.plot("Stochastic", "fast_stoch", self._sto.fast_stoch.current.value)
                self.plot("Stochastic", "stoch_k", self._sto.stoch_k.current.value)
                self.plot("Stochastic", "stoch_d", self._sto.stoch_d.current.value)
    

    The following reference table describes the STO method:

    sto( symbol, period, k_period, d_period, resolution=None, selector=None ) [source]

    Creates a new Stochastic indicator.

    Parameters:
    Returns:

    Stochastic indicator for the requested symbol.

    Return type:

    Stochastic

    STO( symbol, period, kPeriod, dPeriod, resolution=None, selector=None ) [source]

    Creates a new Stochastic indicator.

    Parameters:
    Returns:

    Stochastic indicator for the requested symbol.

    Return type:

    Stochastic

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Stochastic indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class StochasticAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Stochastic _sto;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sto = new Stochastic(20, 10, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _sto.Update(bar);
            }
       
            if (_sto.IsReady)
            {
                // The current value of _sto is represented by itself (_sto)
                // or _sto.Current.Value
                Plot("Stochastic", "sto", _sto);
                // Plot all properties of sto
                Plot("Stochastic", "faststoch", _sto.FastStoch);
                Plot("Stochastic", "stochk", _sto.StochK);
                Plot("Stochastic", "stochd", _sto.StochD);
            }
        }
    }
    class StochasticAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sto = Stochastic(20, 10, 20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._sto.update(bar)
            if self._sto.is_ready:
                # The current value of self._sto is represented by self._sto.current.value
                self.plot("Stochastic", "sto", self._sto.current.value)
                # Plot all attributes of self._sto
                self.plot("Stochastic", "fast_stoch", self._sto.fast_stoch.current.value)
                self.plot("Stochastic", "stoch_k", self._sto.stoch_k.current.value)
                self.plot("Stochastic", "stoch_d", self._sto.stoch_d.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class StochasticAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Stochastic _sto;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sto = new Stochastic(20, 10, 20);
            RegisterIndicator(_symbol, _sto, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_sto.IsReady)
            {
                // The current value of _sto is represented by itself (_sto)
                // or _sto.Current.Value
                Plot("Stochastic", "sto", _sto);
                // Plot all properties of sto
                Plot("Stochastic", "faststoch", _sto.FastStoch);
                Plot("Stochastic", "stochk", _sto.StochK);
                Plot("Stochastic", "stochd", _sto.StochD);
            }
        }
    }
    class StochasticAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sto = Stochastic(20, 10, 20)
            self.register_indicator(self._symbol, self._sto, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._sto.is_ready:
                # The current value of self._sto is represented by self._sto.current.value
                self.plot("Stochastic", "sto", self._sto.current.value)
                # Plot all attributes of self._sto
                self.plot("Stochastic", "fast_stoch", self._sto.fast_stoch.current.value)
                self.plot("Stochastic", "stoch_k", self._sto.stoch_k.current.value)
                self.plot("Stochastic", "stoch_d", self._sto.stoch_d.current.value)
    

    The following reference table describes the Stochastic constructor:

    Stochastic

    class QuantConnect.Indicators.Stochastic [source]

    This indicator computes the Slow Stochastics %K and %D. The Fast Stochastics %K is is computed by (Current Close Price - Lowest Price of given Period) / (Highest Price of given Period - Lowest Price of given Period) multiplied by 100. Once the Fast Stochastics %K is calculated the Slow Stochastic %K is calculated by the average/smoothed price of of the Fast %K with the given period. The Slow Stochastics %D is then derived from the Slow Stochastics %K with the given period.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property fast_stoch

    Gets the value of the Fast Stochastics %K given Period.

    Returns:

    Gets the value of the Fast Stochastics %K given Period.

    Return type:

    IndicatorBase[IBaseDataBar]

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property stoch_d

    Gets the value of the Slow Stochastics given Period D.

    Returns:

    Gets the value of the Slow Stochastics given Period D.

    Return type:

    IndicatorBase[IBaseDataBar]

    property stoch_k

    Gets the value of the Slow Stochastics given Period K.

    Returns:

    Gets the value of the Slow Stochastics given Period K.

    Return type:

    IndicatorBase[IBaseDataBar]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Stochastic

    class QuantConnect.Indicators.Stochastic [source]

    This indicator computes the Slow Stochastics %K and %D. The Fast Stochastics %K is is computed by (Current Close Price - Lowest Price of given Period) / (Highest Price of given Period - Lowest Price of given Period) multiplied by 100. Once the Fast Stochastics %K is calculated the Slow Stochastic %K is calculated by the average/smoothed price of of the Fast %K with the given period. The Slow Stochastics %D is then derived from the Slow Stochastics %K with the given period.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property FastStoch

    Gets the value of the Fast Stochastics %K given Period.

    Returns:

    Gets the value of the Fast Stochastics %K given Period.

    Return type:

    IndicatorBase<IBaseDataBar>

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property StochD

    Gets the value of the Slow Stochastics given Period D.

    Returns:

    Gets the value of the Slow Stochastics given Period D.

    Return type:

    IndicatorBase<IBaseDataBar>

    property StochK

    Gets the value of the Slow Stochastics given Period K.

    Returns:

    Gets the value of the Slow Stochastics given Period K.

    Return type:

    IndicatorBase<IBaseDataBar>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Stochastic using the plotly library.

    Stochastic line plot.

     

    Supported Indicators

    Sum

    Introduction

    This indicator represents an indicator capable of tracking the sum for the given period

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using SUM Indicator

    To create an automatic indicators for Sum , call the SUM helper method from the QCAlgorithm class. The SUM method creates a Sum object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class SumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Sum _sum;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sum = SUM(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_sum.IsReady)
            {
                // The current value of _sum is represented by itself (_sum)
                // or _sum.Current.Value
                Plot("Sum", "sum", _sum);
                
            }
        }
    }
    class SumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sum = self.sum(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._sum.is_ready:
                # The current value of self._sum is represented by self._sum.current.value
                self.plot("Sum", "sum", self._sum.current.value)
                
    

    The following reference table describes the SUM method:

    sum( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Sum indicator.

    Parameters:
    Returns:

    The Sum indicator for the requested symbol over the specified period

    Return type:

    Sum

    SUM( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Sum indicator.

    Parameters:
    Returns:

    The Sum indicator for the requested symbol over the specified period

    Return type:

    Sum

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Sum indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class SumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Sum _sum;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sum = new Sum(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _sum.Update(bar.EndTime, bar.Close);
            }
       
            if (_sum.IsReady)
            {
                // The current value of _sum is represented by itself (_sum)
                // or _sum.Current.Value
                Plot("Sum", "sum", _sum);
                
            }
        }
    }
    class SumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sum = Sum(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._sum.update(bar.EndTime, bar.Close)
            if self._sum.is_ready:
                # The current value of self._sum is represented by self._sum.current.value
                self.plot("Sum", "sum", self._sum.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class SumAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Sum _sum;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _sum = new Sum(20);
            RegisterIndicator(_symbol, _sum, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_sum.IsReady)
            {
                // The current value of _sum is represented by itself (_sum)
                // or _sum.Current.Value
                Plot("Sum", "sum", _sum);
                
            }
        }
    }
    class SumAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._sum = Sum(20)
            self.register_indicator(self._symbol, self._sum, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._sum.is_ready:
                # The current value of self._sum is represented by self._sum.current.value
                self.plot("Sum", "sum", self._sum.current.value)
                
    

    The following reference table describes the Sum constructor:

    Sum

    class QuantConnect.Indicators.Sum [source]

    Represents an indicator capable of tracking the sum for the given period

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Sum

    class QuantConnect.Indicators.Sum [source]

    Represents an indicator capable of tracking the sum for the given period

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Sum using the plotly library.

    Sum line plot.

     

    Supported Indicators

    Super Trend

    Introduction

    Super trend indicator. Formula can be found here via the excel file: https://tradingtuitions.com/supertrend-indicator-excel-sheet-with-realtime-buy-sell-signals/

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using STR Indicator

    To create an automatic indicators for SuperTrend , call the STR helper method from the QCAlgorithm class. The STR method creates a SuperTrend object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class SuperTrendAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SuperTrend _str;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _str = STR(_symbol, 20, 2, MovingAverageType.Wilders);
        }
    
        public override void OnData(Slice data)
        {
            if (_str.IsReady)
            {
                // The current value of _str is represented by itself (_str)
                // or _str.Current.Value
                Plot("SuperTrend", "str", _str);
                // Plot all properties of str
                Plot("SuperTrend", "basicupperband", _str.BasicUpperBand);
                Plot("SuperTrend", "basiclowerband", _str.BasicLowerBand);
                Plot("SuperTrend", "currenttrailingupperband", _str.CurrentTrailingUpperBand);
                Plot("SuperTrend", "currenttrailinglowerband", _str.CurrentTrailingLowerBand);
            }
        }
    }
    class SuperTrendAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._str = self.str(self._symbol, 20, 2, MovingAverageType.Wilders)
    
        def on_data(self, slice: Slice) -> None:
            if self._str.is_ready:
                # The current value of self._str is represented by self._str.current.value
                self.plot("SuperTrend", "str", self._str.current.value)
                # Plot all attributes of self._str
                self.plot("SuperTrend", "basic_upper_band", self._str.basic_upper_band)
                self.plot("SuperTrend", "basic_lower_band", self._str.basic_lower_band)
                self.plot("SuperTrend", "current_trailing_upper_band", self._str.current_trailing_upper_band)
                self.plot("SuperTrend", "current_trailing_lower_band", self._str.current_trailing_lower_band)
    

    The following reference table describes the STR method:

    str( symbol, period, multiplier, moving_average_type=2, resolution=None, selector=None ) [source]

    Creates a new SuperTrend indicator.

    Parameters:
    Return type:

    SuperTrend

    STR( symbol, period, multiplier, movingAverageType=2, resolution=None, selector=None ) [source]

    Creates a new SuperTrend indicator.

    Parameters:
    Return type:

    SuperTrend

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a SuperTrend indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class SuperTrendAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SuperTrend _str;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _str = new SuperTrend(20, 2, MovingAverageType.Wilders);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _str.Update(bar);
            }
       
            if (_str.IsReady)
            {
                // The current value of _str is represented by itself (_str)
                // or _str.Current.Value
                Plot("SuperTrend", "str", _str);
                // Plot all properties of str
                Plot("SuperTrend", "basicupperband", _str.BasicUpperBand);
                Plot("SuperTrend", "basiclowerband", _str.BasicLowerBand);
                Plot("SuperTrend", "currenttrailingupperband", _str.CurrentTrailingUpperBand);
                Plot("SuperTrend", "currenttrailinglowerband", _str.CurrentTrailingLowerBand);
            }
        }
    }
    class SuperTrendAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._str = SuperTrend(20, 2, MovingAverageType.Wilders)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._str.update(bar)
            if self._str.is_ready:
                # The current value of self._str is represented by self._str.current.value
                self.plot("SuperTrend", "str", self._str.current.value)
                # Plot all attributes of self._str
                self.plot("SuperTrend", "basic_upper_band", self._str.basic_upper_band)
                self.plot("SuperTrend", "basic_lower_band", self._str.basic_lower_band)
                self.plot("SuperTrend", "current_trailing_upper_band", self._str.current_trailing_upper_band)
                self.plot("SuperTrend", "current_trailing_lower_band", self._str.current_trailing_lower_band)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class SuperTrendAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SuperTrend _str;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _str = new SuperTrend(20, 2, MovingAverageType.Wilders);
            RegisterIndicator(_symbol, _str, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_str.IsReady)
            {
                // The current value of _str is represented by itself (_str)
                // or _str.Current.Value
                Plot("SuperTrend", "str", _str);
                
            }
        }
    }
    class SuperTrendAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._str = SuperTrend(20, 2, MovingAverageType.Wilders)
            self.register_indicator(self._symbol, self._str, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._str.is_ready:
                # The current value of self._str is represented by self._str.current.value
                self.plot("SuperTrend", "str", self._str.current.value)
                
    

    The following reference table describes the SuperTrend constructor:

    SuperTrend

    class QuantConnect.Indicators.SuperTrend [source]

    Super trend indicator. Formula can be found here via the excel file: https://tradingtuitions.com/supertrend-indicator-excel-sheet-with-realtime-buy-sell-signals/

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property basic_lower_band

    Basic Lower band

    Returns:

    Basic Lower band

    Return type:

    float

    property basic_upper_band

    Basic Upper Band

    Returns:

    Basic Upper Band

    Return type:

    float

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property current_trailing_lower_band

    Current Trailing Lower Band

    Returns:

    Current Trailing Lower Band

    Return type:

    float

    property current_trailing_upper_band

    Current Trailing Upper Band

    Returns:

    Current Trailing Upper Band

    Return type:

    float

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SuperTrend

    class QuantConnect.Indicators.SuperTrend [source]

    Super trend indicator. Formula can be found here via the excel file: https://tradingtuitions.com/supertrend-indicator-excel-sheet-with-realtime-buy-sell-signals/

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property BasicLowerBand

    Basic Lower band

    Returns:

    Basic Lower band

    Return type:

    decimal

    property BasicUpperBand

    Basic Upper Band

    Returns:

    Basic Upper Band

    Return type:

    decimal

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property CurrentTrailingLowerBand

    Current Trailing Lower Band

    Returns:

    Current Trailing Lower Band

    Return type:

    decimal

    property CurrentTrailingUpperBand

    Current Trailing Upper Band

    Returns:

    Current Trailing Upper Band

    Return type:

    decimal

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of SuperTrend using the plotly library.

    SuperTrend line plot.

     

    Supported Indicators

    Swiss Army Knife

    Introduction

    Swiss Army Knife indicator by John Ehlers

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using SWISS Indicator

    To create an automatic indicators for SwissArmyKnife , call the SWISS helper method from the QCAlgorithm class. The SWISS method creates a SwissArmyKnife object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class SwissArmyKnifeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SwissArmyKnife _swiss;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _swiss = SWISS(_symbol, 20, 0.2, SwissArmyKnifeTool.Gauss);
        }
    
        public override void OnData(Slice data)
        {
            if (_swiss.IsReady)
            {
                // The current value of _swiss is represented by itself (_swiss)
                // or _swiss.Current.Value
                Plot("SwissArmyKnife", "swiss", _swiss);
                
            }
        }
    }
    class SwissArmyKnifeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._swiss = self.swiss(self._symbol, 20, 0.2, SwissArmyKnifeTool.Gauss)
    
        def on_data(self, slice: Slice) -> None:
            if self._swiss.is_ready:
                # The current value of self._swiss is represented by self._swiss.current.value
                self.plot("SwissArmyKnife", "swiss", self._swiss.current.value)
                
    

    The following reference table describes the SWISS method:

    swiss( symbol, period, delta, tool, resolution=None, selector=None ) [source]

    Creates Swiss Army Knife transformation for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The calculation using the given tool

    Return type:

    SwissArmyKnife

    SWISS( symbol, period, delta, tool, resolution=None, selector=None ) [source]

    Creates Swiss Army Knife transformation for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The calculation using the given tool

    Return type:

    SwissArmyKnife

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a SwissArmyKnife indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class SwissArmyKnifeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SwissArmyKnife _swiss;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _swiss = new SwissArmyKnife(20, 0.2, SwissArmyKnifeTool.Gauss);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _swiss.Update(bar.EndTime, bar.Close);
            }
       
            if (_swiss.IsReady)
            {
                // The current value of _swiss is represented by itself (_swiss)
                // or _swiss.Current.Value
                Plot("SwissArmyKnife", "swiss", _swiss);
                
            }
        }
    }
    class SwissArmyKnifeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._swiss = SwissArmyKnife(20, 0.2, SwissArmyKnifeTool.Gauss)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._swiss.update(bar.EndTime, bar.Close)
            if self._swiss.is_ready:
                # The current value of self._swiss is represented by self._swiss.current.value
                self.plot("SwissArmyKnife", "swiss", self._swiss.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class SwissArmyKnifeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private SwissArmyKnife _swiss;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _swiss = new SwissArmyKnife(20, 0.2, SwissArmyKnifeTool.Gauss);
            RegisterIndicator(_symbol, _swiss, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_swiss.IsReady)
            {
                // The current value of _swiss is represented by itself (_swiss)
                // or _swiss.Current.Value
                Plot("SwissArmyKnife", "swiss", _swiss);
                
            }
        }
    }
    class SwissArmyKnifeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._swiss = SwissArmyKnife(20, 0.2, SwissArmyKnifeTool.Gauss)
            self.register_indicator(self._symbol, self._swiss, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._swiss.is_ready:
                # The current value of self._swiss is represented by self._swiss.current.value
                self.plot("SwissArmyKnife", "swiss", self._swiss.current.value)
                
    

    The following reference table describes the SwissArmyKnife constructor:

    SwissArmyKnife

    class QuantConnect.Indicators.SwissArmyKnife [source]

    Swiss Army Knife indicator by John Ehlers

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets to the initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SwissArmyKnife

    class QuantConnect.Indicators.SwissArmyKnife [source]

    Swiss Army Knife indicator by John Ehlers

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets to the initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of SwissArmyKnife using the plotly library.

    SwissArmyKnife line plot.

     

    Supported Indicators

    T3 Moving Average

    Introduction

    This indicator computes the T3 Moving Average (T3). The T3 Moving Average is calculated with the following formula: EMA1(x, Period) = EMA(x, Period) EMA2(x, Period) = EMA(EMA1(x, Period),Period) GD(x, Period, volumeFactor) = (EMA1(x, Period)*(1+volumeFactor)) - (EMA2(x, Period)* volumeFactor) T3 = GD(GD(GD(t, Period, volumeFactor), Period, volumeFactor), Period, volumeFactor);

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using T3 Indicator

    To create an automatic indicators for T3MovingAverage , call the T3 helper method from the QCAlgorithm class. The T3 method creates a T3MovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class T3MovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private T3MovingAverage _t3;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _t3 = T3(_symbol, 30, 0.7);
        }
    
        public override void OnData(Slice data)
        {
            if (_t3.IsReady)
            {
                // The current value of _t3 is represented by itself (_t3)
                // or _t3.Current.Value
                Plot("T3MovingAverage", "t3", _t3);
                
            }
        }
    }
    class T3MovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._t3 = self.t3(self._symbol, 30, 0.7)
    
        def on_data(self, slice: Slice) -> None:
            if self._t3.is_ready:
                # The current value of self._t3 is represented by self._t3.current.value
                self.plot("T3MovingAverage", "t3", self._t3.current.value)
                
    

    The following reference table describes the T3 method:

    T3( symbol, period, volumeFactor=0.7, resolution=None, selector=None ) [source]

    Creates a new T3MovingAverage indicator.

    Parameters:
    Returns:

    The T3MovingAverage indicator for the requested symbol over the specified period

    Return type:

    T3MovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a T3MovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class T3MovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private T3MovingAverage _t3;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _t3 = new T3MovingAverage(30, 0.7);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _t3.Update(bar.EndTime, bar.Close);
            }
       
            if (_t3.IsReady)
            {
                // The current value of _t3 is represented by itself (_t3)
                // or _t3.Current.Value
                Plot("T3MovingAverage", "t3", _t3);
                
            }
        }
    }
    class T3MovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._t3 = T3MovingAverage(30, 0.7)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._t3.update(bar.EndTime, bar.Close)
            if self._t3.is_ready:
                # The current value of self._t3 is represented by self._t3.current.value
                self.plot("T3MovingAverage", "t3", self._t3.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class T3MovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private T3MovingAverage _t3;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _t3 = new T3MovingAverage(30, 0.7);
            RegisterIndicator(_symbol, _t3, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_t3.IsReady)
            {
                // The current value of _t3 is represented by itself (_t3)
                // or _t3.Current.Value
                Plot("T3MovingAverage", "t3", _t3);
                
            }
        }
    }
    class T3MovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._t3 = T3MovingAverage(30, 0.7)
            self.register_indicator(self._symbol, self._t3, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._t3.is_ready:
                # The current value of self._t3 is represented by self._t3.current.value
                self.plot("T3MovingAverage", "t3", self._t3.current.value)
                
    

    The following reference table describes the T3MovingAverage constructor:

    T3MovingAverage

    class QuantConnect.Indicators.T3MovingAverage [source]

    This indicator computes the T3 Moving Average (T3). The T3 Moving Average is calculated with the following formula: EMA1(x, Period) = EMA(x, Period) EMA2(x, Period) = EMA(EMA1(x, Period),Period) GD(x, Period, volumeFactor) = (EMA1(x, Period)*(1+volumeFactor)) - (EMA2(x, Period)* volumeFactor) T3 = GD(GD(GD(t, Period, volumeFactor), Period, volumeFactor), Period, volumeFactor);

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    T3MovingAverage

    class QuantConnect.Indicators.T3MovingAverage [source]

    This indicator computes the T3 Moving Average (T3). The T3 Moving Average is calculated with the following formula: EMA1(x, Period) = EMA(x, Period) EMA2(x, Period) = EMA(EMA1(x, Period),Period) GD(x, Period, volumeFactor) = (EMA1(x, Period)*(1+volumeFactor)) - (EMA2(x, Period)* volumeFactor) T3 = GD(GD(GD(t, Period, volumeFactor), Period, volumeFactor), Period, volumeFactor);

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of T3MovingAverage using the plotly library.

    T3MovingAverage line plot.

     

    Supported Indicators

    Target Downside Deviation

    Introduction

    This indicator computes the n-period target downside deviation. The target downside deviation is defined as the root-mean-square, or RMS, of the deviations of the realized return’s underperformance from the target return where all returns above the target return are treated as underperformance of 0. Reference: https://www.cmegroup.com/education/files/rr-sortino-a-sharper-ratio.pdf

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using TDD Indicator

    To create an automatic indicators for TargetDownsideDeviation , call the TDD helper method from the QCAlgorithm class. The TDD method creates a TargetDownsideDeviation object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TargetDownsideDeviationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TargetDownsideDeviation _tdd;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tdd = TDD(_symbol, 50);
        }
    
        public override void OnData(Slice data)
        {
            if (_tdd.IsReady)
            {
                // The current value of _tdd is represented by itself (_tdd)
                // or _tdd.Current.Value
                Plot("TargetDownsideDeviation", "tdd", _tdd);
                
            }
        }
    }
    class TargetDownsideDeviationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tdd = self.tdd(self._symbol, 50)
    
        def on_data(self, slice: Slice) -> None:
            if self._tdd.is_ready:
                # The current value of self._tdd is represented by self._tdd.current.value
                self.plot("TargetDownsideDeviation", "tdd", self._tdd.current.value)
                
    

    The following reference table describes the TDD method:

    tdd( symbol, period, minimum_acceptable_return=0.0, resolution=None, selector=None ) [source]

    Creates a new TargetDownsideDeviation indicator. The target downside deviation is defined as the root-mean-square, or RMS, of the deviations of the realized return’s underperformance from the target return where all returns above the target return are treated as underperformance of 0.

    Parameters:
    Returns:

    The TargetDownsideDeviation indicator for the requested symbol over the specified period

    Return type:

    TargetDownsideDeviation

    TDD( symbol, period, minimumAcceptableReturn=0.0, resolution=None, selector=None ) [source]

    Creates a new TargetDownsideDeviation indicator. The target downside deviation is defined as the root-mean-square, or RMS, of the deviations of the realized return’s underperformance from the target return where all returns above the target return are treated as underperformance of 0.

    Parameters:
    Returns:

    The TargetDownsideDeviation indicator for the requested symbol over the specified period

    Return type:

    TargetDownsideDeviation

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a TargetDownsideDeviation indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class TargetDownsideDeviationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TargetDownsideDeviation _tdd;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tdd = new TargetDownsideDeviation(TargetDownsideDeviation(50), RateOfChange(1));
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _tdd.Update(bar.EndTime, bar.Close);
            }
       
            if (_tdd.IsReady)
            {
                // The current value of _tdd is represented by itself (_tdd)
                // or _tdd.Current.Value
                Plot("TargetDownsideDeviation", "tdd", _tdd);
                
            }
        }
    }
    class TargetDownsideDeviationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tdd = TargetDownsideDeviation(TargetDownsideDeviation(50), RateOfChange(1))
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._tdd.update(bar.EndTime, bar.Close)
            if self._tdd.is_ready:
                # The current value of self._tdd is represented by self._tdd.current.value
                self.plot("TargetDownsideDeviation", "tdd", self._tdd.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TargetDownsideDeviationAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TargetDownsideDeviation _tdd;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tdd = new TargetDownsideDeviation(TargetDownsideDeviation(50), RateOfChange(1));
            RegisterIndicator(_symbol, _tdd, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_tdd.IsReady)
            {
                // The current value of _tdd is represented by itself (_tdd)
                // or _tdd.Current.Value
                Plot("TargetDownsideDeviation", "tdd", _tdd);
                
            }
        }
    }
    class TargetDownsideDeviationAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tdd = TargetDownsideDeviation(TargetDownsideDeviation(50), RateOfChange(1))
            self.register_indicator(self._symbol, self._tdd, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._tdd.is_ready:
                # The current value of self._tdd is represented by self._tdd.current.value
                self.plot("TargetDownsideDeviation", "tdd", self._tdd.current.value)
                
    

    The following reference table describes the TargetDownsideDeviation constructor:

    TargetDownsideDeviation

    class QuantConnect.Indicators.TargetDownsideDeviation [source]

    This indicator computes the n-period target downside deviation. The target downside deviation is defined as the root-mean-square, or RMS, of the deviations of the realized return’s underperformance from the target return where all returns above the target return are treated as underperformance of 0. Reference: https://www.cmegroup.com/education/files/rr-sortino-a-sharper-ratio.pdf

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TargetDownsideDeviation

    class QuantConnect.Indicators.TargetDownsideDeviation [source]

    This indicator computes the n-period target downside deviation. The target downside deviation is defined as the root-mean-square, or RMS, of the deviations of the realized return’s underperformance from the target return where all returns above the target return are treated as underperformance of 0. Reference: https://www.cmegroup.com/education/files/rr-sortino-a-sharper-ratio.pdf

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of TargetDownsideDeviation using the plotly library.

    TargetDownsideDeviation line plot.

     

    Supported Indicators

    Theta

    Introduction

    Option Theta indicator that calculate the theta of an option

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using T Indicator

    To create an automatic indicators for Theta , call the T helper method from the QCAlgorithm class. The T method creates a Theta object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ThetaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Theta _t;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _t = T(_option, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (_t.IsReady)
            {
                // The current value of _t is represented by itself (_t)
                // or _t.Current.Value
                Plot("Theta", "t", _t);
                // Plot all properties of t
                Plot("Theta", "impliedvolatility", _t.ImpliedVolatility);
                Plot("Theta", "riskfreerate", _t.RiskFreeRate);
                Plot("Theta", "dividendyield", _t.DividendYield);
                Plot("Theta", "price", _t.Price);
                Plot("Theta", "oppositeprice", _t.OppositePrice);
                Plot("Theta", "underlyingprice", _t.UnderlyingPrice);
            }
        }
    }
    class ThetaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._t = self.t(self.option, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            if self._t.is_ready:
                # The current value of self._t is represented by self._t.current.value
                self.plot("Theta", "t", self._t.current.value)
                # Plot all attributes of self._t
                self.plot("Theta", "implied_volatility", self._t.implied_volatility.current.value)
                self.plot("Theta", "risk_free_rate", self._t.risk_free_rate.current.value)
                self.plot("Theta", "dividend_yield", self._t.dividend_yield.current.value)
                self.plot("Theta", "price", self._t.price.current.value)
                self.plot("Theta", "opposite_price", self._t.opposite_price.current.value)
                self.plot("Theta", "underlying_price", self._t.underlying_price.current.value)
    

    The following reference table describes the T method:

    t( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    For the given symbol will resolve the ticker it used at the current algorithm date

    Parameters:
    Returns:

    A new Theta indicator for the specified symbol

    Return type:

    Theta

    T( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    For the given symbol will resolve the ticker it used at the current algorithm date

    Parameters:
    Returns:

    A new Theta indicator for the specified symbol

    Return type:

    Theta

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Theta indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class ThetaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Theta _t;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _t = new Theta(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _t.Update(new IndicatorDataPoint(_symbol, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_option, out bar))
            {      
                _t.Update(new IndicatorDataPoint(_option, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_mirrorOption, out bar))
            {      
                _t.Update(new IndicatorDataPoint(_mirrorOption, bar.EndTime, bar.Close));
            }
       
            if (_t.IsReady)
            {
                // The current value of _t is represented by itself (_t)
                // or _t.Current.Value
                Plot("Theta", "t", _t);
                // Plot all properties of t
                Plot("Theta", "impliedvolatility", _t.ImpliedVolatility);
                Plot("Theta", "riskfreerate", _t.RiskFreeRate);
                Plot("Theta", "dividendyield", _t.DividendYield);
                Plot("Theta", "price", _t.Price);
                Plot("Theta", "oppositeprice", _t.OppositePrice);
                Plot("Theta", "underlyingprice", _t.UnderlyingPrice);
            }
        }
    }
    class ThetaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._t = Theta(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._t.update(IndicatorDataPoint(self._symbol, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.option)
            if bar:
                self._t.update(IndicatorDataPoint(self.option, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.mirror_option)
            if bar:
                self._t.update(IndicatorDataPoint(self.mirror_option, bar.end_time, bar.close))
            if self._t.is_ready:
                # The current value of self._t is represented by self._t.current.value
                self.plot("Theta", "t", self._t.current.value)
                # Plot all attributes of self._t
                self.plot("Theta", "implied_volatility", self._t.implied_volatility.current.value)
                self.plot("Theta", "risk_free_rate", self._t.risk_free_rate.current.value)
                self.plot("Theta", "dividend_yield", self._t.dividend_yield.current.value)
                self.plot("Theta", "price", self._t.price.current.value)
                self.plot("Theta", "opposite_price", self._t.opposite_price.current.value)
                self.plot("Theta", "underlying_price", self._t.underlying_price.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ThetaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Theta _t;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _t = new Theta(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
            RegisterIndicator(_symbol, _t, Resolution.Daily);
            RegisterIndicator(_option, _t, Resolution.Daily);
            RegisterIndicator(_mirrorOption, _t, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_t.IsReady)
            {
                // The current value of _t is represented by itself (_t)
                // or _t.Current.Value
                Plot("Theta", "t", _t);
                // Plot all properties of t
                Plot("Theta", "impliedvolatility", _t.ImpliedVolatility);
                Plot("Theta", "riskfreerate", _t.RiskFreeRate);
                Plot("Theta", "dividendyield", _t.DividendYield);
                Plot("Theta", "price", _t.Price);
                Plot("Theta", "oppositeprice", _t.OppositePrice);
                Plot("Theta", "underlyingprice", _t.UnderlyingPrice);
            }
        }
    }
    class ThetaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._t = Theta(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
            self.register_indicator(self._symbol, self._t, Resolution.DAILY)
            self.register_indicator(self.option, self._t, Resolution.DAILY)
            self.register_indicator(self.mirror_option, self._t, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._t.is_ready:
                # The current value of self._t is represented by self._t.current.value
                self.plot("Theta", "t", self._t.current.value)
                # Plot all attributes of self._t
                self.plot("Theta", "implied_volatility", self._t.implied_volatility.current.value)
                self.plot("Theta", "risk_free_rate", self._t.risk_free_rate.current.value)
                self.plot("Theta", "dividend_yield", self._t.dividend_yield.current.value)
                self.plot("Theta", "price", self._t.price.current.value)
                self.plot("Theta", "opposite_price", self._t.opposite_price.current.value)
                self.plot("Theta", "underlying_price", self._t.underlying_price.current.value)
    

    The following reference table describes the Theta constructor:

    Theta

    class QuantConnect.Indicators.Theta [source]

    Option Theta indicator that calculate the theta of an option

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and all sub-indicators

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property dividend_yield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    datetime

    property implied_volatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property opposite_price

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property risk_free_rate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    float

    property style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property underlying_price

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property use_mirror_contract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Theta

    class QuantConnect.Indicators.Theta [source]

    Option Theta indicator that calculate the theta of an option

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and all sub-indicators

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property DividendYield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property Expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    DateTime

    property ImpliedVolatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property OppositePrice

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property RiskFreeRate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    decimal

    property Style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property UnderlyingPrice

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property UseMirrorContract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Theta using the plotly library.

    Theta line plot.

     

    Supported Indicators

    Time Profile

    Introduction

    This indicator represents an Indicator of the Market Profile with Time Price Opportunity (TPO) mode and its attributes

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using TP Indicator

    To create an automatic indicators for TimeProfile , call the TP helper method from the QCAlgorithm class. The TP method creates a TimeProfile object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TimeProfileAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TimeProfile _tp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tp = TP(_symbol, 3, 0.70, 0.05);
        }
    
        public override void OnData(Slice data)
        {
            if (_tp.IsReady)
            {
                // The current value of _tp is represented by itself (_tp)
                // or _tp.Current.Value
                Plot("TimeProfile", "tp", _tp);
                // Plot all properties of tp
                Plot("TimeProfile", "profilehigh", _tp.ProfileHigh);
                Plot("TimeProfile", "profilelow", _tp.ProfileLow);
                Plot("TimeProfile", "pocprice", _tp.POCPrice);
                Plot("TimeProfile", "pocvolume", _tp.POCVolume);
                Plot("TimeProfile", "valueareavolume", _tp.ValueAreaVolume);
                Plot("TimeProfile", "valueareahigh", _tp.ValueAreaHigh);
                Plot("TimeProfile", "valuearealow", _tp.ValueAreaLow);
            }
        }
    }
    class TimeProfileAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tp = self.tp(self._symbol, 3, 0.70, 0.05)
    
        def on_data(self, slice: Slice) -> None:
            if self._tp.is_ready:
                # The current value of self._tp is represented by self._tp.current.value
                self.plot("TimeProfile", "tp", self._tp.current.value)
                # Plot all attributes of self._tp
                self.plot("TimeProfile", "profile_high", self._tp.profile_high)
                self.plot("TimeProfile", "profile_low", self._tp.profile_low)
                self.plot("TimeProfile", "poc_price", self._tp.poc_price)
                self.plot("TimeProfile", "poc_volume", self._tp.poc_volume)
                self.plot("TimeProfile", "value_area_volume", self._tp.value_area_volume)
                self.plot("TimeProfile", "value_area_high", self._tp.value_area_high)
                self.plot("TimeProfile", "value_area_low", self._tp.value_area_low)
    

    The following reference table describes the TP method:

    tp( symbol, period=2, value_area_volume_percentage=0.7, price_range_round_off=0.05, resolution=4, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Time Price Opportunity (TPO) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Time Profile indicator for the given parameters

    Return type:

    TimeProfile

    TP( symbol, period=2, valueAreaVolumePercentage=0.7, priceRangeRoundOff=0.05, resolution=4, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Time Price Opportunity (TPO) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Time Profile indicator for the given parameters

    Return type:

    TimeProfile

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a TimeProfile indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class TimeProfileAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TimeProfile _tp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tp = new TimeProfile("", 3, 0.70, 0.05);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _tp.Update(bar);
            }
       
            if (_tp.IsReady)
            {
                // The current value of _tp is represented by itself (_tp)
                // or _tp.Current.Value
                Plot("TimeProfile", "tp", _tp);
                // Plot all properties of tp
                Plot("TimeProfile", "profilehigh", _tp.ProfileHigh);
                Plot("TimeProfile", "profilelow", _tp.ProfileLow);
                Plot("TimeProfile", "pocprice", _tp.POCPrice);
                Plot("TimeProfile", "pocvolume", _tp.POCVolume);
                Plot("TimeProfile", "valueareavolume", _tp.ValueAreaVolume);
                Plot("TimeProfile", "valueareahigh", _tp.ValueAreaHigh);
                Plot("TimeProfile", "valuearealow", _tp.ValueAreaLow);
            }
        }
    }
    class TimeProfileAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tp = TimeProfile("", 3, 0.70, 0.05)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._tp.update(bar)
            if self._tp.is_ready:
                # The current value of self._tp is represented by self._tp.current.value
                self.plot("TimeProfile", "tp", self._tp.current.value)
                # Plot all attributes of self._tp
                self.plot("TimeProfile", "profile_high", self._tp.profile_high)
                self.plot("TimeProfile", "profile_low", self._tp.profile_low)
                self.plot("TimeProfile", "poc_price", self._tp.poc_price)
                self.plot("TimeProfile", "poc_volume", self._tp.poc_volume)
                self.plot("TimeProfile", "value_area_volume", self._tp.value_area_volume)
                self.plot("TimeProfile", "value_area_high", self._tp.value_area_high)
                self.plot("TimeProfile", "value_area_low", self._tp.value_area_low)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TimeProfileAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TimeProfile _tp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tp = new TimeProfile("", 3, 0.70, 0.05);
            RegisterIndicator(_symbol, _tp, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_tp.IsReady)
            {
                // The current value of _tp is represented by itself (_tp)
                // or _tp.Current.Value
                Plot("TimeProfile", "tp", _tp);
                
            }
        }
    }
    class TimeProfileAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tp = TimeProfile("", 3, 0.70, 0.05)
            self.register_indicator(self._symbol, self._tp, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._tp.is_ready:
                # The current value of self._tp is represented by self._tp.current.value
                self.plot("TimeProfile", "tp", self._tp.current.value)
                
    

    The following reference table describes the TimeProfile constructor:

    TimeProfile

    class QuantConnect.Indicators.TimeProfile [source]

    Represents an Indicator of the Market Profile with Time Price Opportunity (TPO) mode and its attributes

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property poc_price

    Price where the most trading occured (Point of Control(POC)) This price is MarketProfile.Current.Value

    Returns:

    Price where the most trading occured (Point of Control(POC)) This price is MarketProfile.Current.Value

    Return type:

    float

    property poc_volume

    Volume where the most tradding occured (Point of Control(POC))

    Returns:

    Volume where the most tradding occured (Point of Control(POC))

    Return type:

    float

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property profile_high

    The highest reached close price level during the period. That value is called Profile High

    Returns:

    The highest reached close price level during the period. That value is called Profile High

    Return type:

    float

    property profile_low

    The lowest reached close price level during the period. That value is called Profile Low

    Returns:

    The lowest reached close price level during the period. That value is called Profile Low

    Return type:

    float

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property value_area_high

    The highest close price level within the value area

    Returns:

    The highest close price level within the value area

    Return type:

    float

    property value_area_low

    The lowest close price level within the value area

    Returns:

    The lowest close price level within the value area

    Return type:

    float

    property value_area_volume

    The range of price levels in which a specified percentage of all volume was traded during the time period. Typically, this percentage is set to 70% however it is up to the trader’s discretion.

    Returns:

    The range of price levels in which a specified percentage of all volume was traded during the time period. Typically, this percentage is set to 70% however it is up to the trader’s discretion.

    Return type:

    float

    property volume_per_price

    Get a copy of the _volumePerPrice field

    Returns:

    Get a copy of the _volumePerPrice field

    Return type:

    SortedList[float, float]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TimeProfile

    class QuantConnect.Indicators.TimeProfile [source]

    Represents an Indicator of the Market Profile with Time Price Opportunity (TPO) mode and its attributes

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property POCPrice

    Price where the most trading occured (Point of Control(POC)) This price is MarketProfile.Current.Value

    Returns:

    Price where the most trading occured (Point of Control(POC)) This price is MarketProfile.Current.Value

    Return type:

    decimal

    property POCVolume

    Volume where the most tradding occured (Point of Control(POC))

    Returns:

    Volume where the most tradding occured (Point of Control(POC))

    Return type:

    decimal

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property ProfileHigh

    The highest reached close price level during the period. That value is called Profile High

    Returns:

    The highest reached close price level during the period. That value is called Profile High

    Return type:

    decimal

    property ProfileLow

    The lowest reached close price level during the period. That value is called Profile Low

    Returns:

    The lowest reached close price level during the period. That value is called Profile Low

    Return type:

    decimal

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property ValueAreaHigh

    The highest close price level within the value area

    Returns:

    The highest close price level within the value area

    Return type:

    decimal

    property ValueAreaLow

    The lowest close price level within the value area

    Returns:

    The lowest close price level within the value area

    Return type:

    decimal

    property ValueAreaVolume

    The range of price levels in which a specified percentage of all volume was traded during the time period. Typically, this percentage is set to 70% however it is up to the trader’s discretion.

    Returns:

    The range of price levels in which a specified percentage of all volume was traded during the time period. Typically, this percentage is set to 70% however it is up to the trader’s discretion.

    Return type:

    decimal

    property VolumePerPrice

    Get a copy of the _volumePerPrice field

    Returns:

    Get a copy of the _volumePerPrice field

    Return type:

    SortedList<Decimal, Decimal>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of TimeProfile using the plotly library.

    TimeProfile line plot.

     

    Supported Indicators

    Time Series Forecast

    Introduction

    This indicator represents an indicator capable of predicting new values given previous data from a window. source

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using TSF Indicator

    To create an automatic indicators for TimeSeriesForecast , call the TSF helper method from the QCAlgorithm class. The TSF method creates a TimeSeriesForecast object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TimeSeriesForecastAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TimeSeriesForecast _tsf;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tsf = TSF(_symbol, 3);
        }
    
        public override void OnData(Slice data)
        {
            if (_tsf.IsReady)
            {
                // The current value of _tsf is represented by itself (_tsf)
                // or _tsf.Current.Value
                Plot("TimeSeriesForecast", "tsf", _tsf);
                
            }
        }
    }
    class TimeSeriesForecastAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tsf = self.tsf(self._symbol, 3)
    
        def on_data(self, slice: Slice) -> None:
            if self._tsf.is_ready:
                # The current value of self._tsf is represented by self._tsf.current.value
                self.plot("TimeSeriesForecast", "tsf", self._tsf.current.value)
                
    

    The following reference table describes the TSF method:

    tsf( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Time Series Forecast indicator

    Parameters:
    Returns:

    The TimeSeriesForecast indicator for the requested symbol over the specified period

    Return type:

    TimeSeriesForecast

    TSF( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Time Series Forecast indicator

    Parameters:
    Returns:

    The TimeSeriesForecast indicator for the requested symbol over the specified period

    Return type:

    TimeSeriesForecast

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a TimeSeriesForecast indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class TimeSeriesForecastAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TimeSeriesForecast _tsf;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tsf = new TimeSeriesForecast(3);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _tsf.Update(bar.EndTime, bar.Close);
            }
       
            if (_tsf.IsReady)
            {
                // The current value of _tsf is represented by itself (_tsf)
                // or _tsf.Current.Value
                Plot("TimeSeriesForecast", "tsf", _tsf);
                
            }
        }
    }
    class TimeSeriesForecastAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tsf = TimeSeriesForecast(3)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._tsf.update(bar.EndTime, bar.Close)
            if self._tsf.is_ready:
                # The current value of self._tsf is represented by self._tsf.current.value
                self.plot("TimeSeriesForecast", "tsf", self._tsf.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TimeSeriesForecastAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TimeSeriesForecast _tsf;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tsf = new TimeSeriesForecast(3);
            RegisterIndicator(_symbol, _tsf, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_tsf.IsReady)
            {
                // The current value of _tsf is represented by itself (_tsf)
                // or _tsf.Current.Value
                Plot("TimeSeriesForecast", "tsf", _tsf);
                
            }
        }
    }
    class TimeSeriesForecastAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tsf = TimeSeriesForecast(3)
            self.register_indicator(self._symbol, self._tsf, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._tsf.is_ready:
                # The current value of self._tsf is represented by self._tsf.current.value
                self.plot("TimeSeriesForecast", "tsf", self._tsf.current.value)
                
    

    The following reference table describes the TimeSeriesForecast constructor:

    TimeSeriesForecast

    class QuantConnect.Indicators.TimeSeriesForecast [source]

    Represents an indicator capable of predicting new values given previous data from a window. Source: https://tulipindicators.org/tsf

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TimeSeriesForecast

    class QuantConnect.Indicators.TimeSeriesForecast [source]

    Represents an indicator capable of predicting new values given previous data from a window. Source: https://tulipindicators.org/tsf

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of TimeSeriesForecast using the plotly library.

    TimeSeriesForecast line plot.

     

    Supported Indicators

    Triangular Moving Average

    Introduction

    This indicator computes the Triangular Moving Average (TRIMA). The Triangular Moving Average is calculated with the following formula: (1) When the period is even, TRIMA(x,period)=SMA(SMA(x,period/2),(period/2)+1) (2) When the period is odd, TRIMA(x,period)=SMA(SMA(x,(period+1)/2),(period+1)/2)

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using TRIMA Indicator

    To create an automatic indicators for TriangularMovingAverage , call the TRIMA helper method from the QCAlgorithm class. The TRIMA method creates a TriangularMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TriangularMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TriangularMovingAverage _trima;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _trima = TRIMA(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_trima.IsReady)
            {
                // The current value of _trima is represented by itself (_trima)
                // or _trima.Current.Value
                Plot("TriangularMovingAverage", "trima", _trima);
                
            }
        }
    }
    class TriangularMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._trima = self.trima(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._trima.is_ready:
                # The current value of self._trima is represented by self._trima.current.value
                self.plot("TriangularMovingAverage", "trima", self._trima.current.value)
                
    

    The following reference table describes the TRIMA method:

    trima( symbol, period, resolution=None, selector=None ) [source]

    Creates a new TriangularMovingAverage indicator.

    Parameters:
    Returns:

    The TriangularMovingAverage indicator for the requested symbol over the specified period

    Return type:

    TriangularMovingAverage

    TRIMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new TriangularMovingAverage indicator.

    Parameters:
    Returns:

    The TriangularMovingAverage indicator for the requested symbol over the specified period

    Return type:

    TriangularMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a TriangularMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class TriangularMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TriangularMovingAverage _trima;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _trima = new TriangularMovingAverage(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _trima.Update(bar.EndTime, bar.Close);
            }
       
            if (_trima.IsReady)
            {
                // The current value of _trima is represented by itself (_trima)
                // or _trima.Current.Value
                Plot("TriangularMovingAverage", "trima", _trima);
                
            }
        }
    }
    class TriangularMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._trima = TriangularMovingAverage(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._trima.update(bar.EndTime, bar.Close)
            if self._trima.is_ready:
                # The current value of self._trima is represented by self._trima.current.value
                self.plot("TriangularMovingAverage", "trima", self._trima.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TriangularMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TriangularMovingAverage _trima;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _trima = new TriangularMovingAverage(20);
            RegisterIndicator(_symbol, _trima, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_trima.IsReady)
            {
                // The current value of _trima is represented by itself (_trima)
                // or _trima.Current.Value
                Plot("TriangularMovingAverage", "trima", _trima);
                
            }
        }
    }
    class TriangularMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._trima = TriangularMovingAverage(20)
            self.register_indicator(self._symbol, self._trima, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._trima.is_ready:
                # The current value of self._trima is represented by self._trima.current.value
                self.plot("TriangularMovingAverage", "trima", self._trima.current.value)
                
    

    The following reference table describes the TriangularMovingAverage constructor:

    TriangularMovingAverage

    class QuantConnect.Indicators.TriangularMovingAverage [source]

    This indicator computes the Triangular Moving Average (TRIMA). The Triangular Moving Average is calculated with the following formula: (1) When the period is even, TRIMA(x,period)=SMA(SMA(x,period/2),(period/2)+1) (2) When the period is odd, TRIMA(x,period)=SMA(SMA(x,(period+1)/2),(period+1)/2)

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TriangularMovingAverage

    class QuantConnect.Indicators.TriangularMovingAverage [source]

    This indicator computes the Triangular Moving Average (TRIMA). The Triangular Moving Average is calculated with the following formula: (1) When the period is even, TRIMA(x,period)=SMA(SMA(x,period/2),(period/2)+1) (2) When the period is odd, TRIMA(x,period)=SMA(SMA(x,(period+1)/2),(period+1)/2)

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of TriangularMovingAverage using the plotly library.

    TriangularMovingAverage line plot.

     

    Supported Indicators

    Triple Exponential Moving Average

    Introduction

    This indicator computes the Triple Exponential Moving Average (TEMA). The Triple Exponential Moving Average is calculated with the following formula: EMA1 = EMA(t,period) EMA2 = EMA(EMA(t,period),period) EMA3 = EMA(EMA(EMA(t,period),period),period) TEMA = 3 * EMA1 - 3 * EMA2 + EMA3

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using TEMA Indicator

    To create an automatic indicators for TripleExponentialMovingAverage , call the TEMA helper method from the QCAlgorithm class. The TEMA method creates a TripleExponentialMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TripleExponentialMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TripleExponentialMovingAverage _tema;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tema = TEMA(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_tema.IsReady)
            {
                // The current value of _tema is represented by itself (_tema)
                // or _tema.Current.Value
                Plot("TripleExponentialMovingAverage", "tema", _tema);
                
            }
        }
    }
    class TripleExponentialMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tema = self.tema(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._tema.is_ready:
                # The current value of self._tema is represented by self._tema.current.value
                self.plot("TripleExponentialMovingAverage", "tema", self._tema.current.value)
                
    

    The following reference table describes the TEMA method:

    tema( symbol, period, resolution=None, selector=None ) [source]

    Creates a new TripleExponentialMovingAverage indicator.

    Parameters:
    Returns:

    The TripleExponentialMovingAverage indicator for the requested symbol over the specified period

    Return type:

    TripleExponentialMovingAverage

    TEMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new TripleExponentialMovingAverage indicator.

    Parameters:
    Returns:

    The TripleExponentialMovingAverage indicator for the requested symbol over the specified period

    Return type:

    TripleExponentialMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a TripleExponentialMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class TripleExponentialMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TripleExponentialMovingAverage _tema;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tema = new TripleExponentialMovingAverage(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _tema.Update(bar.EndTime, bar.Close);
            }
       
            if (_tema.IsReady)
            {
                // The current value of _tema is represented by itself (_tema)
                // or _tema.Current.Value
                Plot("TripleExponentialMovingAverage", "tema", _tema);
                
            }
        }
    }
    class TripleExponentialMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tema = TripleExponentialMovingAverage(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._tema.update(bar.EndTime, bar.Close)
            if self._tema.is_ready:
                # The current value of self._tema is represented by self._tema.current.value
                self.plot("TripleExponentialMovingAverage", "tema", self._tema.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TripleExponentialMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TripleExponentialMovingAverage _tema;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tema = new TripleExponentialMovingAverage(20);
            RegisterIndicator(_symbol, _tema, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_tema.IsReady)
            {
                // The current value of _tema is represented by itself (_tema)
                // or _tema.Current.Value
                Plot("TripleExponentialMovingAverage", "tema", _tema);
                
            }
        }
    }
    class TripleExponentialMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tema = TripleExponentialMovingAverage(20)
            self.register_indicator(self._symbol, self._tema, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._tema.is_ready:
                # The current value of self._tema is represented by self._tema.current.value
                self.plot("TripleExponentialMovingAverage", "tema", self._tema.current.value)
                
    

    The following reference table describes the TripleExponentialMovingAverage constructor:

    TripleExponentialMovingAverage

    class QuantConnect.Indicators.TripleExponentialMovingAverage [source]

    This indicator computes the Triple Exponential Moving Average (TEMA). The Triple Exponential Moving Average is calculated with the following formula: EMA1 = EMA(t,period) EMA2 = EMA(EMA(t,period),period) EMA3 = EMA(EMA(EMA(t,period),period),period) TEMA = 3 * EMA1 - 3 * EMA2 + EMA3

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TripleExponentialMovingAverage

    class QuantConnect.Indicators.TripleExponentialMovingAverage [source]

    This indicator computes the Triple Exponential Moving Average (TEMA). The Triple Exponential Moving Average is calculated with the following formula: EMA1 = EMA(t,period) EMA2 = EMA(EMA(t,period),period) EMA3 = EMA(EMA(EMA(t,period),period),period) TEMA = 3 * EMA1 - 3 * EMA2 + EMA3

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of TripleExponentialMovingAverage using the plotly library.

    TripleExponentialMovingAverage line plot.

     

    Supported Indicators

    Trix

    Introduction

    This indicator computes the TRIX (1-period ROC of a Triple EMA) The TRIX is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:trix

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using TRIX Indicator

    To create an automatic indicators for Trix , call the TRIX helper method from the QCAlgorithm class. The TRIX method creates a Trix object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TrixAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Trix _trix;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _trix = TRIX(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_trix.IsReady)
            {
                // The current value of _trix is represented by itself (_trix)
                // or _trix.Current.Value
                Plot("Trix", "trix", _trix);
                
            }
        }
    }
    class TrixAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._trix = self.trix(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._trix.is_ready:
                # The current value of self._trix is represented by self._trix.current.value
                self.plot("Trix", "trix", self._trix.current.value)
                
    

    The following reference table describes the TRIX method:

    trix( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Trix indicator.

    Parameters:
    Returns:

    The Trix indicator for the requested symbol over the specified period

    Return type:

    Trix

    TRIX( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Trix indicator.

    Parameters:
    Returns:

    The Trix indicator for the requested symbol over the specified period

    Return type:

    Trix

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Trix indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class TrixAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Trix _trix;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _trix = new Trix(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _trix.Update(bar.EndTime, bar.Close);
            }
       
            if (_trix.IsReady)
            {
                // The current value of _trix is represented by itself (_trix)
                // or _trix.Current.Value
                Plot("Trix", "trix", _trix);
                
            }
        }
    }
    class TrixAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._trix = Trix(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._trix.update(bar.EndTime, bar.Close)
            if self._trix.is_ready:
                # The current value of self._trix is represented by self._trix.current.value
                self.plot("Trix", "trix", self._trix.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TrixAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Trix _trix;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _trix = new Trix(20);
            RegisterIndicator(_symbol, _trix, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_trix.IsReady)
            {
                // The current value of _trix is represented by itself (_trix)
                // or _trix.Current.Value
                Plot("Trix", "trix", _trix);
                
            }
        }
    }
    class TrixAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._trix = Trix(20)
            self.register_indicator(self._symbol, self._trix, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._trix.is_ready:
                # The current value of self._trix is represented by self._trix.current.value
                self.plot("Trix", "trix", self._trix.current.value)
                
    

    The following reference table describes the Trix constructor:

    Trix

    class QuantConnect.Indicators.Trix [source]

    This indicator computes the TRIX (1-period ROC of a Triple EMA) The TRIX is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:trix

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized. We have 3 EMAs chained on base period so every _period points starts the next EMA, hence -1 on the multiplication, and finally the last ema updates our _roc which needs to be warmed up before this indicator is warmed up.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. We have 3 EMAs chained on base period so every _period points starts the next EMA, hence -1 on the multiplication, and finally the last ema updates our _roc which needs to be warmed up before this indicator is warmed up.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Trix

    class QuantConnect.Indicators.Trix [source]

    This indicator computes the TRIX (1-period ROC of a Triple EMA) The TRIX is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:trix

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized. We have 3 EMAs chained on base period so every _period points starts the next EMA, hence -1 on the multiplication, and finally the last ema updates our _roc which needs to be warmed up before this indicator is warmed up.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized. We have 3 EMAs chained on base period so every _period points starts the next EMA, hence -1 on the multiplication, and finally the last ema updates our _roc which needs to be warmed up before this indicator is warmed up.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Trix using the plotly library.

    Trix line plot.

     

    Supported Indicators

    True Range

    Introduction

    This indicator computes the True Range (TR). The True Range is the greatest of the following values: value1 = distance from today's high to today's low. value2 = distance from yesterday's close to today's high. value3 = distance from yesterday's close to today's low.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using TR Indicator

    To create an automatic indicators for TrueRange , call the TR helper method from the QCAlgorithm class. The TR method creates a TrueRange object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TrueRangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TrueRange _tr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tr = TR(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_tr.IsReady)
            {
                // The current value of _tr is represented by itself (_tr)
                // or _tr.Current.Value
                Plot("TrueRange", "tr", _tr);
                
            }
        }
    }
    class TrueRangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tr = self.tr(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._tr.is_ready:
                # The current value of self._tr is represented by self._tr.current.value
                self.plot("TrueRange", "tr", self._tr.current.value)
                
    

    The following reference table describes the TR method:

    tr( symbol, resolution=None, selector=None ) [source]

    Creates a new TrueRange indicator.

    Parameters:
    Returns:

    The TrueRange indicator for the requested symbol.

    Return type:

    TrueRange

    TR( symbol, resolution=None, selector=None ) [source]

    Creates a new TrueRange indicator.

    Parameters:
    Returns:

    The TrueRange indicator for the requested symbol.

    Return type:

    TrueRange

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a TrueRange indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class TrueRangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TrueRange _tr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tr = new TrueRange();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _tr.Update(bar);
            }
       
            if (_tr.IsReady)
            {
                // The current value of _tr is represented by itself (_tr)
                // or _tr.Current.Value
                Plot("TrueRange", "tr", _tr);
                
            }
        }
    }
    class TrueRangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tr = TrueRange()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._tr.update(bar)
            if self._tr.is_ready:
                # The current value of self._tr is represented by self._tr.current.value
                self.plot("TrueRange", "tr", self._tr.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TrueRangeAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TrueRange _tr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tr = new TrueRange();
            RegisterIndicator(_symbol, _tr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_tr.IsReady)
            {
                // The current value of _tr is represented by itself (_tr)
                // or _tr.Current.Value
                Plot("TrueRange", "tr", _tr);
                
            }
        }
    }
    class TrueRangeAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tr = TrueRange()
            self.register_indicator(self._symbol, self._tr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._tr.is_ready:
                # The current value of self._tr is represented by self._tr.current.value
                self.plot("TrueRange", "tr", self._tr.current.value)
                
    

    The following reference table describes the TrueRange constructor:

    TrueRange

    class QuantConnect.Indicators.TrueRange [source]

    This indicator computes the True Range (TR). The True Range is the greatest of the following values: value1 = distance from today's high to today's low. value2 = distance from yesterday's close to today's high. value3 = distance from yesterday's close to today's low.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TrueRange

    class QuantConnect.Indicators.TrueRange [source]

    This indicator computes the True Range (TR). The True Range is the greatest of the following values: value1 = distance from today's high to today's low. value2 = distance from yesterday's close to today's high. value3 = distance from yesterday's close to today's low.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of TrueRange using the plotly library.

    TrueRange line plot.

     

    Supported Indicators

    True Strength Index

    Introduction

    This indicator computes the True Strength Index (TSI). The True Strength Index is calculated as explained here: https://school.stockcharts.com/doku.php?id=technical_indicators:True_strength_index Briefly, the calculation has three steps: 1. Smooth the momentum and the absolute momentum by getting an EMA of them (typically of period 25) 2. Double smooth the momentum and the absolute momentum by getting an EMA of their EMA (typically of period 13) 3. The TSI formula itself: divide the double-smoothed momentum over the double-smoothed absolute momentum and multiply by 100 The signal is typically a 7-to-12-EMA of the TSI.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using TSI Indicator

    To create an automatic indicators for TrueStrengthIndex , call the TSI helper method from the QCAlgorithm class. The TSI method creates a TrueStrengthIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class TrueStrengthIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TrueStrengthIndex _tsi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tsi = TSI(_symbol, 25, 13, 7, MovingAverageType.Exponential);
        }
    
        public override void OnData(Slice data)
        {
            if (_tsi.IsReady)
            {
                // The current value of _tsi is represented by itself (_tsi)
                // or _tsi.Current.Value
                Plot("TrueStrengthIndex", "tsi", _tsi);
                // Plot all properties of tsi
                Plot("TrueStrengthIndex", "signal", _tsi.Signal);
            }
        }
    }
    class TrueStrengthIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tsi = self.tsi(self._symbol, 25, 13, 7, MovingAverageType.Exponential)
    
        def on_data(self, slice: Slice) -> None:
            if self._tsi.is_ready:
                # The current value of self._tsi is represented by self._tsi.current.value
                self.plot("TrueStrengthIndex", "tsi", self._tsi.current.value)
                # Plot all attributes of self._tsi
                self.plot("TrueStrengthIndex", "signal", self._tsi.signal.current.value)
    

    The following reference table describes the TSI method:

    tsi( symbol, long_term_period=25, short_term_period=13, signal_period=7, signal_type=1, resolution=None, selector=None ) [source]

    Creates a TrueStrengthIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The TrueStrengthIndex indicator for the given parameters

    Return type:

    TrueStrengthIndex

    TSI( symbol, longTermPeriod=25, shortTermPeriod=13, signalPeriod=7, signalType=1, resolution=None, selector=None ) [source]

    Creates a TrueStrengthIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The TrueStrengthIndex indicator for the given parameters

    Return type:

    TrueStrengthIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a TrueStrengthIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class TrueStrengthIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TrueStrengthIndex _tsi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tsi = new TrueStrengthIndex(25, 13, 7, MovingAverageType.Exponential);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _tsi.Update(bar.EndTime, bar.Close);
            }
       
            if (_tsi.IsReady)
            {
                // The current value of _tsi is represented by itself (_tsi)
                // or _tsi.Current.Value
                Plot("TrueStrengthIndex", "tsi", _tsi);
                // Plot all properties of tsi
                Plot("TrueStrengthIndex", "signal", _tsi.Signal);
            }
        }
    }
    class TrueStrengthIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tsi = TrueStrengthIndex(25, 13, 7, MovingAverageType.Exponential)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._tsi.update(bar.EndTime, bar.Close)
            if self._tsi.is_ready:
                # The current value of self._tsi is represented by self._tsi.current.value
                self.plot("TrueStrengthIndex", "tsi", self._tsi.current.value)
                # Plot all attributes of self._tsi
                self.plot("TrueStrengthIndex", "signal", self._tsi.signal.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class TrueStrengthIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private TrueStrengthIndex _tsi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _tsi = new TrueStrengthIndex(25, 13, 7, MovingAverageType.Exponential);
            RegisterIndicator(_symbol, _tsi, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_tsi.IsReady)
            {
                // The current value of _tsi is represented by itself (_tsi)
                // or _tsi.Current.Value
                Plot("TrueStrengthIndex", "tsi", _tsi);
                // Plot all properties of tsi
                Plot("TrueStrengthIndex", "signal", _tsi.Signal);
            }
        }
    }
    class TrueStrengthIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._tsi = TrueStrengthIndex(25, 13, 7, MovingAverageType.Exponential)
            self.register_indicator(self._symbol, self._tsi, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._tsi.is_ready:
                # The current value of self._tsi is represented by self._tsi.current.value
                self.plot("TrueStrengthIndex", "tsi", self._tsi.current.value)
                # Plot all attributes of self._tsi
                self.plot("TrueStrengthIndex", "signal", self._tsi.signal.current.value)
    

    The following reference table describes the TrueStrengthIndex constructor:

    TrueStrengthIndex

    class QuantConnect.Indicators.TrueStrengthIndex [source]

    This indicator computes the True Strength Index (TSI). The True Strength Index is calculated as explained here: https://school.stockcharts.com/doku.php?id=technical_indicators:true_strength_index Briefly, the calculation has three steps: 1. Smooth the momentum and the absolute momentum by getting an EMA of them (typically of period 25) 2. Double smooth the momentum and the absolute momentum by getting an EMA of their EMA (typically of period 13) 3. The TSI formula itself: divide the double-smoothed momentum over the double-smoothed absolute momentum and multiply by 100 The signal is typically a 7-to-12-EMA of the TSI.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property signal

    Gets the signal line for the TSI indicator

    Returns:

    Gets the signal line for the TSI indicator

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TrueStrengthIndex

    class QuantConnect.Indicators.TrueStrengthIndex [source]

    This indicator computes the True Strength Index (TSI). The True Strength Index is calculated as explained here: https://school.stockcharts.com/doku.php?id=technical_indicators:true_strength_index Briefly, the calculation has three steps: 1. Smooth the momentum and the absolute momentum by getting an EMA of them (typically of period 25) 2. Double smooth the momentum and the absolute momentum by getting an EMA of their EMA (typically of period 13) 3. The TSI formula itself: divide the double-smoothed momentum over the double-smoothed absolute momentum and multiply by 100 The signal is typically a 7-to-12-EMA of the TSI.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Signal

    Gets the signal line for the TSI indicator

    Returns:

    Gets the signal line for the TSI indicator

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of TrueStrengthIndex using the plotly library.

    TrueStrengthIndex line plot.

     

    Supported Indicators

    Ultimate Oscillator

    Introduction

    This indicator computes the Ultimate Oscillator (ULTOSC) The Ultimate Oscillator is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:ultimate_oscillator

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ULTOSC Indicator

    To create an automatic indicators for UltimateOscillator , call the ULTOSC helper method from the QCAlgorithm class. The ULTOSC method creates a UltimateOscillator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class UltimateOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UltimateOscillator _ultosc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ultosc = ULTOSC(_symbol, 5, 10, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_ultosc.IsReady)
            {
                // The current value of _ultosc is represented by itself (_ultosc)
                // or _ultosc.Current.Value
                Plot("UltimateOscillator", "ultosc", _ultosc);
                
            }
        }
    }
    class UltimateOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ultosc = self.ultosc(self._symbol, 5, 10, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._ultosc.is_ready:
                # The current value of self._ultosc is represented by self._ultosc.current.value
                self.plot("UltimateOscillator", "ultosc", self._ultosc.current.value)
                
    

    The following reference table describes the ULTOSC method:

    ultosc( symbol, period_1, period_2, period_3, resolution=None, selector=None ) [source]

    Creates a new UltimateOscillator indicator.

    Parameters:
    Returns:

    The UltimateOscillator indicator for the requested symbol over the specified period

    Return type:

    UltimateOscillator

    ULTOSC( symbol, period1, period2, period3, resolution=None, selector=None ) [source]

    Creates a new UltimateOscillator indicator.

    Parameters:
    Returns:

    The UltimateOscillator indicator for the requested symbol over the specified period

    Return type:

    UltimateOscillator

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a UltimateOscillator indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class UltimateOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UltimateOscillator _ultosc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ultosc = new UltimateOscillator(5, 10, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _ultosc.Update(bar);
            }
       
            if (_ultosc.IsReady)
            {
                // The current value of _ultosc is represented by itself (_ultosc)
                // or _ultosc.Current.Value
                Plot("UltimateOscillator", "ultosc", _ultosc);
                
            }
        }
    }
    class UltimateOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ultosc = UltimateOscillator(5, 10, 20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._ultosc.update(bar)
            if self._ultosc.is_ready:
                # The current value of self._ultosc is represented by self._ultosc.current.value
                self.plot("UltimateOscillator", "ultosc", self._ultosc.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class UltimateOscillatorAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private UltimateOscillator _ultosc;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _ultosc = new UltimateOscillator(5, 10, 20);
            RegisterIndicator(_symbol, _ultosc, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_ultosc.IsReady)
            {
                // The current value of _ultosc is represented by itself (_ultosc)
                // or _ultosc.Current.Value
                Plot("UltimateOscillator", "ultosc", _ultosc);
                
            }
        }
    }
    class UltimateOscillatorAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._ultosc = UltimateOscillator(5, 10, 20)
            self.register_indicator(self._symbol, self._ultosc, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._ultosc.is_ready:
                # The current value of self._ultosc is represented by self._ultosc.current.value
                self.plot("UltimateOscillator", "ultosc", self._ultosc.current.value)
                
    

    The following reference table describes the UltimateOscillator constructor:

    UltimateOscillator

    class QuantConnect.Indicators.UltimateOscillator [source]

    This indicator computes the Ultimate Oscillator (ULTOSC) The Ultimate Oscillator is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:ultimate_oscillator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    UltimateOscillator

    class QuantConnect.Indicators.UltimateOscillator [source]

    This indicator computes the Ultimate Oscillator (ULTOSC) The Ultimate Oscillator is calculated as explained here: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:ultimate_oscillator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of UltimateOscillator using the plotly library.

    UltimateOscillator line plot.

     

    Supported Indicators

    Value At Risk

    Introduction

    This indicator computes 1-day VaR for a specified confidence level and lookback period

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ValueAtRisk Indicator

    To create an automatic indicators for ValueAtRisk , call the ValueAtRisk helper method from the QCAlgorithm class. The ValueAtRisk method creates a ValueAtRisk object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class ValueAtRiskAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ValueAtRisk _valueatrisk;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _valueatrisk = ValueAtRisk(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_valueatrisk.IsReady)
            {
                // The current value of _valueatrisk is represented by itself (_valueatrisk)
                // or _valueatrisk.Current.Value
                Plot("ValueAtRisk", "valueatrisk", _valueatrisk);
                
            }
        }
    }
    class ValueAtRiskAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._valueatrisk = self.valueatrisk(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._valueatrisk.is_ready:
                # The current value of self._valueatrisk is represented by self._valueatrisk.current.value
                self.plot("ValueAtRisk", "valueatrisk", self._valueatrisk.current.value)
                
    

    The following reference table describes the ValueAtRisk method:

    Warning: include(/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-valueatrisk.html): Failed to open stream: No such file or directory in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73 Warning: include(): Failed opening '/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-valueatrisk.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a ValueAtRisk indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class ValueAtRiskAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ValueAtRisk _valueatrisk;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _valueatrisk = new ValueAtRisk();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _valueatrisk.Update(bar.EndTime, bar.Close);
            }
       
            if (_valueatrisk.IsReady)
            {
                // The current value of _valueatrisk is represented by itself (_valueatrisk)
                // or _valueatrisk.Current.Value
                Plot("ValueAtRisk", "valueatrisk", _valueatrisk);
                
            }
        }
    }
    class ValueAtRiskAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._valueatrisk = ValueAtRisk()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._valueatrisk.update(bar.EndTime, bar.Close)
            if self._valueatrisk.is_ready:
                # The current value of self._valueatrisk is represented by self._valueatrisk.current.value
                self.plot("ValueAtRisk", "valueatrisk", self._valueatrisk.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class ValueAtRiskAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private ValueAtRisk _valueatrisk;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _valueatrisk = new ValueAtRisk();
            RegisterIndicator(_symbol, _valueatrisk, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_valueatrisk.IsReady)
            {
                // The current value of _valueatrisk is represented by itself (_valueatrisk)
                // or _valueatrisk.Current.Value
                Plot("ValueAtRisk", "valueatrisk", _valueatrisk);
                
            }
        }
    }
    class ValueAtRiskAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._valueatrisk = ValueAtRisk()
            self.register_indicator(self._symbol, self._valueatrisk, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._valueatrisk.is_ready:
                # The current value of self._valueatrisk is represented by self._valueatrisk.current.value
                self.plot("ValueAtRisk", "valueatrisk", self._valueatrisk.current.value)
                
    

    The following reference table describes the ValueAtRisk constructor:

    ValueAtRisk

    class QuantConnect.Indicators.ValueAtRisk [source]

    This indicator computes 1-day VaR for a specified confidence level and lookback period

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ValueAtRisk

    class QuantConnect.Indicators.ValueAtRisk [source]

    This indicator computes 1-day VaR for a specified confidence level and lookback period

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of ValueAtRisk using the plotly library.

    ValueAtRisk line plot.

     

    Supported Indicators

    Variable Index Dynamic Average

    Introduction

    This indicator computes the n-period adaptive weighted moving average indicator. VIDYAi = Pricei x F x ABS(CMOi) + VIDYAi-1 x (1 - F x ABS(CMOi)) where: VIDYAi - is the value of the current period. Pricei - is the source price of the period being calculated. F = 2/(Period_EMA+1) - is a smoothing factor. ABS(CMOi) - is the absolute current value of CMO. VIDYAi-1 - is the value of the period immediately preceding the period being calculated.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using VariableIndexDynamicAverage Indicator

    To create an automatic indicators for VariableIndexDynamicAverage , call the VariableIndexDynamicAverage helper method from the QCAlgorithm class. The VariableIndexDynamicAverage method creates a VariableIndexDynamicAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class VariableIndexDynamicAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private VariableIndexDynamicAverage _variableindexdynamicaverage;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _variableindexdynamicaverage = VariableIndexDynamicAverage(_symbol);
        }
    
        public override void OnData(Slice data)
        {
            if (_variableindexdynamicaverage.IsReady)
            {
                // The current value of _variableindexdynamicaverage is represented by itself (_variableindexdynamicaverage)
                // or _variableindexdynamicaverage.Current.Value
                Plot("VariableIndexDynamicAverage", "variableindexdynamicaverage", _variableindexdynamicaverage);
                
            }
        }
    }
    class VariableIndexDynamicAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._variableindexdynamicaverage = self.variableindexdynamicaverage(self._symbol)
    
        def on_data(self, slice: Slice) -> None:
            if self._variableindexdynamicaverage.is_ready:
                # The current value of self._variableindexdynamicaverage is represented by self._variableindexdynamicaverage.current.value
                self.plot("VariableIndexDynamicAverage", "variableindexdynamicaverage", self._variableindexdynamicaverage.current.value)
                
    

    The following reference table describes the VariableIndexDynamicAverage method:

    Warning: include(/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-variableindexdynamicaverage.html): Failed to open stream: No such file or directory in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73 Warning: include(): Failed opening '/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-variableindexdynamicaverage.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a VariableIndexDynamicAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class VariableIndexDynamicAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private VariableIndexDynamicAverage _variableindexdynamicaverage;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _variableindexdynamicaverage = new VariableIndexDynamicAverage();
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _variableindexdynamicaverage.Update(bar.EndTime, bar.Close);
            }
       
            if (_variableindexdynamicaverage.IsReady)
            {
                // The current value of _variableindexdynamicaverage is represented by itself (_variableindexdynamicaverage)
                // or _variableindexdynamicaverage.Current.Value
                Plot("VariableIndexDynamicAverage", "variableindexdynamicaverage", _variableindexdynamicaverage);
                
            }
        }
    }
    class VariableIndexDynamicAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._variableindexdynamicaverage = VariableIndexDynamicAverage()
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._variableindexdynamicaverage.update(bar.EndTime, bar.Close)
            if self._variableindexdynamicaverage.is_ready:
                # The current value of self._variableindexdynamicaverage is represented by self._variableindexdynamicaverage.current.value
                self.plot("VariableIndexDynamicAverage", "variableindexdynamicaverage", self._variableindexdynamicaverage.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class VariableIndexDynamicAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private VariableIndexDynamicAverage _variableindexdynamicaverage;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _variableindexdynamicaverage = new VariableIndexDynamicAverage();
            RegisterIndicator(_symbol, _variableindexdynamicaverage, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_variableindexdynamicaverage.IsReady)
            {
                // The current value of _variableindexdynamicaverage is represented by itself (_variableindexdynamicaverage)
                // or _variableindexdynamicaverage.Current.Value
                Plot("VariableIndexDynamicAverage", "variableindexdynamicaverage", _variableindexdynamicaverage);
                
            }
        }
    }
    class VariableIndexDynamicAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._variableindexdynamicaverage = VariableIndexDynamicAverage()
            self.register_indicator(self._symbol, self._variableindexdynamicaverage, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._variableindexdynamicaverage.is_ready:
                # The current value of self._variableindexdynamicaverage is represented by self._variableindexdynamicaverage.current.value
                self.plot("VariableIndexDynamicAverage", "variableindexdynamicaverage", self._variableindexdynamicaverage.current.value)
                
    

    The following reference table describes the VariableIndexDynamicAverage constructor:

    VariableIndexDynamicAverage

    class QuantConnect.Indicators.VariableIndexDynamicAverage [source]

    This indicator computes the n-period adaptive weighted moving average indicator. VIDYAi = Pricei x F x ABS(CMOi) + VIDYAi-1 x (1 - F x ABS(CMOi)) where: VIDYAi - is the value of the current period. Pricei - is the source price of the period being calculated. F = 2/(Period_EMA+1) - is a smoothing factor. ABS(CMOi) - is the absolute current value of CMO. VIDYAi-1 - is the value of the period immediately preceding the period being calculated.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    VariableIndexDynamicAverage

    class QuantConnect.Indicators.VariableIndexDynamicAverage [source]

    This indicator computes the n-period adaptive weighted moving average indicator. VIDYAi = Pricei x F x ABS(CMOi) + VIDYAi-1 x (1 - F x ABS(CMOi)) where: VIDYAi - is the value of the current period. Pricei - is the source price of the period being calculated. F = 2/(Period_EMA+1) - is a smoothing factor. ABS(CMOi) - is the absolute current value of CMO. VIDYAi-1 - is the value of the period immediately preceding the period being calculated.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of VariableIndexDynamicAverage using the plotly library.

    VariableIndexDynamicAverage line plot.

     

    Supported Indicators

    Variance

    Introduction

    This indicator computes the n-period population variance.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using VAR Indicator

    To create an automatic indicators for Variance , call the VAR helper method from the QCAlgorithm class. The VAR method creates a Variance object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class VarianceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Variance _var;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _var = VAR(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_var.IsReady)
            {
                // The current value of _var is represented by itself (_var)
                // or _var.Current.Value
                Plot("Variance", "var", _var);
                
            }
        }
    }
    class VarianceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._var = self.var(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._var.is_ready:
                # The current value of self._var is represented by self._var.current.value
                self.plot("Variance", "var", self._var.current.value)
                
    

    The following reference table describes the VAR method:

    Warning: include(/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-var.html): Failed to open stream: No such file or directory in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73 Warning: include(): Failed opening '/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-var.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/indicators/using-indicator.php on line 73

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Variance indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class VarianceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Variance _var;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _var = new Variance(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _var.Update(bar.EndTime, bar.Close);
            }
       
            if (_var.IsReady)
            {
                // The current value of _var is represented by itself (_var)
                // or _var.Current.Value
                Plot("Variance", "var", _var);
                
            }
        }
    }
    class VarianceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._var = Variance(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._var.update(bar.EndTime, bar.Close)
            if self._var.is_ready:
                # The current value of self._var is represented by self._var.current.value
                self.plot("Variance", "var", self._var.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class VarianceAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Variance _var;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _var = new Variance(20);
            RegisterIndicator(_symbol, _var, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_var.IsReady)
            {
                // The current value of _var is represented by itself (_var)
                // or _var.Current.Value
                Plot("Variance", "var", _var);
                
            }
        }
    }
    class VarianceAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._var = Variance(20)
            self.register_indicator(self._symbol, self._var, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._var.is_ready:
                # The current value of self._var is represented by self._var.current.value
                self.plot("Variance", "var", self._var.current.value)
                
    

    The following reference table describes the Variance constructor:

    Variance

    class QuantConnect.Indicators.Variance [source]

    This indicator computes the n-period population variance.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Variance

    class QuantConnect.Indicators.Variance [source]

    This indicator computes the n-period population variance.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Variance using the plotly library.

    Variance line plot.

     

    Supported Indicators

    Vega

    Introduction

    Option Vega indicator that calculate the Vega of an option

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using V Indicator

    To create an automatic indicators for Vega , call the V helper method from the QCAlgorithm class. The V method creates a Vega object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class VegaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Vega _v;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _v = V(_option, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (_v.IsReady)
            {
                // The current value of _v is represented by itself (_v)
                // or _v.Current.Value
                Plot("Vega", "v", _v);
                // Plot all properties of v
                Plot("Vega", "impliedvolatility", _v.ImpliedVolatility);
                Plot("Vega", "riskfreerate", _v.RiskFreeRate);
                Plot("Vega", "dividendyield", _v.DividendYield);
                Plot("Vega", "price", _v.Price);
                Plot("Vega", "oppositeprice", _v.OppositePrice);
                Plot("Vega", "underlyingprice", _v.UnderlyingPrice);
            }
        }
    }
    class VegaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._v = self.v(self.option, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            if self._v.is_ready:
                # The current value of self._v is represented by self._v.current.value
                self.plot("Vega", "v", self._v.current.value)
                # Plot all attributes of self._v
                self.plot("Vega", "implied_volatility", self._v.implied_volatility.current.value)
                self.plot("Vega", "risk_free_rate", self._v.risk_free_rate.current.value)
                self.plot("Vega", "dividend_yield", self._v.dividend_yield.current.value)
                self.plot("Vega", "price", self._v.price.current.value)
                self.plot("Vega", "opposite_price", self._v.opposite_price.current.value)
                self.plot("Vega", "underlying_price", self._v.underlying_price.current.value)
    

    The following reference table describes the V method:

    v( symbol, period, resolution=None, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Variance indicator for the requested symbol over the specified period

    Return type:

    Variance

    v( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new Vega indicator for the specified symbol

    Return type:

    Vega

    V( symbol, period, resolution=None, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Variance indicator for the requested symbol over the specified period

    Return type:

    Variance

    V( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new Vega indicator for the specified symbol

    Return type:

    Vega

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a Vega indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class VegaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Vega _v;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _v = new Vega(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _v.Update(new IndicatorDataPoint(_symbol, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_option, out bar))
            {      
                _v.Update(new IndicatorDataPoint(_option, bar.EndTime, bar.Close));
            }
            if (data.QuoteBars.TryGetValue(_mirrorOption, out bar))
            {      
                _v.Update(new IndicatorDataPoint(_mirrorOption, bar.EndTime, bar.Close));
            }
       
            if (_v.IsReady)
            {
                // The current value of _v is represented by itself (_v)
                // or _v.Current.Value
                Plot("Vega", "v", _v);
                // Plot all properties of v
                Plot("Vega", "impliedvolatility", _v.ImpliedVolatility);
                Plot("Vega", "riskfreerate", _v.RiskFreeRate);
                Plot("Vega", "dividendyield", _v.DividendYield);
                Plot("Vega", "price", _v.Price);
                Plot("Vega", "oppositeprice", _v.OppositePrice);
                Plot("Vega", "underlyingprice", _v.UnderlyingPrice);
            }
        }
    }
    class VegaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._v = Vega(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._v.update(IndicatorDataPoint(self._symbol, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.option)
            if bar:
                self._v.update(IndicatorDataPoint(self.option, bar.end_time, bar.close))
            bar = slice.quote_bars.get(self.mirror_option)
            if bar:
                self._v.update(IndicatorDataPoint(self.mirror_option, bar.end_time, bar.close))
            if self._v.is_ready:
                # The current value of self._v is represented by self._v.current.value
                self.plot("Vega", "v", self._v.current.value)
                # Plot all attributes of self._v
                self.plot("Vega", "implied_volatility", self._v.implied_volatility.current.value)
                self.plot("Vega", "risk_free_rate", self._v.risk_free_rate.current.value)
                self.plot("Vega", "dividend_yield", self._v.dividend_yield.current.value)
                self.plot("Vega", "price", self._v.price.current.value)
                self.plot("Vega", "opposite_price", self._v.opposite_price.current.value)
                self.plot("Vega", "underlying_price", self._v.underlying_price.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class VegaAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private Symbol _option, _mirrorOption;
        private Vega _v;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _option = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Put, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_option, Resolution.Daily);
            _mirrorOption = QuantConnect.Symbol.CreateOption("SPY", Market.USA, OptionStyle.American, OptionRight.Call, 450m, new DateTime(2023, 12, 22));
            AddOptionContract(_mirrorOption, Resolution.Daily);
            _v = new Vega(_option, interest_rate_model, dividend_yield_model, _mirrorOption);
            RegisterIndicator(_symbol, _v, Resolution.Daily);
            RegisterIndicator(_option, _v, Resolution.Daily);
            RegisterIndicator(_mirrorOption, _v, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_v.IsReady)
            {
                // The current value of _v is represented by itself (_v)
                // or _v.Current.Value
                Plot("Vega", "v", _v);
                // Plot all properties of v
                Plot("Vega", "impliedvolatility", _v.ImpliedVolatility);
                Plot("Vega", "riskfreerate", _v.RiskFreeRate);
                Plot("Vega", "dividendyield", _v.DividendYield);
                Plot("Vega", "price", _v.Price);
                Plot("Vega", "oppositeprice", _v.OppositePrice);
                Plot("Vega", "underlyingprice", _v.UnderlyingPrice);
            }
        }
    }
    class VegaAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self.option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.PUT, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.option, Resolution.DAILY)
            self.mirror_option = Symbol.create_option("SPY", Market.USA, OptionStyle.AMERICAN, OptionRight.CALL, 450, datetime(2023, 12, 22))
            self.add_option_contract(self.mirror_option, Resolution.DAILY)
            self._v = Vega(self.option, interest_rate_model, dividend_yield_model, self.mirror_option)
            self.register_indicator(self._symbol, self._v, Resolution.DAILY)
            self.register_indicator(self.option, self._v, Resolution.DAILY)
            self.register_indicator(self.mirror_option, self._v, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._v.is_ready:
                # The current value of self._v is represented by self._v.current.value
                self.plot("Vega", "v", self._v.current.value)
                # Plot all attributes of self._v
                self.plot("Vega", "implied_volatility", self._v.implied_volatility.current.value)
                self.plot("Vega", "risk_free_rate", self._v.risk_free_rate.current.value)
                self.plot("Vega", "dividend_yield", self._v.dividend_yield.current.value)
                self.plot("Vega", "price", self._v.price.current.value)
                self.plot("Vega", "opposite_price", self._v.opposite_price.current.value)
                self.plot("Vega", "underlying_price", self._v.underlying_price.current.value)
    

    The following reference table describes the Vega constructor:

    Vega

    class QuantConnect.Indicators.Vega [source]

    Option Vega indicator that calculate the Vega of an option

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and all sub-indicators

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property dividend_yield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    datetime

    property implied_volatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property opposite_price

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property risk_free_rate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    float

    property style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property underlying_price

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase[IndicatorDataPoint]

    property use_mirror_contract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Vega

    class QuantConnect.Indicators.Vega [source]

    Option Vega indicator that calculate the Vega of an option

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and all sub-indicators

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property DividendYield

    Dividend Yield

    Returns:

    Dividend Yield

    Return type:

    Identity

    property Expiry

    Gets the expiration time of the option

    Returns:

    Gets the expiration time of the option

    Return type:

    DateTime

    property ImpliedVolatility

    Gets the implied volatility of the option

    Returns:

    Gets the implied volatility of the option

    Return type:

    ImpliedVolatility

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property OppositePrice

    Gets the mirror option price level, for implied volatility

    Returns:

    Gets the mirror option price level, for implied volatility

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Price

    Gets the option price level

    Returns:

    Gets the option price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property Right

    Gets the option right (call/put) of the option

    Returns:

    Gets the option right (call/put) of the option

    Return type:

    OptionRight

    property RiskFreeRate

    Risk Free Rate

    Returns:

    Risk Free Rate

    Return type:

    Identity

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property Strike

    Gets the strike price of the option

    Returns:

    Gets the strike price of the option

    Return type:

    decimal

    property Style

    Gets the option style (European/American) of the option

    Returns:

    Gets the option style (European/American) of the option

    Return type:

    OptionStyle

    property UnderlyingPrice

    Gets the underlying's price level

    Returns:

    Gets the underlying's price level

    Return type:

    IndicatorBase<IndicatorDataPoint>

    property UseMirrorContract

    Flag if mirror option is implemented for parity type calculation

    Returns:

    Flag if mirror option is implemented for parity type calculation

    Return type:

    bool

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of Vega using the plotly library.

    Vega line plot.

     

    Supported Indicators

    Volume Profile

    Introduction

    This indicator represents an Indicator of the Market Profile with Volume Profile mode and its attributes

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using VP Indicator

    To create an automatic indicators for VolumeProfile , call the VP helper method from the QCAlgorithm class. The VP method creates a VolumeProfile object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class VolumeProfileAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private VolumeProfile _vp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _vp = VP(_symbol, 3, 0.70, 0.05);
        }
    
        public override void OnData(Slice data)
        {
            if (_vp.IsReady)
            {
                // The current value of _vp is represented by itself (_vp)
                // or _vp.Current.Value
                Plot("VolumeProfile", "vp", _vp);
                // Plot all properties of vp
                Plot("VolumeProfile", "profilehigh", _vp.ProfileHigh);
                Plot("VolumeProfile", "profilelow", _vp.ProfileLow);
                Plot("VolumeProfile", "pocprice", _vp.POCPrice);
                Plot("VolumeProfile", "pocvolume", _vp.POCVolume);
                Plot("VolumeProfile", "valueareavolume", _vp.ValueAreaVolume);
                Plot("VolumeProfile", "valueareahigh", _vp.ValueAreaHigh);
                Plot("VolumeProfile", "valuearealow", _vp.ValueAreaLow);
            }
        }
    }
    class VolumeProfileAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._vp = self.vp(self._symbol, 3, 0.70, 0.05)
    
        def on_data(self, slice: Slice) -> None:
            if self._vp.is_ready:
                # The current value of self._vp is represented by self._vp.current.value
                self.plot("VolumeProfile", "vp", self._vp.current.value)
                # Plot all attributes of self._vp
                self.plot("VolumeProfile", "profile_high", self._vp.profile_high)
                self.plot("VolumeProfile", "profile_low", self._vp.profile_low)
                self.plot("VolumeProfile", "poc_price", self._vp.poc_price)
                self.plot("VolumeProfile", "poc_volume", self._vp.poc_volume)
                self.plot("VolumeProfile", "value_area_volume", self._vp.value_area_volume)
                self.plot("VolumeProfile", "value_area_high", self._vp.value_area_high)
                self.plot("VolumeProfile", "value_area_low", self._vp.value_area_low)
    

    The following reference table describes the VP method:

    vp( symbol, period=2, value_area_volume_percentage=0.7, price_range_round_off=0.05, resolution=4, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Volume Profile indicator for the given parameters

    Return type:

    VolumeProfile

    VP( symbol, period=2, valueAreaVolumePercentage=0.7, priceRangeRoundOff=0.05, resolution=4, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Volume Profile indicator for the given parameters

    Return type:

    VolumeProfile

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a VolumeProfile indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class VolumeProfileAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private VolumeProfile _vp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _vp = new VolumeProfile("", 3, 0.70, 0.05);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _vp.Update(bar);
            }
       
            if (_vp.IsReady)
            {
                // The current value of _vp is represented by itself (_vp)
                // or _vp.Current.Value
                Plot("VolumeProfile", "vp", _vp);
                // Plot all properties of vp
                Plot("VolumeProfile", "profilehigh", _vp.ProfileHigh);
                Plot("VolumeProfile", "profilelow", _vp.ProfileLow);
                Plot("VolumeProfile", "pocprice", _vp.POCPrice);
                Plot("VolumeProfile", "pocvolume", _vp.POCVolume);
                Plot("VolumeProfile", "valueareavolume", _vp.ValueAreaVolume);
                Plot("VolumeProfile", "valueareahigh", _vp.ValueAreaHigh);
                Plot("VolumeProfile", "valuearealow", _vp.ValueAreaLow);
            }
        }
    }
    class VolumeProfileAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._vp = VolumeProfile("", 3, 0.70, 0.05)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._vp.update(bar)
            if self._vp.is_ready:
                # The current value of self._vp is represented by self._vp.current.value
                self.plot("VolumeProfile", "vp", self._vp.current.value)
                # Plot all attributes of self._vp
                self.plot("VolumeProfile", "profile_high", self._vp.profile_high)
                self.plot("VolumeProfile", "profile_low", self._vp.profile_low)
                self.plot("VolumeProfile", "poc_price", self._vp.poc_price)
                self.plot("VolumeProfile", "poc_volume", self._vp.poc_volume)
                self.plot("VolumeProfile", "value_area_volume", self._vp.value_area_volume)
                self.plot("VolumeProfile", "value_area_high", self._vp.value_area_high)
                self.plot("VolumeProfile", "value_area_low", self._vp.value_area_low)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class VolumeProfileAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private VolumeProfile _vp;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _vp = new VolumeProfile("", 3, 0.70, 0.05);
            RegisterIndicator(_symbol, _vp, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_vp.IsReady)
            {
                // The current value of _vp is represented by itself (_vp)
                // or _vp.Current.Value
                Plot("VolumeProfile", "vp", _vp);
                
            }
        }
    }
    class VolumeProfileAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._vp = VolumeProfile("", 3, 0.70, 0.05)
            self.register_indicator(self._symbol, self._vp, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._vp.is_ready:
                # The current value of self._vp is represented by self._vp.current.value
                self.plot("VolumeProfile", "vp", self._vp.current.value)
                
    

    The following reference table describes the VolumeProfile constructor:

    VolumeProfile

    class QuantConnect.Indicators.VolumeProfile [source]

    Represents an Indicator of the Market Profile with Volume Profile mode and its attributes

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property poc_price

    Price where the most trading occured (Point of Control(POC)) This price is MarketProfile.Current.Value

    Returns:

    Price where the most trading occured (Point of Control(POC)) This price is MarketProfile.Current.Value

    Return type:

    float

    property poc_volume

    Volume where the most tradding occured (Point of Control(POC))

    Returns:

    Volume where the most tradding occured (Point of Control(POC))

    Return type:

    float

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property profile_high

    The highest reached close price level during the period. That value is called Profile High

    Returns:

    The highest reached close price level during the period. That value is called Profile High

    Return type:

    float

    property profile_low

    The lowest reached close price level during the period. That value is called Profile Low

    Returns:

    The lowest reached close price level during the period. That value is called Profile Low

    Return type:

    float

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property value_area_high

    The highest close price level within the value area

    Returns:

    The highest close price level within the value area

    Return type:

    float

    property value_area_low

    The lowest close price level within the value area

    Returns:

    The lowest close price level within the value area

    Return type:

    float

    property value_area_volume

    The range of price levels in which a specified percentage of all volume was traded during the time period. Typically, this percentage is set to 70% however it is up to the trader’s discretion.

    Returns:

    The range of price levels in which a specified percentage of all volume was traded during the time period. Typically, this percentage is set to 70% however it is up to the trader’s discretion.

    Return type:

    float

    property volume_per_price

    Get a copy of the _volumePerPrice field

    Returns:

    Get a copy of the _volumePerPrice field

    Return type:

    SortedList[float, float]

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    VolumeProfile

    class QuantConnect.Indicators.VolumeProfile [source]

    Represents an Indicator of the Market Profile with Volume Profile mode and its attributes

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when the indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when the indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property POCPrice

    Price where the most trading occured (Point of Control(POC)) This price is MarketProfile.Current.Value

    Returns:

    Price where the most trading occured (Point of Control(POC)) This price is MarketProfile.Current.Value

    Return type:

    decimal

    property POCVolume

    Volume where the most tradding occured (Point of Control(POC))

    Returns:

    Volume where the most tradding occured (Point of Control(POC))

    Return type:

    decimal

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property ProfileHigh

    The highest reached close price level during the period. That value is called Profile High

    Returns:

    The highest reached close price level during the period. That value is called Profile High

    Return type:

    decimal

    property ProfileLow

    The lowest reached close price level during the period. That value is called Profile Low

    Returns:

    The lowest reached close price level during the period. That value is called Profile Low

    Return type:

    decimal

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property ValueAreaHigh

    The highest close price level within the value area

    Returns:

    The highest close price level within the value area

    Return type:

    decimal

    property ValueAreaLow

    The lowest close price level within the value area

    Returns:

    The lowest close price level within the value area

    Return type:

    decimal

    property ValueAreaVolume

    The range of price levels in which a specified percentage of all volume was traded during the time period. Typically, this percentage is set to 70% however it is up to the trader’s discretion.

    Returns:

    The range of price levels in which a specified percentage of all volume was traded during the time period. Typically, this percentage is set to 70% however it is up to the trader’s discretion.

    Return type:

    decimal

    property VolumePerPrice

    Get a copy of the _volumePerPrice field

    Returns:

    Get a copy of the _volumePerPrice field

    Return type:

    SortedList<Decimal, Decimal>

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of VolumeProfile using the plotly library.

    VolumeProfile line plot.

     

    Supported Indicators

    Wilder Accumulative Swing Index

    Introduction

    This indicator calculates the Accumulative Swing Index (ASI) as defined by Welles Wilder in his book 'New Concepts in Technical Trading Systems'. ASIₜ = ASIₜ₋₁ + SIₜ Where: ASIₜ₋₁ The for the previous period. SIₜ The calculated for the current period.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using ASI Indicator

    To create an automatic indicators for WilderAccumulativeSwingIndex , call the ASI helper method from the QCAlgorithm class. The ASI method creates a WilderAccumulativeSwingIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class WilderAccumulativeSwingIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilderAccumulativeSwingIndex _asi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _asi = ASI(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_asi.IsReady)
            {
                // The current value of _asi is represented by itself (_asi)
                // or _asi.Current.Value
                Plot("WilderAccumulativeSwingIndex", "asi", _asi);
                
            }
        }
    }
    class WilderAccumulativeSwingIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._asi = self.asi(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._asi.is_ready:
                # The current value of self._asi is represented by self._asi.current.value
                self.plot("WilderAccumulativeSwingIndex", "asi", self._asi.current.value)
                
    

    The following reference table describes the ASI method:

    asi( symbol, limit_move, resolution=4, selector=None ) [source]

    Creates a Wilder Accumulative Swing Index (ASI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderAccumulativeSwingIndex for the given parameters

    Return type:

    WilderAccumulativeSwingIndex

    ASI( symbol, limitMove, resolution=4, selector=None ) [source]

    Creates a Wilder Accumulative Swing Index (ASI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderAccumulativeSwingIndex for the given parameters

    Return type:

    WilderAccumulativeSwingIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a WilderAccumulativeSwingIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class WilderAccumulativeSwingIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilderAccumulativeSwingIndex _asi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _asi = new WilderAccumulativeSwingIndex(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _asi.Update(bar);
            }
       
            if (_asi.IsReady)
            {
                // The current value of _asi is represented by itself (_asi)
                // or _asi.Current.Value
                Plot("WilderAccumulativeSwingIndex", "asi", _asi);
                
            }
        }
    }
    class WilderAccumulativeSwingIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._asi = WilderAccumulativeSwingIndex(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._asi.update(bar)
            if self._asi.is_ready:
                # The current value of self._asi is represented by self._asi.current.value
                self.plot("WilderAccumulativeSwingIndex", "asi", self._asi.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class WilderAccumulativeSwingIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilderAccumulativeSwingIndex _asi;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _asi = new WilderAccumulativeSwingIndex(20);
            RegisterIndicator(_symbol, _asi, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_asi.IsReady)
            {
                // The current value of _asi is represented by itself (_asi)
                // or _asi.Current.Value
                Plot("WilderAccumulativeSwingIndex", "asi", _asi);
                
            }
        }
    }
    class WilderAccumulativeSwingIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._asi = WilderAccumulativeSwingIndex(20)
            self.register_indicator(self._symbol, self._asi, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._asi.is_ready:
                # The current value of self._asi is represented by self._asi.current.value
                self.plot("WilderAccumulativeSwingIndex", "asi", self._asi.current.value)
                
    

    The following reference table describes the WilderAccumulativeSwingIndex constructor:

    WilderAccumulativeSwingIndex

    class QuantConnect.Indicators.WilderAccumulativeSwingIndex [source]

    This indicator calculates the Accumulative Swing Index (ASI) as defined by Welles Wilder in his book 'New Concepts in Technical Trading Systems'. ASIₜ = ASIₜ₋₁ + SIₜ Where: ASIₜ₋₁ The WilderAccumulativeSwingIndex for the previous period. SIₜ The WilderSwingIndex calculated for the current period.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state.

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    WilderAccumulativeSwingIndex

    class QuantConnect.Indicators.WilderAccumulativeSwingIndex [source]

    This indicator calculates the Accumulative Swing Index (ASI) as defined by Welles Wilder in his book 'New Concepts in Technical Trading Systems'. ASIₜ = ASIₜ₋₁ + SIₜ Where: ASIₜ₋₁ The WilderAccumulativeSwingIndex for the previous period. SIₜ The WilderSwingIndex calculated for the current period.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state.

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of WilderAccumulativeSwingIndex using the plotly library.

    WilderAccumulativeSwingIndex line plot.

     

    Supported Indicators

    Wilder Moving Average

    Introduction

    This indicator represents the moving average indicator defined by Welles Wilder in his book: New Concepts in Technical Trading Systems.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using WWMA Indicator

    To create an automatic indicators for WilderMovingAverage , call the WWMA helper method from the QCAlgorithm class. The WWMA method creates a WilderMovingAverage object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class WilderMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilderMovingAverage _wwma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _wwma = WWMA(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_wwma.IsReady)
            {
                // The current value of _wwma is represented by itself (_wwma)
                // or _wwma.Current.Value
                Plot("WilderMovingAverage", "wwma", _wwma);
                
            }
        }
    }
    class WilderMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._wwma = self.wwma(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._wwma.is_ready:
                # The current value of self._wwma is represented by self._wwma.current.value
                self.plot("WilderMovingAverage", "wwma", self._wwma.current.value)
                
    

    The following reference table describes the WWMA method:

    wwma( symbol, period, resolution=None, selector=None ) [source]

    Creates a WilderMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderMovingAverage for the given parameters

    Return type:

    WilderMovingAverage

    WWMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a WilderMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderMovingAverage for the given parameters

    Return type:

    WilderMovingAverage

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a WilderMovingAverage indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with time/number pair or an IndicatorDataPoint . The indicator will only be ready after you prime it with enough data.

    public class WilderMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilderMovingAverage _wwma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _wwma = new WilderMovingAverage(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _wwma.Update(bar.EndTime, bar.Close);
            }
       
            if (_wwma.IsReady)
            {
                // The current value of _wwma is represented by itself (_wwma)
                // or _wwma.Current.Value
                Plot("WilderMovingAverage", "wwma", _wwma);
                
            }
        }
    }
    class WilderMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._wwma = WilderMovingAverage(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._wwma.update(bar.EndTime, bar.Close)
            if self._wwma.is_ready:
                # The current value of self._wwma is represented by self._wwma.current.value
                self.plot("WilderMovingAverage", "wwma", self._wwma.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class WilderMovingAverageAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilderMovingAverage _wwma;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _wwma = new WilderMovingAverage(20);
            RegisterIndicator(_symbol, _wwma, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_wwma.IsReady)
            {
                // The current value of _wwma is represented by itself (_wwma)
                // or _wwma.Current.Value
                Plot("WilderMovingAverage", "wwma", _wwma);
                
            }
        }
    }
    class WilderMovingAverageAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._wwma = WilderMovingAverage(20)
            self.register_indicator(self._symbol, self._wwma, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._wwma.is_ready:
                # The current value of self._wwma is represented by self._wwma.current.value
                self.plot("WilderMovingAverage", "wwma", self._wwma.current.value)
                
    

    The following reference table describes the WilderMovingAverage constructor:

    WilderMovingAverage

    class QuantConnect.Indicators.WilderMovingAverage [source]

    Represents the moving average indicator defined by Welles Wilder in his book: New Concepts in Technical Trading Systems.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    WilderMovingAverage

    class QuantConnect.Indicators.WilderMovingAverage [source]

    Represents the moving average indicator defined by Welles Wilder in his book: New Concepts in Technical Trading Systems.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of WilderMovingAverage using the plotly library.

    WilderMovingAverage line plot.

     

    Supported Indicators

    Wilder Swing Index

    Introduction

    This indicator calculates the Swing Index (SI) as defined by Welles Wilder in his book 'New Concepts in Technical Trading Systems'. SIₜ = 50 * ( N / R ) * ( K / T ) Where: N Equals: Cₜ - Cₜ₋₁ + 0.5 * (Cₜ - Oₜ) + 0.25 * (Cₜ₋₁ - Oₜ₋₁) See R Found by selecting the expression with the largest value and then using the corresponding formula. Expression => Formula |Hₜ - Cₜ₋₁| => |Hₜ - Cₜ| - 0.5 * |Lₜ - Cₜ₋₁| + 0.25 * |Cₜ₋₁ - Oₜ₋₁| |Lₜ - Cₜ₋₁| => |Lₜ - Cₜ| - 0.5 * |Hₜ - Cₜ₋₁| + 0.25 * |Cₜ₋₁ - Oₜ₋₁| |Hₜ - Lₜ| => |Hₜ - Lₜ₋₁| + 0.25 * |Cₜ₋₁ - Oₜ₋₁| See K Found by selecting the larger of the two expressions: |Hₜ - Cₜ₋₁|, |Lₜ - Cₜ₋₁| See T The limit move, or the maximum change in price during the time period for the bar. Passed as limitMove via the constructor. See

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using SI Indicator

    To create an automatic indicators for WilderSwingIndex , call the SI helper method from the QCAlgorithm class. The SI method creates a WilderSwingIndex object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class WilderSwingIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilderSwingIndex _si;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _si = SI(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_si.IsReady)
            {
                // The current value of _si is represented by itself (_si)
                // or _si.Current.Value
                Plot("WilderSwingIndex", "si", _si);
                
            }
        }
    }
    class WilderSwingIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._si = self.si(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._si.is_ready:
                # The current value of self._si is represented by self._si.current.value
                self.plot("WilderSwingIndex", "si", self._si.current.value)
                
    

    The following reference table describes the SI method:

    si( symbol, limit_move, resolution=4, selector=None ) [source]

    Creates a Wilder Swing Index (SI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderSwingIndex for the given parameters

    Return type:

    WilderSwingIndex

    SI( symbol, limitMove, resolution=4, selector=None ) [source]

    Creates a Wilder Swing Index (SI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderSwingIndex for the given parameters

    Return type:

    WilderSwingIndex

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a WilderSwingIndex indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar . The indicator will only be ready after you prime it with enough data.

    public class WilderSwingIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilderSwingIndex _si;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _si = new WilderSwingIndex(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _si.Update(bar);
            }
       
            if (_si.IsReady)
            {
                // The current value of _si is represented by itself (_si)
                // or _si.Current.Value
                Plot("WilderSwingIndex", "si", _si);
                
            }
        }
    }
    class WilderSwingIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._si = WilderSwingIndex(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._si.update(bar)
            if self._si.is_ready:
                # The current value of self._si is represented by self._si.current.value
                self.plot("WilderSwingIndex", "si", self._si.current.value)
                
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class WilderSwingIndexAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilderSwingIndex _si;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _si = new WilderSwingIndex(20);
            RegisterIndicator(_symbol, _si, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_si.IsReady)
            {
                // The current value of _si is represented by itself (_si)
                // or _si.Current.Value
                Plot("WilderSwingIndex", "si", _si);
                
            }
        }
    }
    class WilderSwingIndexAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._si = WilderSwingIndex(20)
            self.register_indicator(self._symbol, self._si, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._si.is_ready:
                # The current value of self._si is represented by self._si.current.value
                self.plot("WilderSwingIndex", "si", self._si.current.value)
                
    

    The following reference table describes the WilderSwingIndex constructor:

    WilderSwingIndex

    class QuantConnect.Indicators.WilderSwingIndex [source]

    This indicator calculates the Swing Index (SI) as defined by Welles Wilder in his book 'New Concepts in Technical Trading Systems'. SIₜ = 50 * ( N / R ) * ( K / T ) Where: N Equals: Cₜ - Cₜ₋₁ + 0.5 * (Cₜ - Oₜ) + 0.25 * (Cₜ₋₁ - Oₜ₋₁) See GetNValue R Found by selecting the expression with the largest value and then using the corresponding formula. Expression => Formula |Hₜ - Cₜ₋₁| => |Hₜ - Cₜ| - 0.5 * |Lₜ - Cₜ₋₁| + 0.25 * |Cₜ₋₁ - Oₜ₋₁| |Lₜ - Cₜ₋₁| => |Lₜ - Cₜ| - 0.5 * |Hₜ - Cₜ₋₁| + 0.25 * |Cₜ₋₁ - Oₜ₋₁| |Hₜ - Lₜ| => |Hₜ - Lₜ₋₁| + 0.25 * |Cₜ₋₁ - Oₜ₋₁| See GetRValue K Found by selecting the larger of the two expressions: |Hₜ - Cₜ₋₁|, |Lₜ - Cₜ₋₁| See GetKValue T The limit move, or the maximum change in price during the time period for the bar. Passed as limitMove via the constructor. See T

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    WilderSwingIndex

    class QuantConnect.Indicators.WilderSwingIndex [source]

    This indicator calculates the Swing Index (SI) as defined by Welles Wilder in his book 'New Concepts in Technical Trading Systems'. SIₜ = 50 * ( N / R ) * ( K / T ) Where: N Equals: Cₜ - Cₜ₋₁ + 0.5 * (Cₜ - Oₜ) + 0.25 * (Cₜ₋₁ - Oₜ₋₁) See GetNValue R Found by selecting the expression with the largest value and then using the corresponding formula. Expression => Formula |Hₜ - Cₜ₋₁| => |Hₜ - Cₜ| - 0.5 * |Lₜ - Cₜ₋₁| + 0.25 * |Cₜ₋₁ - Oₜ₋₁| |Lₜ - Cₜ₋₁| => |Lₜ - Cₜ| - 0.5 * |Hₜ - Cₜ₋₁| + 0.25 * |Cₜ₋₁ - Oₜ₋₁| |Hₜ - Lₜ| => |Hₜ - Lₜ₋₁| + 0.25 * |Cₜ₋₁ - Oₜ₋₁| See GetRValue K Found by selecting the larger of the two expressions: |Hₜ - Cₜ₋₁|, |Lₜ - Cₜ₋₁| See GetKValue T The limit move, or the maximum change in price during the time period for the bar. Passed as limitMove via the constructor. See T

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized.

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized.

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of WilderSwingIndex using the plotly library.

    WilderSwingIndex line plot.

     

    Supported Indicators

    Williams Percent R

    Introduction

    Williams %R, or just %R, is the current closing price in relation to the high and low of the past N days (for a given N). The value of this indicator fluctuates between -100 and 0. The symbol is said to be oversold when the oscillator is below -80%, and overbought when the oscillator is above -20%.

    To view the implementation of this indicator, see the LEAN GitHub repository .

    Using WILR Indicator

    To create an automatic indicators for WilliamsPercentR , call the WILR helper method from the QCAlgorithm class. The WILR method creates a WilliamsPercentR object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initialize initialize method.

    public class WilliamsPercentRAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilliamsPercentR _wilr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _wilr = WILR(_symbol, 20);
        }
    
        public override void OnData(Slice data)
        {
            if (_wilr.IsReady)
            {
                // The current value of _wilr is represented by itself (_wilr)
                // or _wilr.Current.Value
                Plot("WilliamsPercentR", "wilr", _wilr);
                // Plot all properties of wilr
                Plot("WilliamsPercentR", "maximum", _wilr.Maximum);
                Plot("WilliamsPercentR", "minimum", _wilr.Minimum);
            }
        }
    }
    class WilliamsPercentRAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._wilr = self.wilr(self._symbol, 20)
    
        def on_data(self, slice: Slice) -> None:
            if self._wilr.is_ready:
                # The current value of self._wilr is represented by self._wilr.current.value
                self.plot("WilliamsPercentR", "wilr", self._wilr.current.value)
                # Plot all attributes of self._wilr
                self.plot("WilliamsPercentR", "maximum", self._wilr.maximum.current.value)
                self.plot("WilliamsPercentR", "minimum", self._wilr.minimum.current.value)
    

    The following reference table describes the WILR method:

    wilr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Williams %R indicator. This will compute the percentage change of the current closing price in relation to the high and low of the past N periods. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Williams %R indicator for the requested symbol over the specified period

    Return type:

    WilliamsPercentR

    WILR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Williams %R indicator. This will compute the percentage change of the current closing price in relation to the high and low of the past N periods. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Williams %R indicator for the requested symbol over the specified period

    Return type:

    WilliamsPercentR

    If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

    For more information about the selector argument, see Alternative Price Fields .

    For more information about plotting indicators, see Plotting Indicators .

    You can manually create a WilliamsPercentR indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

    Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Update update method with a TradeBar or QuoteBar . The indicator will only be ready after you prime it with enough data.

    public class WilliamsPercentRAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilliamsPercentR _wilr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _wilr = new WilliamsPercentR(20);
        }
    
        public override void OnData(Slice data)
        {
            if (data.Bars.TryGetValue(_symbol, out var bar))
            {      
                _wilr.Update(bar);
            }
       
            if (_wilr.IsReady)
            {
                // The current value of _wilr is represented by itself (_wilr)
                // or _wilr.Current.Value
                Plot("WilliamsPercentR", "wilr", _wilr);
                // Plot all properties of wilr
                Plot("WilliamsPercentR", "maximum", _wilr.Maximum);
                Plot("WilliamsPercentR", "minimum", _wilr.Minimum);
            }
        }
    }
    class WilliamsPercentRAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._wilr = WilliamsPercentR(20)
    
        def on_data(self, slice: Slice) -> None:
            bar = slice.bars.get(self._symbol)
            if bar:
                self._wilr.update(bar)
            if self._wilr.is_ready:
                # The current value of self._wilr is represented by self._wilr.current.value
                self.plot("WilliamsPercentR", "wilr", self._wilr.current.value)
                # Plot all attributes of self._wilr
                self.plot("WilliamsPercentR", "maximum", self._wilr.maximum.current.value)
                self.plot("WilliamsPercentR", "minimum", self._wilr.minimum.current.value)
    

    To register a manual indicator for automatic updates with the security data, call the RegisterIndicator register_indicator method.

    public class WilliamsPercentRAlgorithm : QCAlgorithm
    {
        private Symbol _symbol;
        private WilliamsPercentR _wilr;
    
        public override void Initialize()
        {
            _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
            _wilr = new WilliamsPercentR(20);
            RegisterIndicator(_symbol, _wilr, Resolution.Daily);
        }
    
        public override void OnData(Slice data)
        {
            if (_wilr.IsReady)
            {
                // The current value of _wilr is represented by itself (_wilr)
                // or _wilr.Current.Value
                Plot("WilliamsPercentR", "wilr", _wilr);
                // Plot all properties of wilr
                Plot("WilliamsPercentR", "maximum", _wilr.Maximum);
                Plot("WilliamsPercentR", "minimum", _wilr.Minimum);
            }
        }
    }
    class WilliamsPercentRAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
            self._wilr = WilliamsPercentR(20)
            self.register_indicator(self._symbol, self._wilr, Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            if self._wilr.is_ready:
                # The current value of self._wilr is represented by self._wilr.current.value
                self.plot("WilliamsPercentR", "wilr", self._wilr.current.value)
                # Plot all attributes of self._wilr
                self.plot("WilliamsPercentR", "maximum", self._wilr.maximum.current.value)
                self.plot("WilliamsPercentR", "minimum", self._wilr.minimum.current.value)
    

    The following reference table describes the WilliamsPercentR constructor:

    WilliamsPercentR

    class QuantConnect.Indicators.WilliamsPercentR [source]

    Williams %R, or just %R, is the current closing price in relation to the high and low of the past N days (for a given N). The value of this indicator fluctuates between -100 and 0. The symbol is said to be oversold when the oscillator is below -80%, and overbought when the oscillator is above -20%.

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator and both sub-indicators (Max and Min)

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property maximum

    Gets the Maximum indicator

    Returns:

    Gets the Maximum indicator

    Return type:

    Maximum

    property minimum

    Gets the Minimum indicator

    Returns:

    Gets the Minimum indicator

    Return type:

    Minimum

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    WilliamsPercentR

    class QuantConnect.Indicators.WilliamsPercentR [source]

    Williams %R, or just %R, is the current closing price in relation to the high and low of the past N days (for a given N). The value of this indicator fluctuates between -100 and 0. The symbol is said to be oversold when the oscillator is below -80%, and overbought when the oscillator is above -20%.

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator and both sub-indicators (Max and Min)

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Maximum

    Gets the Maximum indicator

    Returns:

    Gets the Maximum indicator

    Return type:

    Maximum

    property Minimum

    Gets the Minimum indicator

    Returns:

    Gets the Minimum indicator

    Return type:

    Minimum

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Visualization

    The following image shows plot values of selected properties of WilliamsPercentR using the plotly library.

    WilliamsPercentR line plot.

     

    Indicators

    Key Concepts

    Introduction

    Indicators translate a stream of data points into a numerical value you can use to detect trading opportunities. LEAN provides more than 100 pre-built technical indicators and candlestick patterns you can use in your algorithms. To view a list of all the indicators, see the Supported Indicators . One simple indicator to learn is the Identity indicator, which just returns the value of the asset.

    var pep = Identity("PEP"); // Pepsi ticker
    pep = self.identity("PEP") # Pepsi ticker

    Design Philosophy

    Technical indicators take in a stream of data points, Bar objects, or TradeBar objects and produce a continuous value. Candlestick patterns take in a stream of Bar or TradeBar objects and produce a value that's either 0, 1, or -1 to signify the presence of the pattern.

    You can configure technical indicators and candlestick patterns to receive manual or automatic updates. With manual indicators, you update the indicator with whatever data you want and whenever you want. With automatic indicators, the algorithm automatically uses the security data to update the indicator value.

    LEAN's indicators are implemented "on-line". This means as data pipes through, it updates the internal state of the indicator. Other platforms perform indicator math on an array of values in bulk which can be very inefficient when working on large volumes of data. You need to warm up your indicators and prime them with data to get them ready.

    Indicator Types

    You can classify an indicator as either a data point, bar, or TradeBar indicator. Their classification depends on the type of data they receive.

    Data Point Indicators

    Data point indicators use IndicatorDataPoint objects to compute their value. Some examples of data point indicators include the following:

    Bar Indicators

    Bar indicators use QuoteBar or TradeBar objects to compute their value. Since Forex and CFD securities don't have TradeBar data, they use bar indicators. Candlestick patterns are examples of bar indicators. Some other examples of bar indicators include the following:

    TradeBar Indicators

    TradeBar indicators use TradeBar objects to compute their value. Some TradeBar indicators use the volume property of the TradeBar to compute their value. Some examples of TradeBar indicators include the following:

    Naming Convention

    The class name to create a manual indicator is the indicator name spelled in pascal case. For example, to create a manual simple moving average indicator , use the SimpleMovingAverage class.

    The method to create an automatic indicator is usually named after the acronym of the indicator name. For example, to create an automatic simple moving average indicator , use the SMA sma method.

    To view the class name and shortcut method of each indicator, see the Supported Indicators .

    Create Indicators

    There are two ways to create indicators. You can create indicators with the indicator constructor or use a helper method in the QCAlgorithm class. If you use the helper method, the indicator automatically updates as your algorithm receives new data.

    private BollingerBands _manualBB;
    private BollingerBands _autoBB;
    private Symbol _symbol;
    public override void Initialize()
    {
        // Create a manual indicator with the indicator constructor
        _manualBB = new BollingerBands(20, 2);
        // Create an automatic indicator with the helper method
        _symbol = AddCrypto("BTCUSD").Symbol;
        _autoBB = BB(_symbol, 20, 2, Resolution.Daily);
    }
    
    
    def initialize(self) -> None:
        # Create a manual indicator with the indicator constructor
        self.manual_bb = BollingerBands(20, 2)
        # Create an automatic indicator with the helper method
        self._symbol = self.add_crypto("BTCUSD").Symbol
        self.auto_bb = self.bb(self._symbol, 20, 2, Resolution.DAILY)

    Set Historical Values Window Size

    Indicators have a built-in RollingWindow that stores their historical values. The default window size is 2. To change the window size, set the Window.Size member.

    // Increase the window size to 10 for the Bollinger Band
    _manualBB.Window.Size = 10;
    _autoBB.Window.Size = 10;
    
    // Increase the Size to 20 for the middle band
    _manualBB.MiddleBand.Window.Size = 20;
    _autoBB.MiddleBand.Window.Size = 20;
    # Increase the Size to 10 for Bollinger Band
    self.manual_bb.window.size = 10
    self.auto_bb.window.size = 10
    
    # Increase the Size to 20 for the middle band
    self.manual_bb.middle_band.window.size = 20
    self.auto_bb.middle_band.window.size = 20

    When you decrease the size, it removes the oldest values that no longer fit in the RollingWindow . When you explicitly increase the Size size member, it doesn't automatically add any new elements to the RollingWindow . However, if you set the value of an index in the RollingWindow and the index doesn't currently exist, it fills the empty indices with null None . For example, the following code increases the Size size to 10, sets the 10th element to the indicator current value, and sets the 6th-9th elements to null None :

    _manualBB.Window[9] = _manualBB.Current;
    _autoBB.Window[9] = _autoBB.Current;
    self.manual_bb.window[9] = self.manual_bb.current
    self.auto_bb.window[9] = self.auto_bb.current

    Check Readiness

    Indicators aren't always ready when you first create them. The length of time it takes to trust the indicator values depends on the indicator period. To know if an indicator is ready to use, use the IsReady is_ready property.

    if not self.auto_bb.is_ready:
        return
    
    if (!_autoBB.IsReady) return;
    

    To get the number of samples the indicator has processed, use the Samples samples property.

    samples = self.auto_bb.samples
    var samples = _autoBB.Samples;

    The RollingWindow objects that store the historical values may not be full when the indicator is ready to use. To check if the Window is full, use its IsReady is_ready flag.

    if not self.auto_bb.window.is_ready:
        return
    
    if (!_autoBB.Window.IsReady) return;
    

    Track Update Events

    When an indicator receives a new data point and updates its state, it triggers an update event. To be notified of update events, attach an event handler to the indicator object. The event handler receives 2 arguments: the indicator object and the latest IndicatorDataPoint it produced.

    # After you create the indicator, attach an event handler
    self.auto_bb.updated += self.update_event_handler
    
    # Define the event handler within the same class
    def update_event_handler(self, indicator: object, indicator_data_point: IndicatorDataPoint) -> None:
        if indicator.is_ready:
            self.plot("Indicator", "Value", indicator_data_point.value)
    
    // After you create the indicator, attach an event handler
    _autoBB.Updated += updateEventHandler;
    
    // Define the event handler within the same class
    private void updateEventHandler(object indicator, IndicatorDataPoint indicatorDataPoint)
    {
        if (indicator.IsReady)
        {
            Plot("Indicator", "Value", indicatorDataPoint.Value);
        }
    }
    

    Get Indicator Values

    You can access current and historical indicator values.

    Current Indicator Values

    To access the indicator value, use the Current.Value current.value property. Some indicators have one output and some indicators have multiple outputs. The SimpleMovingAverage indicator only has one output, the average price over the last n periods, so the Current.Value current.value property returns this value. The BollingerBand indicator has multiple outputs because it has a simple moving average, an upper band, and a lower band. For indicators that have multiple outputs, refer to the Supported Indicators to see how to access the output values.

    sma = self.sma.current.value
    
    current_price = self.auto_bb.current.value
    bb_upper_band = self.auto_bb.upper_band.current.value
    bb_lower_band = self.auto_bb.lower_band.current.value
    var sma = _sma.Current.Value;
    
    var currentPrice = _autoBB.Current.Value;
    var bbUpperBand = _autoBB.UpperBand.Current.Value;
    var bbLowerBand = _autoBB.LowerBand.Current.Value;

    You can implicitly cast indicators to the decimal version of their Current.Value current.value property.

    if self.sma.current.value > self.auto_bb.upper_band.current.value:
        self.set_holdings(self._symbol, -0.1)
    if (_sma > _autoBB.UpperBand)
    {
        SetHoldings(_symbol, -0.1);
    }

    Historical Indicator Values

    To access historical indicator values, use reverse list access semantics. The current (most recent) indicator value is at index 0, the previous value is at index 1 or the Previous previous property, and so on until the length of the window. You increase the window size and get a null None value when using an index greater than the length of the window.

    var currentBB = _autoBB.Current; // or _autoBB[0];
    var previousBB = _autoBB.Previous; // or _autoBB[1];
    var oldestBB = _autoBB.Window[_autoBB.window.Count - 1];
    var nullValue = _autoBB.Window[100];
    
    var previousUpperBand = _autoBB.UpperBand.Previous;
    var oldestUpperBand = _autoBB.UpperBand.Window[_autoBB.UpperBand.Window.Count - 1];
    current_bb = self.auto_bb.current # self.auto_bb[0]
    previous_bb = self.auto_bb.previous # or self.auto_bb[1]
    oldest_bb = self.auto_bb.window[self.auto_bb.window.count - 1]
    none_value = self.auto_bb.window[100]
    
    previous_upper_band = self.auto_bb.upper_band.previous
    oldest_upper_band = self.auto_bb.upper_band.window[self.auto_bb.upper_band.window.count - 1]

    To access all of an indicator's historical values, iterate through the indicator object.

    foreach (var value in _autoBB)
    {
        Log(value.ToString());
    }
    for value in self.auto_bb:
        self.log(f'{value}')

    Reset Indicators

    To reset indicators, call the Reset reset method.

    self.auto_bb.reset() 
    
    _autoBB.Reset();

    The process to warm up your indicator depends on if it's a manual or automatic indicator .

    If you are live trading Equities or backtesting Equities without the adjusted data normalization mode , reset your indicators when splits and dividends occur. If a split or dividend occurs, the data in your indicators becomes invalid because it doesn't account for the price adjustments that the split or dividend causes. To replace your indicator history with the newly-adjusted prices, call the Reset reset method and then warm up the indicator with ScaledRaw SCALED_RAW data from a history request .

    # In OnData
    if data.splits.contains_key(self._symbol) or data.dividends.contains_key(self._symbol):
        # Reset the indicator
        self._sma.reset() 
    
        # Warm up the indicator
        trade_bars = self.history[TradeBar](self._symbol, self._sma.warm_up_period, Resolution.DAILY, data_normalization_mode=DataNormalizationMode.SCALED_RAW)
        for trade_bar in trade_bars:
            self._sma.update(trade_bar.end_time, trade_bar.close)
    // In OnData
    if (data.Splits.ContainsKey(_symbol) || data.Dividends.ContainsKey(_symbol))
    {
        // Reset the indicator
        _sma.Reset();
    
        // Warm up the indicator
        var tradeBars = History<TradeBar>(_symbol, _sma.WarmUpPeriod, Resolution.Daily, dataNormalizationMode: DataNormalizationMode.ScaledRaw);
        foreach (var tradeBar in tradeBars)
        {
            _sma.Update(tradeBar.EndTime, tradeBar.Close);
        }
    }

    Common Design Patterns

    The location in your algorithm where you create and manage indicators depends on the type of universe you use.

    One Asset In a Static Universe

    If you only have one security in your algorithm, you can create indicators for it during initialization .

    def initialize(self):
        self._symbol = self.add_equity("SPY").symbol
        self.enable_automatic_indicator_warm_up = True
        self._sma = self.sma(self._symbol, 20, Resolution.DAILY)
    private Symbol _symbol;
    private SimpleMovingAverage _sma;
    
    public override void Initialize()
    {
        _symbol = AddEquity("SPY").Symbol;
        EnableAutomaticIndicatorWarmUp = true;
        _sma = SMA(_symbol, 20, Resolution.Daily);
    }

    Multiple Assets or a Dynamic Universe

    If your algorithm has multiple assets or a dynamic universe of assets, add custom members to the Security objects as you receive them in OnSecuritiesChanged on_securities_changed .

    If your algorithm has multiple assets or a dynamic universe of assets, as you receive new Security objects in OnSecuritiesChanged on_securities_changed , cast them to dynamic objects and add custom members to them.

    public override void OnSecuritiesChanged(SecurityChanges changes)
    {
        foreach (var security in changes.AddedSecurities)
        {
            var dynamicSecurity = security as dynamic;
    
            // Create an indicator
            dynamicSecurity.Indicator = SMA(security.Symbol, 10);
    
            // Warm up the indicator
            WarmUpIndicator(security.Symbol, dynamicSecurity.Indicator);
        }
    
        foreach (var security in changes.RemovedSecurities)
        {
            DeregisterIndicator((security as dynamic).Indicator);
        }
    }
    def on_securities_changed(self, changes: SecurityChanges) -> None:
        for security in changes.added_securities:
            # Create an indicator
            security.indicator = self.sma(security.Symbol, 10)
    
            # Warm up the indicator
            self.warm_up_indicator(security.symbol, security.indicator)
    
        for security in changes.removed_securities:
            self.deregister_indicator(security.indicator)

    Differences From Third-Party Indicators

    The values of our indicators can sometimes produce different results than the indicators on other platforms. There can be several reasons for these discrepancies.

    Price Differences

    If you find differences in indicator values, compare the prices that are fed into the indicator on each platform. If the input data is slightly different, the indicator values will be different. To test if it's a difference in price data, feed in the data from the third-party platform into our indicators. We validate the indicators against third-party sources and when the values are the same, the indicator values are similar too.

    Timestamp Differences

    We timestamp our data to the time when the period ends. Many other platforms timestamp to the beginning of the candle.

    Implementation Differences

    Some indicators can have slightly different default arguments for their implementation. A common difference across platforms is to use a different MovingAverageType for the indicators. To view the default arguments for all our indicators, see Supported Indicators . To view the full implementation of our indicators, see the LEAN GitHub repository .

    Warm Up Period Differences

    Some platforms use all of the historical data to warm up their indicators while LEAN indicators have a fixed number of bars they need to warm up. As a result, indicators with long memory like the Exponential Moving Average can have slightly different values across platforms.

    Risk Free Interest Rate Differences

    Some indicators, like Sharpe ratios and Sortino ratios , are a function of the risk free interest rate . LEAN provides several different ways to define the interest rate, which can lead to different indicator values compared to other platforms.

    Examples

    Demonstration Algorithms
    IndicatorSuiteAlgorithm.py Python EmaCrossUniverseSelectionAlgorithm.py Python MACDTrendAlgorithm.py Python RegressionChannelAlgorithm.py Python TalibIndicatorsAlgorithm.py Python IndicatorSuiteAlgorithm.cs C# EmaCrossUniverseSelectionAlgorithm.cs C# MACDTrendAlgorithm.cs C# RegressionChannelAlgorithm.cs C#

     

    Indicators

    Manual Indicators

    Introduction

    Manual indicators are indicators that don't automatically update from the underlying security data. Manual updates let you customize how you update the indicator, such as using a custom field or using Renko Bars . It's not always necessary to create manual indicators though. Automatic indicators are easier to create and update.

    Naming Convention

    The class name to create a manual indicator is the indicator name spelled in pascal case. For example, to create a manual simple moving average indicator , use the SimpleMovingAverage class.

    Create Manual Indicators

    To create manual indicators, instantiate an indicator with its constructor. To view all of the available indicators and their constructors, see Supported Indicators .

    // Create an indicator
    private Delay _delay;
    _delay = new Delay(20);
    
    // Create a candlestick pattern
    private TwoCrows _twoCrows;
    _twoCrows = new TwoCrows();
    # Create an indicator
    self.delay = Delay(20)
    
    # Create a candlestick pattern
    self.two_crows = TwoCrows()

    You can track indicators by their name. To name a manual indicator, pass a string as the first argument to the constructor.

    // Name an indicator
    _delay = new Delay("AAPL Past Price", 20);
    Log(_delay.Name);
    
    // Name a candlestick pattern
    _twoCrows = new TwoCrows("Two Crows Pattern");
    Log(_twoCrows.Name);
    # Name an indicator
    self.delay = Delay("AAPL Past Price", 20)
    self.log(self.delay.name)
    
    # Name a candlestick pattern
    self.two_crows = TwoCrows("Two Crows Pattern")
    self.log(self.two_crows.name)

    If you don't name an indicator, it's given a default name. For example, the default name for a Delay indicator is "Delay( period )".

    Manual Updates

    With manual updates, you control what data you use to update the indicator. For instance, you can use the 3:30 PM price in your daily moving average instead of the daily closing price or you can use the maximum temperature of the past 10 cloudy days.

    To update an indicator, call the Update update method. The Update update method expects one of the following arguments:

    To view what data type you should use to update an indicator, see Supported Indicators .

    You can update indicators at any point in your algorithm, but the most common places are during the OnData on_data event handler or during a consolidation event handler.

    def initialize(self) -> None:
        self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
    
        self._rsi = RelativeStrengthIndex(10, MovingAverageType.SIMPLE)
        self.ad = AccumulationDistribution()
    
        self.consolidator = TradeBarConsolidator(timedelta(days=3))
        self.consolidator = QuoteBarConsolidator(timedelta(days=3))
        self.consolidator = RenkoBarConsolidator(1)     # Renko consolidator that emits a bar when the price moves $1
        # Update the AD indicator with the consolidated bar
        self.consolidator.data_consolidated += (lambda _, bar : self.ad.update(bar))
        self.subscription_manager.add_consolidator(self._symbol, self.consolidator)
    
    def on_data(self, slice: Slice) -> None:
        # Update the RSI indicator value with the new input close price every day
        if slice.bars.contains_key(self._symbol):
            bar = slice.bars[self._symbol]
            self.rsi.update(bar.end_time, bar.close)
    
    private Symbol _symbol;
    private RelativeStrengthIndex _rsi;
    private AccumulationDistribution _ad;
    
    public override void Initialize()
    {
        _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
        
        _rsi = new RelativeStrengthIndex(10, MovingAverageType.Simple);
        _ad = new AccumulationDistribution();
    
        var consolidator = new TradeBarConsolidator(TimeSpan.FromDays(3));
        consolidator = new QuoteBarConsolidator(TimeSpan.FromDays(3));
        consolidator = new RenkoBarConsolidator(1);     // Renko consolidator that emits a bar when the price moves $1
        //Update the AD indicator with the consolidated bar
        consolidator.DataConsolidated += (_, bar) => _ad.Update(bar);
        SubscriptionManager.AddConsolidator(_symbol, consolidator);
    }
    
    public override void OnData(Slice slice)
    {
        // Update the RSI indicator value with the new input close price every day
        if (slice.Bars.ContainsKey(_symbol))
        {
            var bar = slice.Bars[_symbol];
            _rsi.Update(bar.EndTime, bar.Close);
        }
    }
    

    Automatic Updates

    With automatic updates, your indicators automatically update with the security data on a schedule you set. To configure automatic updates, create a consolidator and then call the RegisterIndicator register_indicator method. If you register an indicator for automatic updates, don't call the indicator's Update update method or else the indicator will receive double updates.

    # Create a security subscription 
    self._symbol = self.add_equity("SPY", Resolution.MINUTE).symbol
    
    # Create a manual indicator
    self.indicator = RelativeStrengthIndex(10, MovingAverageType.SIMPLE)
    
    # Create a consolidator
    consolidator = TradeBarConsolidator(1)
    consolidator = QuoteBarConsolidator(1)
    consolidator = RenkoConsolidator(1)     # Renko consolidator that emits a bar when the price moves $1
    
    # Register the indicator to update with the consolidated data
    self.register_indicator(self._symbol, self.indicator, consolidator)
    // Create a security subscription 
    _symbol = AddEquity("SPY", Resolution.Hour);
    
    // Create a manual indicator
    _indicator = new RelativeStrengthIndex(10, MovingAverageType.Simple);
    
    // Create a consolidator
    var consolidator = new TradeBarConsolidator(1);
    consolidator = new QuoteBarConsolidator(1);
    consolidator = new RenkoConsolidator(1);    // Renko consolidator that emits a bar when the price moves $1
    
    // Register the indicator to update with the consolidated data
    RegisterIndicator(_symbol, _indicator, consolidator);

    Data point indicators use only a single price data in their calculations. By default, those indicators use the closing price. For assets with TradeBar data, that price is the TradeBar close price. For assets with QuoteBar data, that price is the mid-price of the bid closing price and the ask closing price. To create an indicator with the other fields like the Open , High , Low , or Close , provide a selector argument to the RegisterIndicator register_indicator method.

    self.register_indicator(self._symbol, self.indicator, consolidator, Field.HIGH)
    
    RegisterIndicator(_symbol, _rsi, consolidator, Field.High);
    

    The Field class has the following selector properties:

    To create a custom selector , define a function that calculates the value.

    RegisterIndicator(_symbol, _indicator, _consolidator, x =>
    {
        var bar = x as IBaseDataBar;
        return (bar.Low + bar.High) / 2;
    });

    To stop automatically updating an indicator, pass the indicator to the DeregisterIndicator deregister_indicator property method.

    DeregisterIndicator(_indicator);
    // Alias:
    // UnregisterIndicator(_indicator);
    self.deregister_indicator(self.indicator)
    # Alias:
    # self.unregister_indicator(self.indicator)

    Warm Up Indicators

    Indicators use historical data to compute their value. Before you start trading with an indicator, warm it up. There are several ways to warm-up manual indicators.

    Manual Indicator Warm-up

    If you have access to the QCAlgorithm object, you can manually warmup indicators with a history request .

    private SimpleMovingAverage _sma;
    
    _sma = SimpleMovingAverage(20);
    var history = algorithm.History(_symbol, 20, Resolution.Daily);
    foreach (var bar in history)
    {
        sma.Update(bar.Time, bar.Close);
    }
    
    self._sma = SimpleMovingAverage(20)
    history = algorithm.history(self._symbol, 20, Resolution.DAILY)
    if not history.empty:
        for time, row in history.loc[self._symbol].iterrows():
            self._sma.update(time, row.close)

    Warm-up Helper Method

    If an indicator inherits the IIndicatorWarmUpPeriodProvider class, you can warm it up with the WarmUpIndicator method.

    _sma = SimpleMovingAverage(20);
    algorithm.WarmUpIndicator(_symbol, _sma);
    self._sma = SimpleMovingAverage(20)
    algorithm.warm_up_indicator(self._symbol, self._sma)

    To warm up the indicator with a resolution that's different from the security resolution, pass a resolution or TimeSpan timedelta argument to the WarmUpIndicator method. The resolution you provide should be greater than or equal to the security resolution. For example, if the security has minute resolution data, you should warm up the indicator with data that spans at least one minute.

    // Warm-up with daily bars
    algorithm.WarmUpIndicator(_symbol, _sma, Resolution.Daily);
    
    // Warm-up with 3-day bars
    algorithm.WarmUpIndicator(_symbol, _sma, TimeSpan.FromDays(3));
    # Warm-up with daily bars
    algorithm.warm_up_indicator(self._symbol, self._sma, Resolution.DAILY)
    
    # Warm-up with 3-day bars
    algorithm.warm_up_indicator(self._symbol, self._sma, timedelta(days=3))

    The WarmUpIndicator method uses the default Value of the historical data to warm up the indicator. In most cases, this is the closing price. To warm up the indicator with a different data field, pass a Field argument to the method.

    algorithm.WarmUpIndicator(_symbol, _sma, Resolution.Daily, Field.High);
    algorithm.warm_up_indicator(self._symbol, self._sma, Resolution.DAILY, Field.HIGH)

    Algorithm Warm-up

    If you create indicators at the beginning of your algorithm, you can set an algorithm warm-up period to warm up the indicators. When you set an algorithm warm-up period, the engine pumps data in and automatically updates all the indicators from before the start date of the algorithm. To ensure that all the indicators are ready after the algorithm warm-up period, choose a lookback period that contains sufficient data.

    private SimpleMovingAverage _sma;
    
    // In Initialize
    var symbol = AddEquity("SPY", Resolution.Daily).Symbol;
    _sma = SimpleMovingAverage(20);
    SetWarmUp(20);
    
    // In OnData
    _sma.Update(data["SPY"]); // Delete this line if you registered the indicator for automatic updates
    if (IsWarmingUp)
    { return; }
    # In Initialize
    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
    self._sma = SimpleMovingAverage(20)
    self.set_warm_up(20)
    
    # In OnData
    self._sma.update(data[self._symbol]) # Delete this line if you registered the indicator for automatic updates
    if self.is_warming_up:
        return

    Timing Considerations

    In some cases, you might create and warm up the indicator during its sampling period. For example, say the security resolution is minute, the indicator resolution is daily, and you create and warm-up the indicator at noon without using the SetWarmUp set_warm_up method. In this example, the history request that gathers data to warm up the indicator won't contain any data from the current day. Furthermore, if you set up a consolidator to update the indicator, the consolidator also won't aggregate any data from before noon. It doesn't cause issues if the indicator only uses the close price to calculate the indicator value (like the simple moving average indicator) because the first consolidated bar that updates the indicator will have the correct close price. However, if the indicator uses more than just the close price to calculate its value (like the True Range indicator), the open, high, and low values of the first consolidated bar may be incorrect, causing the initial indicator values to be incorrect.

     

    Indicators

    Automatic Indicators

    Introduction

    Automatic indicators are indicators that automatically update from the underlying security data. Automatic indicators do everything that manual indicators do, but with automatic updates registered for you.

    Naming Convention

    The method to create an automatic indicator is usually named after the acronym of the indicator name. For example, to create an automatic simple moving average indicator , use the SMA sma method.

    Create Automatic Indicators

    To create automatic indicators, call the indicator helper method from the QCAlgorithm class. The indicator helper methods create an indicator object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. To view the helper method for each indicator, see Supported Indicators . In most cases, you should call the helper method in the Initialize initialize method.

    The indicator resolution must be greater than or equal to the resolution of the security subscription. For instance, if your security subscription is for minute resolution data, the indicator resolution should be minute, hour, or daily resolution.

    private SimpleMovingAverage _sma;
    private TwoCrows _twoCrows;
    
    // In Initialize()
    var symbol = AddEquity("SPY").Symbol;
    
    //  - Create an indicator
    _sma = SMA(symbol, 20, Resolution.Daily);
    
    // - Create a candlestick pattern
    var patterns = new CandlestickPatterns(this);
    _twoCrows = patterns.TwoCrows(_symbol);
    # In Initialize()
    symbol = self.add_equity("SPY").symbol
    
    #  - Create an indicator
    self._sma = self.sma(symbol, 20, Resolution.DAILY)
    
    #  - Create a candlestick pattern
    patterns = CandlestickPatterns(self)
    self.two_crows = patterns.two_crows(self._symbol)
    

    When you create an indicator with a helper method, the indicator is given a default name. You can track indicators by their name. The default name for the SimpleMovingAverage indicator is " SMA sma ( period , ticker _ resolution )". For example, in the preceding code snippet, the SimpleMovingAverage indicator is named " SMA sma (20,SPY_day)". To get the name of an indicator, inspect its Name name property.

    Log(_sma.Name);
    Log(_twoCrows.Name);
    self.log(self.sma.name)
    self.log(self.two_crows.name)

    Alternative Price Fields

    Data point indicators use only a single price data in their calculations. By default, those indicators use the closing price. For assets with TradeBar data, that price is the TradeBar close price. For assets with QuoteBar data, that price is the mid-price of the bid closing price and the ask closing price. To create an indicator with the other fields like the Open , High , Low , or Close OPEN , HIGH , LOW , or CLOSE , provide a selector argument to the indicator helper method.

    # Define a 10-period daily RSI indicator with shortcut helper method
    # Select the Open price to update the indicator
    self._rsi = self.rsi("SPY", 10,  MovingAverageType.SIMPLE, Resolution.DAILY, Field.OPEN)
    // Define a 10-period daily RSI indicator with shortcut helper method
    // Select the Open price to update the indicator
    _rsi = RSI("SPY", 10,  MovingAverageType.Simple, Resolution.Daily, Field.Open);

    The Field class has the following selector properties:

    To create a custom selector , define a function that calculates the value.

    _rsi = RSI("SPY", 10,  MovingAverageType.Simple, Resolution.Daily, x =>
    {
        var bar = x as IBaseDataBar;
        return (bar.Low + bar.High) / 2;
    });

    Warm Up Indicators

    Indicators compute their value based on historical data. Before you start trading with an indicator, warm it up. There are several ways to warm-up automatic indicators.

    Algorithm Warm-up

    You can set an algorithm warm-up period to warm up the indicators. When you set an algorithm warm-up period, the engine pumps data in and automatically updates all the indicators from before the start date. To ensure that all the indicators are ready after the algorithm warm-up period, choose a look-back period that contains sufficient data.

    private SimpleMovingAverage _sma;
    
    // In Initialize
    var symbol = AddEquity("SPY").Symbol;
    _sma = SMA(symbol, 20, Resolution.Daily);
    SetWarmUp(20, Resolution.Daily);
    
    // In OnData
    if (IsWarmingUp)
    { return; }
    # In Initialize
    symbol = self.add_equity("SPY").symbol
    self._sma = self.sma(symbol, 20, Resolution.DAILY)
    self.set_warm_up(20, Resolution.DAILY)
    
    # In OnData
    if self.is_warming_up:
        return

    Manual Indicator Warm-up

    You can manually warm up indicators with a history request .

    private SimpleMovingAverage _sma;
    
    // In Initialize
    var symbol = AddEquity("SPY").Symbol;
    _sma = SMA(symbol, 20, Resolution.Daily);
    
    var history = History(symbol, 20, Resolution.Daily);
    foreach (var bar in history)
    {
        sma.Update(bar.Time, bar.Close);
    }
    
    # In Initialize
    symbol = self.add_equity("SPY").symbol
    self._sma = self.sma(symbol, 20, Resolution.DAILY)
    
    history = self.history(symbol, 20, Resolution.DAILY)
    if not history.empty:
        for time, row in history.loc[symbol].iterrows():
            self._sma.update(time, row.close)
    

    Automatic Indicator Warm-up

    You can set the EnableAutomaticIndicatorWarmUp property to true before you create most indicators to automatically warm them up. This technique doesn't work for all indicators.

    private SimpleMovingAverage _sma;
    
    // In Initialize
    var symbol = AddEquity("SPY").Symbol;
    EnableAutomaticIndicatorWarmUp = true;
    _sma = SMA(symbol, 20, Resolution.Daily);
    
    # In Initialize
    symbol = self.add_equity("SPY").symbol
    self.enable_automatic_indicator_warm_up = True
    self._sma = self.sma(symbol, 20, Resolution.DAILY)

    Warm-up Helper Method

    If an indicator inherits the IIndicatorWarmUpPeriodProvider class, you can warm it up with the WarmUpIndicator method.

    _sma = SMA(_symbol, 20);
    WarmUpIndicator(_symbol, _sma);
    self._sma = self.sma(self._symbol, 20)
    self.warm_up_indicator(self._symbol, self._sma)

    To warm up the indicator with a resolution that's different from the security resolution, pass a resolution or TimeSpan timedelta argument to the WarmUpIndicator method. The resolution you provide should be greater than or equal to the security resolution. For example, if the security has minute resolution data, you should warm up the indicator with data that spans at least one minute. If the indicator resolution is different from the security resolution, provide the indicator resolution as the argument to properly warm up the indicator.

    // Warm up with daily bars
    WarmUpIndicator(_symbol, _sma, Resolution.Daily);
    
    // Warm up with 3-day bars
    WarmUpIndicator(_symbol, _sma, TimeSpan.FromDays(3));
    # Warm up with daily bars
    self.warm_up_indicator(self._symbol, self._sma, Resolution.DAILY)
    
    # Warm up with 3-day bars
    self.warm_up_indicator(self._symbol, self._sma, timedelta(days=3))

    The WarmUpIndicator method uses the default Value of the historical data to warm up the indicator. In most cases, this is the closing price. To warm up the indicator with a different data field, pass a Field argument to the method.

    WarmUpIndicator(_symbol, _sma, Resolution.Daily, Field.High);
    self.warm_up_indicator(self._symbol, self._sma, Resolution.DAILY, Field.HIGH)

    Timing Considerations

    In some cases, you might create and warm up the indicator during its sampling period. For example, say the security resolution is minute, the indicator resolution is daily, and you create and warm-up the indicator at noon without using the SetWarmUp set_warm_up method. In this example, the history request that gathers data to warm up the indicator won't contain any data from the current day and the consolidator that updates the indicator also won't aggregate any data from before noon. It doesn't cause issues if the indicator only uses the close price to calculate the indicator value (like the simple moving average indicator) because the first consolidated bar that updates the indicator will have the correct close price. However, if the indicator uses more than just the close price to calculate its value (like the True Range indicator), the open, high, and low values of the first consolidated bar may be incorrect, causing the initial indicator values to be incorrect.

    Deregister Indicators

    To stop the automatic updates of an indicator, pass the indicator to the DeregisterIndicator deregister_indicator property method.

    DeregisterIndicator(_sma);
    // Alias:
    // UnregisterIndicator(_sma);
    self.deregister_indicator(self._sma)
    # Alias:
    # self.unregister_indicator(self._sma)

    Common Mistakes

    Avoid the following common mistakes when you use automatic indicators.

    Using Indicator Values Before the Indicator Is Warmed Up

    Indicators can provide inaccurate output values before they are warmed up. To avoid issues, always check the IsReady is_ready flag before you use indicator output values.

    if (_indicator.IsReady)
    {
        var value = _indicator.Current.Value;
    }
    if self.indicator.is_ready:
        value = self.indicator.current.value

    Manually Registering an Automatic Indicator for Updates

    If you create an automatic indicator and then register it for automatics updates or call the Update update method, the indicator receives multiple input values during each update cycle. To avoid issues, create automatic indicators but don't register them for automatic updates or call the Update update method.

    // Create automatic indicators
    _indicator = SMA(_symbol, 5);
    
    // Don't do this:
    RegisterIndicator(_symbol, _indicator, Resolution.Daily)
    # Create automatic indicators
    self.indicator = self.sma(self._symbol, 5)
    
    # Don't do this:
    self.register_indicator(self._symbol, self.indicator, Resolution.DAILY)

     

    Indicators

    Plotting Indicators

    Introduction

    LEAN provides helper methods to make it simple to create indicator plots.

    Plot Update Events

    To plot all of the values of some indicators, in the Initialize initialize method, call the PlotIndicator plot_indicator method. The method plots each indicator value as the indicator updates. The method accepts up to four indicators.

    var symbol = AddEquity("SPY");
    var smaShort = SMA(symbol, 10);
    var smaLong = SMA(symbol, 20);
    PlotIndicator("<chartName>", smaShort, smaLong)
    symbol = self.add_equity("SPY")
    sma_short = self.sma(symbol, 10)
    sma_long = self.sma(symbol, 20)
    self.plot_indicator("<chartName>", sma_short, sma_long)

    Plot Current Values

    To plot the current value of indicators, call the Plot plot method. The method accepts up to four indicators.

    // In Initialize
    var symbol = AddEquity("SPY");
    var smaShort = SMA(symbol, 10);
    var smaLong = SMA(symbol, 20);
    
    // In OnData
    Plot("<chartName>", smaShort, smaLong)
    # In Initialize
    symbol = self.add_equity("SPY")
    sma_short = self.sma(symbol, 10)
    sma_long = self.sma(symbol, 20)
    
    # In OnData
    self.plot("<chartName>", sma_short, sma_long)

    View Charts

    The following table describes where you can access your charts, depending on how to deploy your algorithms:

    Location Algorithm Lab Algorithms CLI Cloud Algorithms CLI Local Algorithms
    Backtest results page green check green check
    Live results page green check green check
    /backtests/read endpoint green check green check
    /live/read endpoint green check green check
    ReadBacktest method green check green check
    ReadLiveAlgorithm method green check green check
    Local JSON file in your <projectName> / backtests / <timestamp> or <projectName> / live / <timestamp> directory green check green check

    Chart Limits

    Not all indicators share the same base type(T), so you may not be able to plot them together since some indicators require points while others require TradeBars .

    // Plot indicators that extend the "Indicator" type
    PlotIndicators("All Indicator Values", sma, rsi);
    Plot("Current Indicator Values", sma, rsi); 
    
    // Plot indicators that extend the "TradeBarIndicator" type
    PlotIndicators("All Indicator Values", atr, aroon);
    Plot("Current Indicator Values", atr, aroon);
    # Plot indicators that extend the "Indicator" type
    self.plot_indicators("All Indicator Values", sma, rsi)
    self.plot("Current Indicator Values", sma, rsi); 
    
    # Plot indicators that extend the "TradeBarIndicator" type
    self.plot_indicators("All Indicator Values", atr, aroon)
    self.plot("Current Indicator Values", atr, aroon); 
    

    If your indicator plots are complex, call the Plot plot method with one indicator and plot its Current.Value current.value property. For more information about plotting, see Charting .

     

    Indicators

    Combining Indicators

    Introduction

    Indicator extensions let you chain indications together like Lego blocks to create unique combinations. When you chain indicators together, the Current.Value current.value property output of one indicator is the input of the following indicator. To chain indicators together with values other than the Current.Value current.value property, create a custom indicator .

    Addition

    The Plus plus extension sums the Current.Value current.value property of two indicators or sums the Current.Value current.value property of an indicator and a fixed value.

    // Sum the output of two indicators
    var rsiShort = RSI("SPY", 14);
    var rsiLong = RSI("SPY", 21);
    var rsiPlusRsi = rsiShort.Plus(rsiLong);
    
    // Sum the output of an indicator and a fixed value
    var rsiPlusValue = rsiShort.Plus(10);
    # Sum the output of two indicators
    rsi_short = self.rsi("SPY", 14)
    rsi_long = self.rsi("SPY", 21)
    rsi_plus_rsi = IndicatorExtensions.plus(rsi_short, rsi_long)
    
    # Sum the output of an indicator and a fixed value
    rsi_plus_value = IndicatorExtensions.plus(rsi_short, 10)

    If you pass an indicator to the Plus plus extension, you can name the composite indicator.

    var namedIndicator = rsiShort.Plus(rsiLong, "RSI Sum");
    named_indicator = IndicatorExtensions.plus(rsi_short, rsi_long, "RSI Sum")

    Subtraction

    The Minus minus extension subtracts the Current.Value current.value property of two indicators or subtracts a fixed value from the Current.Value current.value property of an indicator.

    // Subtract the output of two indicators
    var smaShort = SMA("SPY", 14);
    var smaLong = SMA("SPY", 21);
    var smaDifference = smaShort.Minus(smaLong);
    
    // Subtract a fixed value from the output of an indicator
    var smaMinusValue = smaShort.Minus(10);
    # Subtract the output of two indicators
    sma_short = self.sma("SPY", 14)
    sma_long = self.sma("SPY", 21)
    sma_difference = IndicatorExtensions.minus(sma_short, sma_long)
    
    # Subtract a fixed value from the output of an indicator
    sma_minus_value = IndicatorExtensions.minus(sma_short, 10)

    If you pass an indicator to the Minus minus extension, you can name the composite indicator.

    var namedIndicator = smaShort.Minus(smaLong, "SMA Difference");
    named_indicator = IndicatorExtensions.minus(sma_short, sma_long, "SMA Difference")

    Multiplication

    The Times times extension multiplies the Current.Value current.value property of two indicators or multiplies a fixed value and the Current.Value current.value property of an indicator.

    // Multiply the output of two indicators
    var emaShort = EMA("SPY", 14);
    var emaLong = EMA("SPY", 21);
    var emaProduct = emaShort.Times(emaLong);
    
    // Multiply the output of an indicator and a fixed value
    var emaTimesValue = emaShort.Times(10);
    # Multiply the output of two indicators
    ema_short = self.ema("SPY", 14)
    ema_long = self.ema("SPY", 21)
    ema_product = IndicatorExtensions.times(ema_short, ema_long)
    
    # Multiply the output of an indicator and a fixed value
    ema_times_value = IndicatorExtensions.times(ema_short, 1.5)

    If you pass an indicator to the Times times property extension, you can name the composite indicator.

    var namedIndicator = emaShort.Times(emaLong, "EMA Product");
    named_indicator = IndicatorExtensions.times(ema_short, ema_long, "EMA Product")

    Division

    The Over over extension divides the Current.Value current.value property of an indicator by the Current.Value current.value property of another indicator or a fixed value.

    // Divide the output of two indicators
    var rsiShort = RSI("SPY", 14);
    var rsiLong = RSI("SPY", 21);
    var rsiDivision = rsiShort.Over(rsiLong);
    
    // Divide the output of an indicator by a fixed value
    var rsiAverage = rsiShort.Plus(rsiLong).Over(2);
    # Divide the output of two indicators
    rsi_short = self.rsi("SPY", 14)
    rsi_long = self.rsi("SPY", 21)
    rsi_division = rsi_short.over(rsi_long)
    
    # Divide the output of an indicator by a fixed value
    rsi_half = IndicatorExtensions.over(rsi_short, 2)

    If you pass an indicator to the Over over extension, you can name the composite indicator.

    var namedIndicator = rsiShort.Over(rsiLong, "RSI Division");
    named_indicator = IndicatorExtensions.over(rsi_short, rsi_long, "RSI Division")

    Weighted Average

    The WeightedBy weighted_by extension calculates the average Current.Value current.value property of an indicator over a lookback period, weighted by another indicator over the same lookback period. The value of the calculation is

    $$ \frac{\textbf{x} \cdot \textbf{y}}{ \sum\limits_{i=1}^{n} y_{i} } $$

    where $\textbf{x}$ is a vector that contains the historical values of the first indicator, $\textbf{y}$ is a vector that contains the historical values of the second indicator, and $n$ is the lookback period.

    var smaShort = SMA("SPY", 14); 
    var smaLong = SMA("SPY", 21); 
    var weightedSMA = smaShort.WeightedBy(smaLong, 3);
    
    sma_short = self.sma("SPY", 14)
    sma_long = self.sma("SPY", 21)
    weighted_sma = IndicatorExtensions.weighted_by(sma_short, sma_long, 3)
    

    Custom Chains

    The Of of extension feeds an indicator's Current.Value current.value property into the input of another indicator. The first argument of the IndicatorExtensions.Of method must be a manual indicator with no automatic updates. If you pass an indicator that has automatic updates as the argument, that first indicator is updated twice. The first update is from the security data and the second update is from the IndicatorExtensions class.

    var rsi = RSI("SPY", 14);
    var rsiSMA = (new SimpleMovingAverage(10)).Of(rsi); // 10-period SMA of the 14-period RSI
    rsi = self.rsi("SPY", 14)
    rsi_sma = IndicatorExtensions.of(SimpleMovingAverage(10), rsi) # 10-period SMA of the 14-period RSI

    If you pass a manual indicator as the second argument, to update the indicator chain, update the second indicator. If you call the Update update method of the entire indicator chain, it won't update the chain properly.

    Simple Moving Average

    The SMA sma extension calculates the simple moving average of an indicator's Current.Value current.value property.

    var rsi = RSI("SPY", 14); // Create a RSI indicator
    var rsiSMA = rsi.SMA(3); // Create an indicator to calculate the 3-period SMA of the RSI indicator
    
    rsi = self.rsi("SPY", 14) # Create a RSI indicator
    rsi_sma = IndicatorExtensions.SMA(rsi, 3) # Create an indicator to calculate the 3-period SMA of the RSI indicator
    

    Exponential Moving Average

    The EMA ema extension calculates the exponential moving average of an indicator's Current.Value current.value property.

    var rsi = RSI("SPY", 14); // Create a RSI indicator
    var rsiEMA = _rsi.EMA(3); // Create an indicator to calculate the 3-period EMA of the RSI indicator
    
    rsi = self.rsi("SPY", 14) # Create a RSI indicator
    rsi_ema = IndicatorExtensions.EMA(rsi, 3) # Create an indicator to calculate the 3-period EMA of the RSI indicator
    

    The EMA ema extension can also accept a smoothing parameter that sets the percentage of data from the previous value that's carried into the next value.

    var rsiEMA = rsi.EMA(3, 0.1m); // 10% smoothing factor
    rsi_ema = IndicatorExtensions.EMA(rsi, 3, 0.1) # 10% smoothing factor

    Maximum

    The MAX max extension calculates an indicator's maximum Current.Value current.value property over a lookback window.

    var ema = EMA("SPY", 14); // Create an EMA indicator
    var emaMax = ema.MAX(10); // Create an indicator to calculate the maximum EMA over the last 10 periods
    
    ema = self.ema("SPY", 14) # Create an EMA indicator
    ema_max = IndicatorExtensions.MAX(ema, 10) # Create an indicator to calculate the maximum EMA over the last 10 periods
    

    Minimum

    The MIN min extension calculates an indicator's minimum Current.Value current.value property over a lookback window.

    var ema = EMA("SPY", 14); // Create an EMA indicator
    var emaMin = ema.MIN(10); // Create an indicator to calculate the minimum EMA over the last 10 periods
    
    ema = self.ema("SPY", 14) # Create an EMA indicator
    ema_min = IndicatorExtensions.MIN(ema, 10) # Create an indicator to calculate the minimum EMA over the last 10 periods
    

    Examples

    Demonstration Algorithm
    DisplacedMovingAverageRibbon.py Python

     

    Indicators

    Custom Indicators

    Introduction

    LEAN supports over 100 pre-built indicators, but a custom indicator is an indicator you define. It receives input, performs some calculation, and sets its output value. Custom indicators are helpful when you want to achieve any of the following results:

    Define Indicators

    Custom indicators must implement the PythonIndicator class. The indicator must have an Update update method and Name name , Time time , and Value value attributes. The Update update method must accept an IndicatorDataPoint , QuoteBar , or TradeBar and return a boolean that represents if the indicator is ready. The Time time attribute represents the last time you updated the indicator and the Value value attribute represents the current indicator value. The following definition provides an example of a custom simple moving average indicator.

    Custom indicators subsclass the IndicatorBase<IndicatorDataPoint> , BarIndicator , or TradeBarIndicator class, depending on the indicator type . The following definition provides an example of a custom simple moving average indicator that inherits the IndicatorBase<IndicatorDataPoint> class. To view examples of indicators that inherit the BarIndicator or TradeBarIndicator class, see the AverageTrueRange or VolumeWeightedAveragePriceIndicator implementation in the LEAN GitHub repository.

    public class CustomSimpleMovingAverage : IndicatorBase<IndicatorDataPoint>, IIndicatorWarmUpPeriodProvider
    {
        private RollingWindow<decimal> _window;
        public override bool IsReady => _window.IsReady;
        public int WarmUpPeriod => _window.Size;
    
        public CustomSimpleMovingAverage(string name, int period) : base(name)
        {
            _window = new RollingWindow<decimal>(period);
        }
    
        protected override decimal ComputeNextValue(IndicatorDataPoint input)
        {
            _window.Add(input.Value);
            return _window.Sum() / _window.Size;
        }
    
        public override void Reset()
        {
            _window.Reset();
            base.Reset();
        }
    }
    class CustomSimpleMovingAverage(PythonIndicator):
        def __init__(self, name, period):
            self.name = name
            self.warm_up_period = period
            self.time = datetime.min
            self.value = 0
            self.queue = deque(maxlen=period)
    
        def update(self, input: BaseData) -> bool:
            self.queue.appendleft(input.value)
            count = len(self.queue)
            self.time = input.time
            self.value = sum(self.queue) / count
            return count == self.queue.maxlen

    The following definition provides an example of a custom money flow index indicator.

    public class CustomMoneyFlowIndex : TradeBarIndicator, IIndicatorWarmUpPeriodProvider
    {
        private decimal _previousTypicalPrice;
        private RollingWindow<decimal> _negativeMoneyFlow;
        private RollingWindow<decimal> _positiveMoneyFlow;
        public override bool IsReady => _positiveMoneyFlow.IsReady;
        public int WarmUpPeriod => _positiveMoneyFlow.Size;
            
        public CustomMoneyFlowIndex(string name, int period) : base(name)
        {
            _negativeMoneyFlow = new(period);
            _positiveMoneyFlow = new(period);
            _previousTypicalPrice = 0m;
        }
            
        protected override decimal ComputeNextValue(TradeBar input)
        {
            var typicalPrice = (input.High + input.Low + input.Close) / 3;
            var moneyFlow = typicalPrice * input.Volume;
            
            _negativeMoneyFlow.Add(typicalPrice < _previousTypicalPrice ? moneyFlow: 0);
            _positiveMoneyFlow.Add(typicalPrice > _previousTypicalPrice ? moneyFlow: 0);
            _previousTypicalPrice = moneyFlow;
            
            var positiveMoneyFlowSum = _positiveMoneyFlow.Sum();
            var totalMoneyFlow = positiveMoneyFlowSum + _negativeMoneyFlow.Sum();
            
            return totalMoneyFlow == 0 ? 100m : 100m * positiveMoneyFlowSum / totalMoneyFlow;
        }
            
        public override void Reset()
        {
            _previousTypicalPrice = 0m;
            _negativeMoneyFlow.Reset();
            _positiveMoneyFlow.Reset();
            base.Reset();
        }
    }
    class CustomMoneyFlowIndex(PythonIndicator):
        def __init__(self, name, period):
            super().__init__()
            self.name = name
            self.value = 0
            self.previous_typical_price = 0
            self.negative_money_flow = deque(maxlen=period)
            self.positive_money_flow = deque(maxlen=period)
        
        def update(self, input):
            if not isinstance(input, TradeBar):
                raise TypeError('CustomMoneyFlowIndex.update: input must be a TradeBar')
        
            typical_price = (input.high + input.low + input.close) / 3
            money_flow = typical_price * input.volume
                
            # We need to avoid double rounding errors
            if abs(self.previous_typical_price / typical_price - 1) < 1e-10:
                self.previous_typical_price = typical_price
                
            self.negative_money_flow.appendleft(money_flow if typical_price < self.previous_typical_price else 0)
            self.positive_money_flow.appendleft(money_flow if typical_price > self.previous_typical_price else 0)
            self.previous_typical_price = typical_price
        
            positive_money_flow_sum = sum(self.positive_money_flow)        
            total_money_flow = positive_money_flow_sum + sum(self.negative_money_flow)
        
            self.value = 100
            if total_money_flow != 0:
                self.value *= positive_money_flow_sum / total_money_flow
        
            return len(self.positive_money_flow) == self.positive_money_flow.maxlen

    Create Indicators

    You must define a custom indicator before you can create an instance of it.

    To create a custom indicator, call the indicator constructor.

    private CustomSimpleMovingAverage _sma;
    
    _sma = new CustomSimpleMovingAverage("My SMA", 10);
    self.custom_sma = CustomSimpleMovingAverage("My SMA", 10)

    Updates

    The process to update custom indicators is the same process you use to update manual indicators. For more information about updating manual indicators, see Manual Updates or Automatic Updates .

    Warm Up Indicators

    The process to warm up custom indicators is the same process you use to warm up manual indicators .

    Examples

    Demonstration Algorithms
    CustomIndicatorAlgorithm.py Python

     

    Indicators

    Indicator Universes

    Introduction

    An indicator universe uses technical indicators to determine the constituents of the universe. Imagine a universe that only contains assets above their 10-day simple moving average. You can incorporate indicators into any of the types of universes in the Universes chapter . To create an indicator universe, define a helper class that contains the indicators and then define a universe that updates the indicators and selects assets.

    Define SymbolData Objects

    To make it easy to create and update indicators for each security in the universe, move the indicator logic into a class. In the universe definition, you can create an instance of this class for each security in the universe. The indicators you create in this class should be manual indicators so you can ensure they only update during universe selection.

    class SymbolData(object):
        def __init__(self, symbol):
            self._symbol = symbol
            self.tolerance = 1.01
            self.fast = ExponentialMovingAverage(100)
            self.slow = ExponentialMovingAverage(300)
            self.is_uptrend = False
            self.scale = 0
    
        def update(self, time, value):
            if self.fast.update(time, value) and self.slow.update(time, value):
                fast = self.fast.current.value
                slow = self.slow.current.value
                self.is_uptrend = fast > slow * self.tolerance
    
            if self.is_uptrend:
                self.scale = (fast - slow) / ((fast + slow) / 2.0)
    private class SelectionData
    {
        public readonly ExponentialMovingAverage Fast;
        public readonly ExponentialMovingAverage Slow;
    
        public SelectionData()
        {
            Fast = new ExponentialMovingAverage(100);
            Slow = new ExponentialMovingAverage(300);
        }
    
        public decimal ScaledDelta
        {
            get { return (Fast - Slow)/((Fast + Slow)/2m); }
        }
    
        public bool Update(DateTime time, decimal value)
        {
            return Fast.Update(time, value) && Slow.Update(time, value);
        }
    }

    You need to use a SymbolData class instead of assigning the indicators to the Fundamental object because you can't create custom properties attributes on Fundamental objects like you can with Security objects.

    Define the Universe

    You need to define SymbolData objects before you define the universe that selects securities.

    When your universe function receives an object that contains all the possible securities, create a SymbolData object for each new security and update the remaining SymbolData objects with their daily price or some other data point. For example, the following universe definition selects US Equities that have the greatest difference between two moving averages.

    class EmaCrossUniverseSelectionAlgorithm(QCAlgorithm):
    
        def initialize(self) -> None:
            '''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''
    
            self.set_start_date(2010,1,1)  #Set Start Date
            self.set_end_date(2015,1,1)    #Set End Date
            self.set_cash(100000)           #Set Strategy Cash
            self.universe_settings.asynchronous = True
            self.universe_settings.resolution = Resolution.DAILY
            self.universe_settings.leverage = 2
    
            self.count = 10
            self.averages = { }
    
            # this add universe method accepts two parameters:
            # - fundamental selection function: accepts an IEnumerable<Fundamental> and returns an IEnumerable<Symbol>
            self.add_universe(self.fundamental_selection_function)
    
    
        # sort the data by daily dollar volume and take the top 'NumberOfSymbols'
        def fundamental_selection_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
    
            # We are going to use a dictionary to refer the object that will keep the moving averages
            for f in fundamental:
                if f.symbol not in self.averages:
                    self.averages[f.symbol] = SymbolData(f.symbol)
    
                # Updates the SymbolData object with current EOD price
                avg = self.averages[f.symbol]
                avg.update(f.end_time, f.adjusted_price)
    
            # Filter the values of the dict: we only want up-trending securities
            values = list(filter(lambda x: x.is_uptrend, self.averages.values()))
    
            # Sorts the values of the dict: we want those with greater difference between the moving averages
            values.sort(key=lambda x: x.scale, reverse=True)
    
            for x in values[:self.count]:
                self.log('symbol: ' + str(x.symbol.value) + '  scale: ' + str(x.scale))
    
            # we need to return only the symbol objects
            return [ x.symbol for x in values[:self.count] ]
    namespace QuantConnect.Algorithm.CSharp
    {
        public class EmaCrossUniverseSelectionAlgorithm : QCAlgorithm
        {
            // tolerance to prevent bouncing
            const decimal Tolerance = 0.01m;
            private const int Count = 10;
            // use Buffer+Count to leave a little in cash
            private const decimal TargetPercent = 0.1m;
            private SecurityChanges _changes = SecurityChanges.None;
            // holds our fundamental indicators by symbol
            private readonly ConcurrentDictionary<Symbol, SelectionData> _averages = new ConcurrentDictionary<Symbol, SelectionData>();
        
            public override void Initialize()
            {
                UniverseSettings.Asynchronous = true;
                UniverseSettings.Leverage = 2.0m;
                UniverseSettings.Resolution = Resolution.Daily;
                SetStartDate(2010, 01, 01);
                SetEndDate(2015, 01, 01);
                SetCash(100*1000);
    
                AddUniverse(fundamental =>
                {
                    return (from f in fundamental
                            // grab th SelectionData instance for this symbol
                            let avg = _averages.GetOrAdd(f.Symbol, sym => new SelectionData())
                            // Update returns true when the indicators are ready, so don't accept until they are
                            where avg.Update(f.EndTime, f.AdjustedPrice)
                            // only pick symbols who have their 50 day ema over their 100 day ema
                            where avg.Fast > avg.Slow*(1 + Tolerance)
                            // prefer symbols with a larger delta by percentage between the two averages
                            orderby avg.ScaledDelta descending
                            // we only need to return the symbol and return 'Count' symbols
                            select f.Symbol).Take(Count);
                });
            }
        }
    }

    Examples

    Demonstration Algorithms
    EmaCrossUniverseSelectionAlgorithm.py Python EmaCrossUniverseSelectionAlgorithm.cs C#

     

    Indicators

    Rolling Window

    Introduction

    A RollingWindow is an array of a fixed-size that holds trailing data. It's more efficient to use RollingWindow objects to hold periods of data than to make multiple historical data requests . With a RollingWindow , you just update the latest data point while a History history call fetches all of the data over the period you request. RollingWindow objects operate on a first-in, first-out process to allow for reverse list access semantics. Index 0 refers to the most recent item in the window and the largest index refers to the last item in the window.

    Supported Types

    RollingWindow objects can store any native or C# types.

    closeWindow = new RollingWindow<decimal>(4);
    tradeBarWindow = new RollingWindow<TradeBar>(2);
    quoteBarWindow = new RollingWindow<QuoteBar>(2);
    self._close_window = RollingWindow[float](4)
    self._trade_bar_window = RollingWindow[TradeBar](2)
    self._quote_bar_window = RollingWindow[QuoteBar](2)

    To be notified when RollingWindow objects support additional types, subscribe to GitHub Issue #6199 .

    Add Data

    To add data to a RollingWindow , call the Add add method.

    closeWindow.Add(data["SPY"].Close);
    tradeBarWindow.Add(data["SPY"]);
    quoteBarWindow.Add(data["EURUSD"]);
    self._close_window.add(data["SPY"].close)
    self._trade_bar_window.add(data["SPY"])
    self._quote_bar_window.add(data["EURUSD"])

    To update the data at a specific index, set the value for that index. If the index doesn't currently exist, it increases the size and fills the empty indices with a default value (zero or null None ).

    closeWindow[0] = data["SPY"].Close;
    tradeBarWindow[0] = data["SPY"];
    quoteBarWindow[0] = data["EURUSD"];
    self._close_window[0] = data["SPY"].close
    self._trade_bar_window[0] = data["SPY"]
    self._quote_bar_window[0] = data["EURUSD"]

    Warm Up

    To warm up a RollingWindow , make a history request and then iterate through the result to add the data to the RollingWindow .

    var spy = AddEquity("SPY", Resolution.Daily).Symbol;
    var historyTradeBar = History<TradeBar>(spy, 10, Resolution.Daily);
    var historyQuoteBar = History<QuoteBar>(spy, 10, Resolution.Minute);
    
    // Warm up the close price and trade bar rolling windows with the previous 10-day trade bar data
    var closePriceWindow = new RollingWindow<decimal>(10);
    var tradeBarWindow = new RollingWindow<TradeBar>(10);
    foreach (var tradeBar in historyTradeBar)
    {
        closePriceWindow.Add(tradeBar.Close);
        tradeBarWindow.Add(tradeBar);
    }
    
    // Warm up the quote bar rolling window with the previous 10-minute quote bar data
    var quoteBarWindow = new RollingWindow<QuoteBar>(10);
    foreach (var quoteBar in historyQuoteBar)
    {
        quoteBarWindow.Add(quoteBar);
    }
    spy = self.add_equity("SPY", Resolution.DAILY).symbol
    history_trade_bar = self.history[TradeBar](spy, 10, Resolution.DAILY)
    history_quote_bar = self.history[QuoteBar](spy, 10, Resolution.MINUTE)
    
    # Warm up the close price and trade bar rolling windows with the previous 10-day trade bar data
    close_price_window = RollingWindow[float](10)
    trade_bar_window = RollingWindow[TradeBar](10)
    for trade_bar in history_trade_bar:
        close_price_window.add(trade_bar.close)
        trade_bar_window.add(trade_bar)
    
    # Warm up the quote bar rolling window with the previous 10-minute quote bar data
    quote_bar_window = RollingWindow[QuoteBar](10)
    for quote_bar in history_quote_bar:
        quote_bar_window.add(quote_bar)

    Check Readiness

    To check if a RollingWindow is full, use its IsReady flag.

    if (!closeWindow.IsReady) 
    {
        return;
    }
    if not self._close_window.is_ready:
        return

    Adjust Size

    To adjust the RollingWindow size, set the Size size property.

    closeWindow.Size = 3;
    tradeBarWindow.Size = 3;
    quoteBarWindow.Size = 3;
    self.close_window.size = 3
    self.trade_bar_window.size = 3
    self.quote_bar_window.size = 3

    When you decrease the size, it removes the oldest values that no longer fit in the RollingWindow . When you explicitly increase the Size size member, it doesn't automatically add any new elements to the RollingWindow . However, if you set the value of an index in the RollingWindow and the index doesn't currently exist, it fills the empty indices with a default value (zero or null None ). For example, the following code increases the Size size to 10, sets the 10th element to 3, and sets the 4th-9th elements to the default value:

    closeWindow[9] = 3;
    self.close_window[9] = 3

    Access Data

    RollingWindow objects operate on a first-in, first-out process to allow for reverse list access semantics. Index 0 refers to the most recent item in the window and the largest index refers to the last item in the window.

    var currentClose = closeWindow[0];
    var previousClose = closeWindow[1];
    var oldestClose = closeWindow[closeWindow.Count-1];
    current_close = self.close_window[0]
    previous_close = self.close_window[1]
    oldest_close = self.close_window[self.close_window.count-1]

    To get the item that was most recently removed from the RollingWindow , use the MostRecentlyRemoved most_recently_removed property.

    var removedClose = closeWindow.MostRecentlyRemoved;
    removed_close = self.close_window.most_recently_removed

    Combine with Indicators

    Indicators have a built-in RollingWindow that stores historical values. To access these historical values, see Get Indicator Values .

    Combine with Consolidators

    To store a history of consolidated bars , in the consolidation handler, add the consolidated bar to the RollingWindow .

    _consolidator.DataConsolidated += (sender, consolidatedBar) => tradeBarWindow.Add(consolidatedBar);
    self.consolidator.data_consolidated += lambda sender, consolidated_bar: self.trade_bar_window.add(consolidated_bar)

    Cast to Other Types

    You can cast a RollingWindow to a list or a DataFrame. If you cast it to a list, reverse the list so the most recent element is at the last index of the list. This is the order the elements would be in if you added the elements to the list with the Add method. To cast a RollingWindow to a DataFrame, the RollingWindow must contain Slice , Tick , QuoteBar , or TradeBar objects. If the RollingWindow contains ticks, the ticks must have unique timestamps.

    You can cast a RollingWindow to a list. If you cast it to a list, reverse the list so the most recent element is at the last index of the list. This is the order the elements would be in if you added the elements to the list with the Add add method.

    var closes = closeWindow.Reverse().ToList();
    closes = list(self.close_window)[::-1]
    
    tick_df = self.pandas_converter.get_data_frame[Tick](list(self.tick_window)[::-1])
    trade_bar_df = self.pandas_converter.get_data_frame[TradeBar](list(self.trade_bar_window)[::-1])
    quote_bar_df = self.pandas_converter.get_data_frame[QuoteBar](list(self.quote_bar_window)[::-1])

    Delete Data

    To remove all of the elements from a RollingWindow , call the Reset reset method.

    closeWindow.Reset();
    self.close_window.reset()

    Examples

    Demonstration Algorithm
    RollingWindowAlgorithm.py Python CustomVolatilityModelAlgorithm.py Python MultipleSymbolConsolidationAlgorithm.py Python RollingWindowAlgorithm.cs C# MultipleSymbolConsolidationAlgorithm.cs C#

     

    Object Store

    Introduction

    The Object Store is a file system that you can use in your algorithms to save, read, and delete data. The Object Store is organization-specific, so you can save or read data from the same Object Store in all of your organization's projects. The Object Store works like a key-value storage system where you can store regular strings, JSON encoded strings, XML encoded strings, and bytes. You can access the data you store in the Object Store from backtests, the Research Environment, and live algorithms.

    Get All Stored Data

    To get all of the keys and values in the Object Store, iterate through the ObjectStore object_store property.

    foreach (var kvp in ObjectStore)
    {
        var key = kvp.Key;
        var value = kvp.Value;
    }
    for kvp in self.object_store:
        key = kvp.key
        value = kvp.value

    To iterate through just the keys in the Object Store, iterate through the Keys keys property.

    foreach (var key in ObjectStore.Keys)
    {
        continue;
    }
    for key in self.object_store.keys:
        continue

    Create Sample Data

    You need some data to store data in the Object Store.

    Follow these steps to create some sample data:

    1. Create a dictionary.
    2. var dictSample = new Dictionary<string, int> { {"One", 1}, {"Two", 2}, {"Three", 3} };
    3. Create a string .
    4. var stringSample = "My string";
      string_sample = "My string"
    5. Create a Bytes object.
    6. var bytesSample = Encoding.UTF8.GetBytes("My String");
      bytes_sample = str.encode("My String")
    7. Convert the dictionary to an XML -formatted object.
    8. var xmlSample = new XElement("sample",
          dictSample.Select(kvp => new XElement(kvp.Key, kvp.Value)));
      Log(xmlSample.ToString());
      Sample XML format data

    Save Data

    The Object Store saves objects under a key-value system. If you save objects in backtests, you can access them from the Research Environment. To avoid slowing down your backtests, save data once in the OnEndOfAlgorithm on_end_of_algorithm event handler. In live trading, you can save data more frequently like at the end of a Train train method or after universe selection.

    If you run algorithms in QuantConnect Cloud, you need storage create permissions to save data in the Object Store.

    If you don't have data to store, create some sample data .

    You can save the following types of objects in the Object Store:

    You can save Bytes and string objects in the Object Store. To store data, you need to provide a key. If you provide a key that is already in the Object Store, it will overwrite the data at that location. To avoid overwriting objects from other projects in your organization, prefix the key with your project ID. You can find the project ID in the URL of your browser when you open a project. For example, the ID of the project at quantconnect.com/project/12345 is 12345.

    Strings

    To save a string object, call the Save save or SaveString save_string method.

    var saveSuccessful = ObjectStore.Save($"{ProjectId}/stringKey", stringSample);
    save_successful = self.object_store.save(f"{self.project_id}/string_key", string_sample)

    JSON

    To save a JSON object, call the SaveJson<T> method. This method helps to serialize the data into JSON format.

    var saveSuccessful = ObjectStore.SaveJson<Dictionary<string, int>>($"{ProjectId}/jsonKey", dictSample);

    XML

    To save an XML-formatted object, call the SaveXml<T> method.

    var saveSuccessful = ObjectStore.SaveXml<XElement>($"{ProjectId}/xmlKey", xmlSample);

    Bytes

    To save a Bytes object (for example, zipped data), call the SaveBytes save_bytes method.

    var saveSuccessful = ObjectStore.SaveBytes($"{ProjectId}/bytesKey", bytesSample)
    
    var zippedDataSample = Compression.ZipBytes(Encoding.UTF8.GetBytes(stringSample), "data");
    var saveSuccessful = ObjectStore.SaveBytes($"{ProjectId}/bytesKey.zip", zippedDataSample);
    save_successful = self.object_store.save_bytes(f"{self.project_id}/bytes_key", bytes_sample)
    
    zipped_data_sample = Compression.zip_bytes(bytes(string_sample, "utf-8"), "data")
    zip_save_successful = self.object_store.save_bytes(f"{self.project_id}/bytesKey.zip", zipped_data_sample)

    Read Data

    Read data from the Object Store to import algorithm variables between deployments, import data from the Research Environment, or load trained machine learning models. To read data from the Object Store, you need to provide the key you used to store the object.

    You can load the following types of objects from the Object Store:

    You can load Bytes and string objects from the Object Store.

    Before you read data from the Object Store, check if the key exists.

    if (ObjectStore.ContainsKey(key))
    {
        // Read data
    }
    if self.object_store.contains_key(key):
        # Read data

    Strings

    To read a string object, call the Read read or ReadString read_string method.

    var stringData = ObjectStore.Read($"{ProjectId}/stringKey");
    string_data = self.object_store.read(f"{self.project_id}/string_key")

    JSON

    To read a JSON object, call the ReadJson<T> method.

    var jsonData = ObjectStore.ReadJson<Dictionary<string, int>>($"{ProjectId}/jsonKey");

    XML

    To read an XML-formatted object, call the ReadXml<T> method.

    var xmlData = ObjectStore.ReadXml<XElement>($"{ProjectId}/xmlKey");

    If you created the XML object from a dictionary, reconstruct the dictionary.

    var dict = xmlData.Elements().ToDictionary(x => x.Name.LocalName, x => int.Parse(x.Value));

    Bytes

    To read a Bytes object, call the ReadBytes read_bytes method.

    var bytesData = ObjectStore.ReadBytes($"{ProjectId}/bytesKey");
    byte_data = self.object_store.read_bytes(f"{self.project_id}/bytes_key")

    Delete Data

    Delete objects in the Object Store to remove objects that you no longer need. If you run algorithms in QuantConnect Cloud, you need storage delete permissions to delete data from the Object Store.

    To delete objects from the Object Store, call the Delete delete method. Before you delete data, check if the key exists. If you try to delete an object with a key that doesn't exist in the Object Store, the method raises an exception.

    if (ObjectStore.ContainsKey(key))
    {
        ObjectStore.Delete(key);
    }
    if self.object_store.contains_key(key):
        self.object_store.delete(key)

    To delete all of the content in the Object Store, iterate through all the stored data.

    foreach (var kvp in ObjectStore)
    {
        ObjectStore.Delete(kvp.Key);
    }
    for kvp in self.object_store:
        self.object_store.delete(kvp.key)

    Cache Data

    When you write to or read from the Object Store, the algorithm caches the data. The cache speeds up the algorithm execution because if you try to read the Object Store data again with the same key, it returns the cached data instead of downloading the data again. The cache speeds up execution, but it can cause problems if you are trying to share data between two nodes under the same Object Store key. For example, consider the following scenario:

    1. You open project A and save data under the key 123 .
    2. You open project B and save new data under the same key 123 .
    3. In project A, you read the Object Store data under the key 123 , expecting the data from project B, but you get the original data you saved in step #1 instead.
    4. You get the data from step 1 instead of step 2 because the cache contains the data from step 1.

    To clear the cache, call the Clear method.

    ObjectStore.Clear();
    self.object_store.clear()

    Get File Path

    To get the file path for a specific key in the Object Store, call the GetFilePath get_file_path method. If the key you pass to the method doesn't already exist in the Object Store, it's added to the Object Store.

    var filePath = ObjectStore.GetFilePath(key);
    file_path = self.object_store.get_file_path(key)

    Storage Quotas

    If you run algorithms locally, you can store as much data as your hardware will allow. If you run algorithms in QuantConnect Cloud, you must stay within your storage quota . If you need more storage space, edit your storage plan .

    Example for DataFrames

    Follow these steps to create a DataFrame, save it into the Object Store, and load it from the Object Store:

    1. Get some historical data.
    2. var spy = AddEquity("SPY").Symbol;
      var history = History(Securities.Keys, 360, Resolution.Daily);
      spy = self.add_equity("SPY").symbol
      df = self.history(self.securities.keys, 360, Resolution.DAILY)
    3. Create a DataFrame.
    4. using Microsoft.Data.Analysis; // 
      
      var columns = new DataFrameColumn[] {
          new DateTimeDataFrameColumn("Time", history.Select(x => (DateTime)x[spy].EndTime)),
          new DecimalDataFrameColumn("SPY Open", history.Select(x => (decimal)x[spy].Open)),
          new DecimalDataFrameColumn("SPY High", history.Select(x => (decimal)x[spy].High)),
          new DecimalDataFrameColumn("SPY Low", history.Select(x => (decimal)x[spy].Low)),
          new DecimalDataFrameColumn("SPY Close", history.Select(x => (decimal)x[spy].Close))
      };
      var df = new DataFrame(columns);
    5. Get the file path for a specific key in the Object Store.
    6. var filePath = ObjectStore.GetFilePath("df_to_csv");
      file_path = self.object_store.get_file_path("df_to_csv")
    7. Call the SaveCsv to_csv method to save the DataFrame in the Object Store as a CSV file.
    8. DataFrame.SaveCsv(df, filePath);    // File size: 26520 bytes
      df.to_csv(file_path)   # File size: 32721 bytes
    9. Call the LoadCsv read_csv method to load the CSV file from the Object Store.
    10. var reread = DataFrame.LoadCsv(filePath);
      reread = pd.read_csv(file_path)

    pandas supports saving and loading DataFrame objects in the following additional formats:

    Example for Plotting

    You can use the Object Store to plot data from your backtests and live algorithm in the Research Environment. The following example demonstrates how to plot a Simple Moving Average indicator that's generated during a backtest.

    1. Create a algorithm, add a data subscription, and add a simple moving average indicator.
    2. public class ObjectStoreChartingAlgorithm : QCAlgorithm
      {
          private SimpleMovingAverage _sma;
          private string _content;
      
          public override void Initialize()
          {
              AddEquity("SPY", Resolution.Minute);
              _sma = SMA("SPY", 22);
          }
      }
      class ObjectStoreChartingAlgorithm(QCAlgorithm):
          def initialize(self):
              self.add_equity("SPY")
          
              self.content = ''
              self._sma = self.sma("SPY", 22)

      The algorithm will save _content self.content to the Object Store.

    3. Save the indicator data as string in _content self.content .
    4. public override void OnData(Slice data)
      {
          _content += $"{_sma.Current.EndTime},{_sma}\n";
      }
      def on_data(self, data: Slice):
          self.plot('SMA', 'Value', self.sma.current.value)
          self.content += f'{self.sma.current.end_time},{self.sma.current.value}\n'
    5. In the OnEndOfAlgorithm method, save the indicator data to the Object Store.
    6. public override void OnEndOfAlgorithm()
      {
          ObjectStore.Save("sma_values_csharp", _content);
      }
      def on_end_of_algorithm(self):
          self.object_store.save('sma_values_python', self.content)
    7. Open the Research Environment and create a QuantBook .
    8. // Execute the following command in first
      #load "../Initialize.csx"
      
      // Create a QuantBook object
      #load "../QuantConnect.csx"
      using QuantConnect;
      using QuantConnect.Research;
      
      var qb = new QuantBook();
      qb = QuantBook()
    9. Read the indicator data from the Object Store.
    10. var content = qb.ObjectStore.Read("sma_values_csharp");
      content = qb.object_store.read("sma_values_python")

      The key you provide must be the same key you used to save the object.

    11. Convert the data to a pandas object and create a chart.
    12. data = {}
      for line in content.split('\n'):
          csv = line.split(',')
          if len(csv) > 1:
              data[csv[0]] = float(csv[1])
      
      series = pd.Series(data, index=data.keys())
      series.plot()
    13. Import the Plotly.NET and Plotly.NET.LayoutObjects packages.
    14. #r "../Plotly.NET.dll"
      using Plotly.NET;
      using Plotly.NET.LayoutObjects;
    15. Create the Layout object and set the title , xaxis , and yaxis properties.
    16. var layout = new Layout();
      layout.SetValue("title", Title.init("SMA"));
      
      var xAxis = new LinearAxis();
      xAxis.SetValue("title", "Time");
      layout.SetValue("xaxis", xAxis);
      
      var yAxis = new LinearAxis();
      yAxis.SetValue("title", "SMA");
      layout.SetValue("yaxis", yAxis);
    17. Convert the data to a list of DateTime objects for the chart x-axis and a list of decimal objects for the chart y-axis, then create a Chart2D.Chart.Line object with the data.
    18. var index = new List<DateTimee>();
      var values = new List<decimal>();
      
      foreach (var line in content.Split('\n'))
      {
          var csv = line.Split(',');
          if (csv.Length > 1)
          {
              index.Add(Parse.DateTime(csv[0]));
              values.Add(decimal.Parse(csv[1]));
          }
      }
      
      var chart = Chart2D.Chart.Linee<DateTime, decimal, stringe>(index, values);
    19. Apply the layout to the Line object and create the HTML object.
    20. chart.WithLayout(layout);
      var result = HTML(GenericChart.toChartHTML(chart));

    Example of Custom Data

    Follow these steps to use the Object Store as a data source for custom data :

    1. Create a custom data class that defines a storage key and implements the GetSource get_source method.
    2. public class Bitstamp : TradeBar
      {
          public static string KEY = "bitstampusd.csv";
                  
          public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
          {
              return new SubscriptionDataSource(KEY, SubscriptionTransportMedium.ObjectStore);
          }
      }    
      class Bitstamp(PythonData):
          KEY = 'bitstampusd.csv'
          def get_source(self, config, date, isLiveMode):
              return SubscriptionDataSource(Bitstamp.KEY, SubscriptionTransportMedium.OBJECT_STORE)
    3. Create an algorithm that downloads data from an external source and saves it to the Object Store .
    4. public class ObjectStoreCustomDataAlgorithm : QCAlgorithm
      {
          public override void Initialize()
          {
              if (!ObjectStore.ContainsKey(Bitstamp.KEY))
              {
                  var url = "https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/bitstampusd.csv";
                  var content = Download(url);
                  ObjectStore.Save(Bitstamp.KEY, content);
              }   
          }
      }
      class ObjectStoreCustomDataAlgorithm(QCAlgorithm):
          def initialize(self):
              if not self.object_store.contains_key(Bitstamp.KEY):
                  url = "https://raw.githubusercontent.com/QuantConnect/Documentation/master/Resources/datasets/custom-data/bitstampusd.csv"
                  content = self.download(url)
                  self.object_store.save(Bitstamp.KEY, content)
    5. Call the AddData add_data method to subscribe to the custom type .
    6. public class ObjectStoreCustomDataAlgorithm : QCAlgorithm
      {
          private Symbol _customDataSymbol;
          public override void Initialize()
          {
              _customDataSymbol = AddData<Bitstamp>("BTC").Symbol;  
          }
      }
      class ObjectStoreCustomDataAlgorithm(QCAlgorithm):
          def initialize(self):
              self.custom_data_symbol = self.add_data(Bitstamp, "BTC").symbol
    7. Implement the Reader method for the custom data class.
    8. public class Bitstamp : TradeBar
      {
          public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
          {
              //Example Line Format:
              //Date      Open   High    Low     Close   Volume (BTC)    Volume (Currency)   Weighted Price
              //2011-09-13 5.8    6.0     5.65    5.97    58.37138238,    346.0973893944      5.929230648356
              if (!char.IsDigit(line.Trim()[0]))
              {
                  return null;
              }
      
              var coin = new Bitstamp() {Symbol = config.Symbol};
      
              var data = line.Split(',');
              coin.Value = data[4].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
              if (coin.Value == 0)
              {
                  return null;
              }
      
              coin.Time = DateTime.Parse(data[0], CultureInfo.InvariantCulture);
              coin.EndTime = coin.Time.AddDays(1);
              coin.Open = data[1].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
              coin.High = data[2].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
              coin.Low = data[3].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
              coin.VolumeBTC = data[5].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
              coin.Volume = data[6].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
              coin.WeightedPrice = data[7].IfNotNullOrEmpty(s => decimal.Parse(s, NumberStyles.Any, CultureInfo.InvariantCulture));
              coin.Close = coin.Value;
              return coin;
          }
      }
      class Bitstamp(PythonData):
          def reader(self, config, line, date, isLiveMode):
              # Example Line Format:
              # Date      Open   High    Low     Close   Volume (BTC)    Volume (Currency)   Weighted Price
              # 2011-09-13 5.8    6.0     5.65    5.97    58.37138238,    346.0973893944      5.929230648356
              if not line[0].isdigit():
                  return None
      
              coin = Bitstamp()
              coin.symbol = config.symbol
              data = line.split(',')
      
              # If value is zero, return None
              coin.value = float(data[4])
              if coin.value == 0:
                  return None
      
              coin.time = datetime.strptime(data[0], "%Y-%m-%d")
              coin.end_time = coin.time + timedelta(1)
              coin["Open"] = float(data[1])
              coin["High"] = float(data[2])
              coin["Low"] = float(data[3])
              coin["Close"] = coin.value
              coin["VolumeBTC"] = float(data[5])
              coin["VolumeUSD"] = float(data[6])
              coin["WeightedPrice"] = float(data[7])
              return coin
    9. To confirm your algorithm is receiving the custom data, request some historical data , then log and plot the data from the Slice object.
    10. public class ObjectStoreCustomDataAlgorithm : QCAlgorithm
      {
          public override void Initialize()
          {
              var history = History(_customDataSymbol, 200, Resolution.Daily);
              Debug($"We got {history.Count()} items from historical data request of {_customDataSymbol}.");
          }
          public void OnData(Bitstamp data)
          {
              Log($"{data.EndTime}: Close: {data.Close}");
              Plot(_customDataSymbol, "Price", data.Close);
          }
      }
      class ObjectStoreCustomDataAlgorithm(QCAlgorithm):
          def initialize(self):
              history = self.history(Bitstamp, self.custom_data_symbol, 200, Resolution.DAILY)
              self.debug(f"We got {len(history)} items from historical data request of {self.custom_data_symbol}.")
          def on_data(self, slice):
              data = slice.get(Bitstamp).get( self.custom_data_symbol)
              if not data:
                  return
      
              self.log(f'{data.end_time}: Close: {data.close}')
              self.plot(self.custom_data_symbol, 'Price', data.close)

    The following algorithm provides a full example of a sourcing custom data from the Object Store:

    Preserve Insights Between Deployments

    Follow these steps to use the Object Store to preserve the algorithm state across live deployments:

    1. Create an algorithm that defines a storage key and adds insights to the Insight Manager .
    2. public class ObjectStoreChartingAlgorithm : QCAlgorithm
      {
          private string _insightKey;
          public override void Initialize()
          {
              _insightKey = $"{ProjectId}/insights";
              SetUniverseSelection(new ManualUniverseSelectionModel(QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA)));
              SetAlpha(new ConstantAlphaModel(InsightType.Price, InsightDirection.Up, TimeSpan.FromDays(5), 0.025, null));    
          }
      }
      class ObjectStoreChartingAlgorithm(QCAlgorithm):
          def initialize(self):
              self.insight_key = f"{self.project_id}/insights"
              self.set_universe_selection(ManualUniverseSelectionModel([ Symbol.create("SPY", SecurityType.EQUITY, Market.USA) ]))
              self.set_alpha(ConstantAlphaModel(InsightType.PRICE, InsightDirection.UP, timedelta(5), 0.025, None))
    3. At the top of the algorithm file, add the following imports:
    4. from Newtonsoft.Json import JsonConvert
      from System.Collections.Generic import List

      Insight objects are a C# objects, so you need the preceding C# libraries to serialize and deserialize them.

    5. In the OnEndOfAlgorithm on_end_of_algorithm event handler of the algorithm, get the Insight objects and save them in the Object Store as a JSON object.
    6. public override void OnEndOfAlgorithm()
      {
          var insights = Insights.GetInsights(x => x.IsActive(UtcTime));
          ObjectStore.SaveJson(_insightKey, insights);
      }
      def on_end_of_algorithm(self):
          insights = self.insights.get_insights(lambda x: x.is_active(self.utc_time))
          content = ','.join([JsonConvert.SerializeObject(x) for x in insights])
          self.object_store.save(self.insight_key, f'[{content}]')
    7. At the bottom of the Initialize initialize method, read the Insight objects from the Object Store and add them to the Insight Manager .
    8. if (ObjectStore.ContainsKey(_insightKey))
      {
          var insights = ObjectStore.ReadJson<List<Insight>>(_insightKey);
          Insights.AddRange(insights);
      }
      if self.object_store.contains_key(self.insight_key):
          insights = self.object_store.read_json[List[Insight]](self.insight_key)
          self.insights.add_range(insights)

    The following algorithm provides a full example of preserving the Insight state between deployments:

    Live Trading Considerations

    If you update the Object Store from outside of your live trading node and then try to read the new content from inside your live trading algorithm, you may not get the new content because the Object Store caches data to speed up execution. To ensure you get the latest value for a specific key in the Object Store, clear the cache and then read the data .

    ObjectStore.Clear();
    if (ObjectStore.ContainsKey(key))
    {
        var value = ObjectStore.Read(key);
    }
    self.object_store.clear()
    if self.object_store.contains_key(key):
        value = self.object_store.read(key)

     

    Parameters

    Introduction

    Parameters are project variables that your algorithm uses to define the value of internal variables like indicator arguments or the length of lookback windows. Parameters are stored outside of your algorithm code, but we inject the values of the parameters into your algorithm when you run a backtest, deploy a live algorithm, or launch an optimization job. To use parameters, set some parameters in your project and then load them into your algorithm.

    Set Parameters

    The process to set parameter values depends on the environment you use to write algorithms. See the tutorial in one of the following environments:

    Get Parameters

    To get a parameter value into your algorithm, call the GetParameter get_parameter method of the algorithm class.

    var parameterValue = GetParameter("parameterName");
    parameter_value = self.get_parameter("parameterName")

    The GetParameter get_parameter method returns a string by default. If you provide a default parameter value, the method returns the parameter value as the same data type as the default value. If there are no parameters in your project that match the name you pass to the method and you provide a default value to the method, it returns the default value. The following table describes the arguments the GetParameter get_parameter method accepts:

    Argument Data Type Description Default Value
    name string str The name of the parameter to get
    defaultValue string/int/double/decimal The default value to return null
    default_value str/int/double The default value to return None

    The following example algorithm gets the values of parameters of each data type:

    namespace QuantConnect.Algorithm.CSharp
    {
        public class ParameterizedAlgorithm : QCAlgorithm
        {
            public override void Initialize()
            {
                // Get the parameter value and return an integer
                var intParameterValue = GetParameter("<intParameterName>", 100);
    
                // Get the parameter value and return a double
                var doubleParameterValue = GetParameter("<doubleParameterName>", 0.95);
    
                // Get the parameter value and return a decimal
                var decimalParameterValue = GetParameter("<decimalParameterName>", 0.05m);
    
                // Get the parameter value as a string
                var stringParameterValue = GetParameter("<parameterName>", "defaultStringValue")
    
                // Cast it to an integer
                var castedParameterValue = Convert.ToInt32(stringParameterValue);
            }
        }
    }
    class ParameterizedAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            # Get the parameter value and return an integer
            int_parameter_value = self.get_parameter("<int_parameter_name>", 100)
    
            # Get the parameter value and return a double
            float_parameter_value = self.get_parameter("<float_parameter_name>", 0.95)
    
            # Get the parameter value as a string
            string_parameter_value = self.get_parameter("<parameter_name>", "default_string_value")
    
            # Cast it to an integer
            parameter_value = int(string_parameter_value)

    Alternatively, you can use the Parameter(name) attribute on top of class fields or properties to set their values. If there are no parameters in your project that match the name you pass to the attribute and you provide a default value to the method, it returns the default value.

    namespace QuantConnect.Algorithm.CSharp
    {
        public class ParameterizedAlgorithm : QCAlgorithm
        {
            [Parameter("<intParameterName>")]
            public int IntParameterValue = 100;
    
            [Parameter("<doubleParameterName>")]
            public double DoubleParameterValue = 0.95;
    
            [Parameter("<decimalParameterName>")]
            public decimal DecimalParameterValue = 0.05m;
        }
    }

    The parameter values are sent to your algorithm when you deploy the algorithm, so it's not possible to change the parameter values while the algorithm runs.

    Overfitting

    Overfitting occurs when a function is fit too closely fit to a limited set of training data. Overfitting can occur in your trading algorithms if you have many parameters or select parameters values that worked very well in the past but are sensitive to small changes in their values. In these cases, your algorithm will likely be fine-tuned to fit the detail and noise of the historical data to the extent that it negatively impacts the live performance of your algorithm. The following image shows examples of underfit, optimally-fit, and overfit functions:

    Overfitting an optimization job

    An algorithm that is dynamic and generalizes to new data is more likely to survive across different market conditions and apply to other markets.

    Look-Ahead Bias

    Look-ahead bias occurs when an algorithm makes decisions using data that would not have yet been available. For instance, in optimization jobs, you optimize a set of parameters over a historical backtesting period. After the optimizer finds the optimal parameter values, the backtest period becomes part of the in-sample data. If you run a backtest over the same period using the optimal parameters, look-ahead bias has seeped into your research. In reality, it would not be possible to know the optimal parameters during the testing period until after the testing period is over. To avoid issues with look-ahead bias, optimize on older historical data and test the optimal parameter values on recent historical data. Alternatively, apply walk forward optimization to optimize the parameters on smaller batches of history.

    Live Trading Considerations

    To update parameters in live mode, add a Schedule Event that downloads a remote file and uses its contents to update the parameter values.

    private Dictionary _parameters = new();
    public override void Initialize()
    {
        if (LiveMode)
        {
            Schedule.On(
                DateRules.EveryDay(),
                TimeRules.Every(TimeSpan.FromMinutes(1)),
                ()=>
                {
                    var content = Download(urlToRemoteFile);
                    // Convert content to _parameters
                });
        }
    }
    def initialize(self):
        self.parameters = { }
        if self.live_mode:
            def download_parameters():
                content = self.download(url_to_remote_file)
                # Convert content to self.parameters
    
            self.schedule.on(self.date_rules.every_day(), self.time_rules.every(timedelta(minutes=1)), download_parameters)
    

    Examples

    The following example algorithm demonstrates loading parameter values with the GetParameter get_parameter method :

    namespace QuantConnect.Algorithm.CSharp
    {
        public class ParameterizedAlgorithm : QCAlgorithm
        {
            private ExponentialMovingAverage _fast;
            private ExponentialMovingAverage _slow;
        
            public override void Initialize()
            {
                SetStartDate(2020, 1, 1);
                SetCash(100000);
                AddEquity("SPY");
        
                var fastPeriod = GetParameter("ema-fast", 100);
                var slowPeriod = GetParameter("ema-slow", 200);
        
                _fast = EMA("SPY", fastPeriod);
                _slow = EMA("SPY", slowPeriod);
            }
        }
    }
    class ParameterizedAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.set_start_date(2020, 1, 1)
            self.set_cash(100000)
            self.add_equity("SPY")
        
            fast_period = self.get_parameter("ema-fast", 100)
            slow_period = self.get_parameter("ema-slow", 200)
        
            self._fast = self.ema("SPY", fast_period)
            self._slow = self.ema("SPY", slow_period)

    The following example algorithm demonstrates loading parameter values with the Parameter attribute:

    namespace QuantConnect.Algorithm.CSharp
    {
        public class ParameterizedAlgorithm : QCAlgorithm
        {
            [Parameter("ema-fast")]
            public int FastPeriod = 100;
    
            [Parameter("ema-slow")]
            public int SlowPeriod = 200;
    
            private ExponentialMovingAverage _fast;
            private ExponentialMovingAverage _slow;
            
            public override void Initialize()
            {
                SetStartDate(2020, 1, 1);
                SetCash(100000);
                AddEquity("SPY");
            
                _fast = EMA("SPY", FastPeriod);
                _slow = EMA("SPY", SlowPeriod);
            }
        }
    }
    Demonstration Algorithms
    ParameterizedAlgorithm.py Python ParameterizedAlgorithm.cs C#

     

    Machine Learning

    Machine Learning

    Key Concepts

    Introduction

    Machine learning is a field of study that combines statistics and computer science to build intelligent systems that predict outcomes. You can use machine learning techniques in your trading strategies.

    Supported Libraries

    LEAN supports several machine learning libraries. You can import these packages and use them in your algorithms.

    Name Version Language Import Statement Example
    TensorFlow 2.16.1 Python import tensorflow
    SciKit Learn 1.4.2 Python import sklearn
    Py Torch 2.2.1 Python import torch
    Keras 3.3.3 Python import keras
    gplearn 0.4.2 Python import gplearn
    hmmlearn 0.3.2 Python import hmmlearn
    tsfresh 0.20.2 Python import tsfresh
    Stable-Baselines3 2.3.2 Python from stable_baselines3 import *
    fastai 2.7.14 Python import fastai
    Deap 1.4.1 Python import deap
    XGBoost 2.0.3 Python import xgboost
    mlfinlab 1.6.0 Python import mlfinlab
    Accord 3.6.0 C# using Accord.MachineLearning;

    Add New Libraries

    To request a new library, contact us . We will add the library to the queue for review and deployment. Since the libraries run on our servers, we need to ensure they are secure and won't cause harm. The process of adding new libraries takes 2-4 weeks to complete. View the list of libraries currently under review on the Issues list of the Lean GitHub repository .

    Save Models

    After you train a model, you can save it into the Object Store . In QuantConnect Cloud, we back up your Object Store data on QuantConnect servers. In local algorithms, your local machine saves the Object Store data. If you save models in live algorithms, save them at the end of the training method so you can access the trained model again if your algorithm stops executing. If you save models in backtests, save them during the OnEndOfAlgorithm on_end_of_algorithm event handler so that saving multiple times doesn't slow down your backtest.

    To view examples of storing library-specific models, see Popular Libraries .

    Load Models

    You can load machine learning models from the Object Store or a custom data file like pickle. If you load models from the Object Store, before you load the model into your algorithm, in the Initialize initialize method, check if the Object Store already contains the model. To avoid look-ahead bias in backtests, don't train your model on the same data you use to test the model.

     

    Machine Learning

    Training Models

    Introduction

    Algorithms usually must process each timeslice within 10 minutes, but the Train train method allows you to increase this time to train machine learning models. The length of time you can train depends on your training quotas.

    Train Models

    To train models immediately, call the Train train method and pass in the name of your training method.

    Train(MyTrainingMethod);
    self.train(self.my_method)

    Immediate training is most useful for training your model when you first deploy your strategy to production or when the model's performance begins to degrade.

    Schedule Training Sessions

    You can schedule model training sessions in a similar way to a Scheduled Event. To schedule a training session do this, pass in a DateRules and TimeRules argument to the Train train method.

    // Set TrainingMethod to be executed at 8:00 am every Sunday
    Train(DateRules.Every(DayOfWeek.Sunday), TimeRules.At(8, 0), MyTrainingMethod);
    # Set TrainingMethod to be executed at 8:00 am every Sunday
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8,0), self.my_training_method)

    We recommend you schedule your training sessions for when the market is closed to get the best compute allocation. While the market is open, your CPU is occupied with processing incoming tick data and handling other LEAN events.

    Training Quotas

    Training resources are allocated with a leaky bucket algorithm where you can use a maximum of n-minutes in a single training session and the number of available minutes refills over time. This design gives you burst allocations when you need them and recharges the allowance to prepare for the next training.

    Cloud Quotas

    If you execute algorithms in QuantConnect Cloud, see Training Quotas for more information about the training quotas.

    Local Quotas

    If you execute algorithms locally, the following table shows the default settings for the leaky bucket algorithm:

    Setting Value
    Capacity (minutes)
    120
    Time interval (minutes) 1440
    Refill amount (minutes per time interval)
    Capacity / 7

    To allow virtually unlimited training for local algorithms, add the following key-value pairs to your Lean / Launcher / config.json file:

    "scheduled-event-leaky-bucket-capacity" : 99999999,
    "scheduled-event-leaky-bucket-time-interval-minutes" : 1,
    "scheduled-event-leaky-bucket-refill-amount": 999999,

    Check Model Readiness

    In backtests, the Train train method is synchronous, so it blocks your algorithm execution while the model trains. In live trading, the Train train method is asynchronous, so ensure your model is trained before you continue the algorithm execution. Training occurs on a separate thread, so set a boolean flag to notify your algorithm of the model state. A semaphore is a thread-safe flag you can use to synchronize program operations across different threads.

    class SemaphoreTrainingAlgorithm(QCAlgorithm):
    
        # Model Object
        model = None
        # Model State Flag
        model_is_training = False
    
        def initialize(self) -> None: 
            self.train(self.my_training_method)
        
        def my_training_method(self) -> None: 
            self.model_is_training = True
            # Perform Work
            self.model_is_training = False
        
        def on_data(self, slice: Slice) -> None: 
            # Do not use model while it is being trained.
            if self.model_is_training:
                return
            
            # Once training is complete; use the model safely.
            result = self.model.predict()
    
    public class SemaphoreTrainingAlgorithm : QCAlgorithm
    {
        // Model Object
        private MachineLearningModel _model;
        // Model State Flag
        private bool _modelIsTraining;
    
        public override void Initialize()
        {
            Train(MyTrainingMethod);
        }
    
        private void MyTrainingMethod()
        {
            _modelIsTraining = true;
            // Perform Work
            _modelIsTraining = false;
        }
    
        public override void OnData(Slice slice)
        {
            // Do not use model while it is being trained.
            if (_modelIsTraining)
            {
                return;
            }
            // Once training is complete; use the model safely.
            var result = _model.Predict();
        }
    }

    Examples

    Demonstration Algorithms
    TrainingExampleAlgorithm.py Python TrainingExampleAlgorithm.cs C#

     

    Machine Learning

    Popular Libraries

    These are examples of using some of the most common machine learning libraries in an algorithm. Click one to learn more.

     

    Popular Libraries

    Aesera

    Introduction

    This page explains how to build, train, deploy and store Aesera models.

    Import Libraries

    Import the aesera and sklearn libraries.

    from AlgorithmImports import *
    import aesara
    import aesara.tensor as at
    from sklearn.model_selection import train_test_split
    from sklearn.preprocessing import MinMaxScaler
    import joblib

    You need the joblib library to store models.

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the sklearn model and make predictions.

    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

    Build Models

    In this example, build a logistic regression prediction model that uses the following features and labels:

    Data Category Description
    Features Normalized daily close price of the SPY over the last 5 days
    Labels Return direction of the SPY over the next day

    The following image shows the time difference between the features and labels:

    Features and labels for training

    Follow the below steps to build the model:

    1. Initialize variables.
    2. # Declare Aesara symbolic variables
      x = at.dmatrix("x")
      y = at.dvector("y")
      
      # initialize the weight vector w randomly using share so model coefficients keep their values
      # between training iterations (updates)
      rng = np.random.default_rng(100)
      w = aesara.shared(rng.standard_normal(5), name="w")
      
      # initialize the bias term
      b = aesara.shared(0., name="b")
    3. Construct the model graph.
    4. # Construct Aesara expression graph
      p_1 = 1 / (1 + at.exp(-at.dot(x, w) - b))       # Logistic transformation
      prediction = p_1 > 0.5                          # The prediction thresholded
      xent = y * at.log(p_1) - (1 - y) * at.log(1 - p_1)  # Cross-entropy log-loss function
      cost = xent.mean() + 0.01 * (w ** 2).sum()      # The cost to minimize (MSE)
      gw, gb = at.grad(cost, [w, b])                  # Compute the gradient of the cost
    5. Compile the model.
    6. self.train = aesara.function(
                inputs=[x, y],
                outputs=[prediction, xent],
                updates=((w, w - 0.1 * gw), (b, b - 0.1 * gb)))
      self.predict = aesara.function(inputs=[x], outputs=prediction)

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 252*2
    self.training_data = RollingWindow[TradeBar](training_length)
    history = self.history[TradeBar](self._symbol, training_length, Resolution.DAILY)
    for trade_bar in history:
        self.training_data.add(trade_bar)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_features_and_labels(self, n_steps=5):
        training_df = self.PandasConverter.GetDataFrame[TradeBar](list(self.training_data)[::-1])['close']
    
        features = []
        for i in range(1, n_steps + 1):
            close = training_df.shift(i)[n_steps:-1]
            close.name = f"close-{i}"
            features.append(close)
        features = pd.concat(features, axis=1)
        # Normalize using the 5 day interval
        features = MinMaxScaler().fit_transform(features.T).T[4:]
        
        Y = training_df.pct_change().shift(-1)[n_steps*2-1:-1].reset_index(drop=True)
        labels = np.array([1 if y > 0 else 0 for y in Y])   # binary class
    
        return features, labels
    
    def my_training_method(self):
        features, labels = self.get_features_and_labels()
        D = (features, labels)
        self.train(D[0], D[1])

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, call the Train train method as a Scheduled Event .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current TradeBar to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        if self._symbol in slice.bars:
            self.training_data.add(slice.bars[self._symbol])

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and then call the predict method.

    features, _ = self.get_features_and_labels()
    prediction = self.predict(features[-1].reshape(1, -1))
    prediction = float(prediction)

    You can use the label prediction to place orders.

    if prediction == 1:
        self.set_holdings(self._symbol, 1)
    elif prediction == 0:            
        self.set_holdings(self._symbol, -1)

    Save Models

    Follow these steps to save sklearn models into the Object Store :

    1. Set the key name you want to store the model under in the Object Store.
    2. model_key = "model"
    3. Call the GetFilePath get_file_path method with the key.
    4. file_name = self.object_store.get_file_path(model_key)

      This method returns the file path where the model will be stored.

    5. Call the dump method the file path.
    6. joblib.dump(self.predict, file_name)

      If you dump the model using the joblib module before you save the model, you don't need to retrain the model.

    Load Models

    You can load and trade with pre-trained sklearn models that you saved in the Object Store. To load a sklearn model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then call the load method.

    def initialize(self) -> None:
        if self.object_store.contains_key(model_key):
            file_name = self.object_store.get_file_path(model_key)
            self.model = joblib.load(file_name)

    The ContainsKey contains_key method returns a boolean that represents if the model_key is in the Object Store. If the Object Store does not contain the model_key , save the model using the model_key before you proceed.

    Clone Example Algorithm

     

    Popular Libraries

    GPlearn

    Introduction

    This page explains how to build, train, deploy and store GPlearn models.

    Import Libraries

    Import the gplearn and joblib libraries.

    from AlgorithmImports import *
    from gplearn.genetic import SymbolicRegressor, SymbolicTransformer
    import joblib

    You need the joblib library to store models.

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the GPLearn model and make predictions.

    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

    Build Models

    In this example, build a genetic programming feature transformation model and a genetic programming regression prediction model using the following features and labels:

    Data Category Description
    Features Daily percent change of the close price of the SPY over the last 5 days
    Labels Daily percent return of the SPY over the next day

    The following image shows the time difference between the features and labels:

    Features and labels for training

    Follow these steps to create a method to build the model:

    1. Declare a set of functions to use for feature engineering.
    2. function_set = ['add', 'sub', 'mul', 'div',
                      'sqrt', 'log', 'abs', 'neg', 'inv',
                      'max', 'min']
    3. Call the SymbolicTransformer constructor with the preceding set of functions and then save it as a class variable.
    4. self.gp_transformer = SymbolicTransformer(function_set=function_set)
    5. Call the SymbolicRegressor constructor to instantiate the regression model.
    6. self.model = SymbolicRegressor()

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 252*2
    self.training_data = RollingWindow[float](training_length)
    history = self.history[TradeBar](self._symbol, training_length, Resolution.DAILY)
    for trade_bar in history:
        self.training_data.add(trade_bar.close)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_features_and_labels(self, n_steps=5):
        training_df = list(self.training_data)[::-1]
        daily_pct_change = ((np.roll(training_df, -1) - training_df) / training_df)[:-1]
    
        features = []
        labels = []
        for i in range(len(daily_pct_change)-n_steps):
            features.append(daily_pct_change[i:i+n_steps])
            labels.append(daily_pct_change[i+n_steps])
        features = np.array(features)
        labels = np.array(labels)
    
        return features, labels
    
    def my_training_method(self):
        features, labels = self.get_features_and_labels()
    
        # Feature engineering
        self.gp_transformer.fit(features, labels)
        gp_features = self.gp_transformer.transform(features)
        new_features = np.hstack((features, gp_features))
    
        # Fit the regression model with transformed and raw features.
        self.model.fit(new_features, labels)

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, call the Train train method as a Scheduled Event .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current close price to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        if self._symbol in slice.bars:
            self.training_data.add(slice.bars[self._symbol].close)

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and then call the predict method.

    features, _ = self.get_features_and_labels()
    
    # Get transformed features
    gp_features = self.gp_transformer.transform(features)
    new_features = np.hstack((features, gp_features))
    
    # Get next prediction
    prediction = self.model.predict(new_features)
    prediction = float(prediction.flatten()[-1])

    You can use the label prediction to place orders.

    if prediction > 0:
        self.set_holdings(self._symbol, 1)
    elif prediction < 0:            
        self.set_holdings(self._symbol, -1)

    Save Models

    Follow these steps to save GPLearn models into the Object Store :

    1. Set the key names you want to store the models under in the Object Store.
    2. transformer_model_key = "transformer"
      regressor_model_key = "regressor"
    3. Call the GetFilePath get_file_path method with the keys.
    4. transformer_file_name = self.object_store.get_file_path(transformer_model_key)
      regressor_file_name = self.object_store.get_file_path(regressor_model_key)

      This method returns the file paths where the models will be stored.

    5. Call the dump method the file paths.
    6. joblib.dump(self.gp_transformer, transformer_file_name)
      joblib.dump(self.model, regressor_file_name)

      If you dump the models using the joblib module before you save the models, you don't need to retrain the models.

    Load Models

    You can load and trade with pre-trained GPLearn models that you saved in the Object Store. To load a GPLearn model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then call the load method.

    def initialize(self) -> None:
        if self.object_store.contains_key(transformer_model_key) and self.object_store.contains_key(regressor_model_key):
            transformer_file_name = self.object_store.get_file_path(transformer_model_key)
            regressor_file_name = self.object_store.get_file_path(regressor_model_key)
            self.gp_transformer = joblib.load(transformer_file_name)
            self.model = joblib.load(regressor_file_name)

    The ContainsKey contains_key method returns a boolean that represents if transformer_model_key and regressor_model_key are in the Object Store. If the Object Store does not contain the keys, save the model using them before you proceed.

    Clone Example Algorithm

     

    Popular Libraries

    Hmmlearn

    Introduction

    This page explains how to build, train, deploy and store Hmmlearn models.

    Import Libraries

    Import the hmmlearn and joblib libraries.

    from AlgorithmImports import *
    from hmmlearn import hmm
    import joblib

    You need the joblib library to store models.

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the hmmlearn model and make predictions.

    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

    Build Models

    In this example, assume the market has only 2 regimes and the market returns follow a Gaussian distribution. Therefore, create a 2-component Hidden Markov Model with Gaussian emissions, which is equivalent to a Gaussian mixture model with 2 means.

    To build the model, call the GaussianHMM constructor with the number of components, a covariance type, and the number of iterations:

    self.model = hmm.GaussianHMM(n_components=2, covariance_type="full", n_iter=100)

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 252*2
    self.training_data = RollingWindow[float](training_length)
    history = self.history[TradeBar](self._symbol, training_length, Resolution.DAILY)
    for trade_bar in history:
        self.training_data.add(trade_bar.close)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_features(self):
        training_df = np.array(list(self.training_data)[::-1])
        daily_pct_change = (np.roll(training_df, 1) - training_df) / training_df
    
        return daily_pct_change[1:].reshape(-1, 1)
    
    def my_training_method(self):
        features = self.get_features()
        self.model.fit(features)

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, call the Train train method as a Scheduled Event .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current close price to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        if self._symbol in slice.bars:
            self.training_data.add(slice.bars[self._symbol].close)

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and then call the predict method.

    new_feature = self.get_features()
    prediction = self.model.predict(new_feature)
    prediction = float(prediction[-1])

    You can use the label prediction to place orders.

    if prediction == 1:
        self.set_holdings(self._symbol, 1)
    else:            
        self.liquidate(self._symbol)

    Save Models

    Follow these steps to save hmmlearn models into the Object Store :

    1. Set the key name you want to store the model under in the Object Store.
    2. model_key = "model.hmm"
    3. Call the GetFilePath get_file_path method with the key.
    4. file_name = self.object_store.get_file_path(model_key)

      This method returns the file path where the model will be stored.

    5. Call the dump method the file path.
    6. joblib.dump(self.model, file_name)

      If you dump the model using the joblib module before you save the model, you don't need to retrain the model.

    Load Models

    You can load and trade with pre-trained hmmlearn models that you saved in the Object Store. To load a hmmlearn model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then call the load method.

    def initialize(self) -> None:
        if self.object_store.contains_key(model_key):
            file_name = self.object_store.get_file_path(model_key)
            self.model = joblib.load(file_name)

    The ContainsKey contains_key method returns a boolean that represents if the model_key is in the Object Store. If the Object Store does not contain the model_key , save the model using the model_key before you proceed.

    Clone Example Algorithm

     

    Popular Libraries

    Keras

    Introduction

    This page explains how to build, train, deploy and store Keras models.

    Import Libraries

    Import the keras libraries.

    from AlgorithmImports import *
    from tensorflow.keras.models import Sequential, load_model
    from tensorflow.keras.layers import Dense, Flatten
    from tensorflow.keras.optimizers import Adam

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the keras model and make predictions.

    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

    Build Models

    In this example, build a neural-network regression model that uses the following features and labels:

    Data Category Description
    Features Daily percent change of the open, high, low, close, and volume of the SPY over the last 5 days
    Labels Daily percent return of the SPY over the next day

    The following image shows the time difference between the features and labels:

    Features and labels for training

    Follow the below steps to build the model:

    1. In the Initialize initialize method, create a Sequential object with several layers.
    2. self.model = Sequential([Dense(10, input_shape=(5,5), activation='relu'),
                               Dense(10, activation='relu'),
                               Flatten(),
                               Dense(1)])

      Set the input_shape of the first layer to (5, 5) because each sample contains the percent change of 5 factors (percent change of the open, high, low, close, and volume) over the previous 5 days. Call the Flatten constructor because the input is 2-dimensional but the output is just a single value.

    3. Call the compile method with a loss function, an optimizer, and a list of metrics to monitor.
    4. self.model.compile(loss='mse',
                         optimizer=Adam(),
                         metrics=['mae', 'mse'])

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 252*2
    self.training_data = RollingWindow[TradeBar](training_length)
    history = self.history[TradeBar](self._symbol, training_length, Resolution.DAILY)
    for trade_bar in history:
        self.training_data.add(trade_bar)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_features_and_labels(self, n_steps=5):
        training_df = self.pandas_converter.get_data_frame[TradeBar](list(self.training_data)[::-1])
        daily_pct_change = training_df.pct_change().dropna()
    
        features = []
        labels = []
        for i in range(len(daily_pct_change)-n_steps):
            features.append(daily_pct_change.iloc[i:i+n_steps].values)
            labels.append(daily_pct_change['close'].iloc[i+n_steps])
        features = np.array(features)
        labels = np.array(labels)
    
        return features, labels
    
    def my_training_method(self):
        features, labels = self.get_features_and_labels()
        self.model.fit(features, labels, epochs=5)

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, call the Train train method as a Scheduled Event .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current TradeBar to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        if self._symbol in slice.Bars:
            self.training_data.Add(slice.Bars[self._symbol])

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and then call the predict method.

    features, _ = self.get_features_and_labels()
    features = features[-1].reshape(1, 5, 5)
    prediction = float(self.model.predict(features)[-1])

    You can use the label prediction to place orders.

    if prediction > 0:
        self.SetHoldings(self._symbol, 1)
    elif prediction < 0:            
        self.SetHoldings(self._symbol, -1)

    Save Models

    Follow these steps to save keras models into the Object Store :

    1. Set the key name you want to store the model under in the Object Store.
    2. The key must end with a .keras extension for the native Keras format (recommended) or a .h5 extension.

      model_key = "model.keras"
    3. Call the GetFilePath get_file_path method with the key.
    4. file_name = self.object_store.get_file_path(model_key)

      This method returns the file path where the model will be stored.

    5. Call the save method with the file path.
    6. self.model.save(file_name)

    Load Models

    You can load and trade with pre-trained keras models that you saved in the Object Store. To load a keras model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then call the load_model method.

    def initialize(self) -> None:
        if self.object_store.contains_key(model_key):
            file_name = self.object_store.get_file_path(model_key)
            self.model = load_model(file_name)

    The ContainsKey contains_key method returns a boolean that represents if the model_key is in the Object Store. If the Object Store does not contain the model_key , save the model using the model_key before you proceed.

    Clone Example Algorithm

     

    Popular Libraries

    PyTorch

    Introduction

    This page explains how to build, train, deploy and store PyTorch models.

    Import Libraries

    Import the torch and joblib libraries.

    from AlgorithmImports import *
    import torch
    from torch import nn
    import joblib

    You need the joblib library to store models.

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the torch model and make predictions.

    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

    Build Models

    In this example, build a neural-network regression model that uses the following features and labels:

    Data Category Description
    Features The last 5 closing prices.
    Labels The following day's closing price

    The following image shows the time difference between the features and labels:

    Features and labels for training

    Follow these steps to create a method to build the model:

    1. Define a subclass of nn.Module to be the model.
    2. In this example, use the ReLU activation function for each layer.

      class NeuralNetwork(nn.Module):
          # Model Structure
          def __init__(self):
              super(NeuralNetwork, self).__init__()
              self.flatten = nn.Flatten()
              self.linear_relu_stack = nn.Sequential(
                  nn.Linear(5, 5),   # input size, output size of the layer
                  nn.ReLU(),         # Relu non-linear transformation
                  nn.Linear(5, 5),
                  nn.ReLU(),  
                  nn.Linear(5, 1),   # Output size = 1 for regression
              )
          
          # Feed-forward training/prediction
          def forward(self, x):
              x = torch.from_numpy(x).float()   # Convert to tensor in type float
              result = self.linear_relu_stack(x)
              return result
    3. Create an instance of the model and set its configuration to train on the GPU if it's available.
    4. device = 'cuda' if torch.cuda.is_available() else 'cpu'
      self.model = NeuralNetwork().to(device)

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 252*2
    self.training_data = RollingWindow[float](training_length)
    history = self.history[TradeBar](self._symbol, training_length, Resolution.DAILY)
    for trade_bar in history:
        self.training_data.add(trade_bar.close)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_features_and_labels(self, n_steps=5):
        close_prices = list(self.training_data)[::-1]
    
        features = []
        labels = []
        for i in range(len(close_prices)-n_steps):
            features.append(close_prices[i:i+n_steps])
            labels.append(close_prices[i+n_steps])
        features = np.array(features)
        labels = np.array(labels)
    
        return features, labels
    
    def my_training_method(self):
        features, labels = self.get_features_and_labels()
    
        # Set the loss and optimization functions
        # In this example, use the mean squared error as the loss function and stochastic gradient descent as the optimizer
        loss_fn = nn.MSELoss()
        learning_rate = 0.001
        optimizer = torch.optim.SGD(self.model.parameters(), lr=learning_rate)
        
        # Create a for-loop to train for preset number of epoch
        epochs = 5
        for t in range(epochs):
            # Create a for-loop to fit the model per batch
            for batch, (feature, label) in enumerate(zip(features, labels)):
                # Compute prediction and loss
                pred = self.model(feature)
                real = torch.from_numpy(np.array(label).flatten()).float()
                loss = loss_fn(pred, real)
            
                # Perform backpropagation
                optimizer.zero_grad()
                loss.backward()
                optimizer.step()

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, call the Train train method as a Scheduled Event .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current TradeBar to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        if self._symbol in slice.Bars:
            self.training_data.Add(slice.Bars[self._symbol].Close)

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and pass it to the model.

    features, __ = self.get_features_and_labels()
    prediction = self.model(features[-1].reshape(1, -1))
    prediction = float(prediction.detach().numpy()[-1])

    You can use the label prediction to place orders.

    if prediction > slice[self._symbol].Price:
        self.SetHoldings(self._symbol, 1)
    elif prediction < slice[self._symbol].Price:            
        self.SetHoldings(self._symbol, -1)

    Save Models

    Follow these steps to save PyTorch models into the Object Store :

    1. Set the key name of the model to be stored in the Object Store.
    2. model_key = "model"
    3. Call the GetFilePath get_file_path method with the key.
    4. file_name = self.object_store.get_file_path(model_key)

      This method returns the file path where the model will be stored.

    5. Call the dump method the file path.
    6. joblib.dump(self.model, file_name)

      If you dump the model using the joblib module before you save the model, you don't need to retrain the model.

    Load Models

    You can load and trade with pre-trained PyTorch models that you saved in the Object Store. To load a PyTorch model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then call the load method.

    def initialize(self) -> None:
        if self.object_store.contains_key(model_key):
            file_name = self.object_store.get_file_path(model_key)
            self.model = joblib.load(file_name)

    The ContainsKey contains_key method returns a boolean that represents if the model_key is in the Object Store. If the Object Store does not contain the model_key , save the model using the model_key before you proceed.

    Clone Example Algorithm

     

    Popular Libraries

    Scikit-Learn

    Introduction

    This page explains how to build, train, deploy and store Scikit-Learn models.

    Import Libraries

    Import the sklearn and joblib libraries.

    from AlgorithmImports import *
    from sklearn.svm import SVR
    from sklearn.model_selection import GridSearchCV
    import joblib

    You need the joblib library to store models.

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the sklearn model and make predictions.

    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

    Build Models

    In this example, build a support vector regression prediction model that uses the following features and labels:

    Data Category Description
    Features Daily percent change of the open, high, low, close, and volume of the SPY over the last 5 days
    Labels Daily percent return of the SPY over the next day

    The following image shows the time difference between the features and labels:

    Features and labels for training

    To build the model, call the GridSearchCV constructor with the SVR model, the parameter grid, a scoring method, the number of cross-validation folds:

    param_grid = {'C': [.05, .1, .5, 1, 5, 10], 
                'epsilon': [0.001, 0.005, 0.01, 0.05, 0.1], 
                'gamma': ['auto', 'scale']}
    self.model = GridSearchCV(SVR(), param_grid, scoring='neg_mean_squared_error', cv=5)

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 252*2
    self.training_data = RollingWindow[TradeBar](training_length)
    history = self.history[TradeBar](self._symbol, training_length, Resolution.DAILY)
    for trade_bar in history:
        self.training_data.add(trade_bar)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_features_and_labels(self, n_steps=5):
        training_df = self.pandas_converter.get_data_frame[TradeBar](list(self.training_data)[::-1])
        daily_pct_change = training_df.pct_change().dropna()
    
        features = []
        labels = []
        for i in range(len(daily_pct_change)-n_steps):
            features.append(daily_pct_change.iloc[i:i+n_steps].values.flatten())
            labels.append(daily_pct_change['close'].iloc[i+n_steps])
        features = np.array(features)
        labels = np.array(labels)
    
        return features, labels
    
    def my_training_method(self):
        features, labels = self.get_features_and_labels()
        self.model = self.model.fit(features, labels).best_estimator_

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, call the Train train method as a Scheduled Event .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current TradeBar to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        if self._symbol in slice.bars:
            self.training_data.add(slice.bars[self._symbol])

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and then call the predict method.

    features, _ = self.get_features_and_labels()
    prediction = self.model.predict(features[-1].reshape(1, -1))
    prediction = float(prediction)

    You can use the label prediction to place orders.

    if prediction > 0:
        self.SetHoldings(self._symbol, 1)
    elif prediction < 0:            
        self.SetHoldings(self._symbol, -1)

    Save Models

    Follow these steps to save sklearn models into the Object Store :

    1. Set the key name you want to store the model under in the Object Store.
    2. model_key = "model"
    3. Call the GetFilePath get_file_path method with the key.
    4. file_name = self.object_store.get_file_path(model_key)

      This method returns the file path where the model will be stored.

    5. Call the dump method the file path.
    6. joblib.dump(self.model, file_name)

      If you dump the model using the joblib module before you save the model, you don't need to retrain the model.

    Load Models

    You can load and trade with pre-trained sklearn models that you saved in the Object Store. To load a sklearn model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then call the load method.

    def initialize(self) -> None:
        if self.object_store.contains_key(model_key):
            file_name = self.object_store.get_file_path(model_key)
            self.model = joblib.load(file_name)

    The ContainsKey contains_key method returns a boolean that represents if the model_key is in the Object Store. If the Object Store does not contain the model_key , save the model using the model_key before you proceed.

    Clone Example Algorithm

     

    Popular Libraries

    Stable Baselines

    Introduction

    This page explains how to build, train, deploy and store stable baselines 3 models.

    Import Libraries

    Import the gym and stable_baselines3 libraries.

    from AlgorithmImports import *
    import gym
    from stable_baselines3 import DQN

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the stable_baselines model and make predictions.

    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

    Build Models

    In this example, create a gym environment to initialize the training environment, agent, and reward. Then, create a reinforcement learning model by a single-asset deep Q-network learning algorithm using the following observations and rewards:

    Data Category Description
    Observations The 5-day open, high, low, close, and volume (OHLCV) of the SPY
    Rewards Maximum portfolio return

    Follow these steps to create a method to build the model:

    1. Create a custom gym environment class.
    2. In this example, create a custom environment with the previous 5 OHLCV log-return data as observation and the highest portfolio value as reward.

      class TradingEnv(gym.Env):
          FLAT = 0
          LONG = 1
          SHORT = 2
      
          def __init__(self, ohlcv, ret):
              super(TradingEnv, self).__init__()
              
              self.ohlcv = ohlcv
              self.ret = ret
              self.trading_cost = 0.01
              self.reward = 1
              
              # The number of step the training has taken, starts at 5 since we're using the previous 5 data for observation.
              self.current_step = 5
              # The last action
              self.last_action = 0
      
              # Define action and observation space
              # Example when using discrete actions, we have 3: LONG, SHORT and FLAT.
              n_actions = 3
              self.action_space = gym.spaces.Discrete(n_actions)
              # The observation will be the coordinate of the agent, shape for (5 previous data poionts, OHLCV)
              self.observation_space = gym.spaces.Box(low=-2, high=2, shape=(5, 5, 5), dtype=np.float64)
      
          def reset(self):
              # Reset the number of step the training has taken
              self.current_step = 5
              # Reset the last action
              self.last_action = 0
              # must return np.array type
              return self.ohlcv[self.current_step-5:self.current_step].astype(np.float32)
      
          def step(self, action):
              if action == self.LONG:
                  self.reward *= 1 + self.ret[self.current_step] - (self.trading_cost if self.last_action != action else 0)
              elif action == self.SHORT:
                  self.reward *= 1 + -1 * self.ret[self.current_step] - (self.trading_cost if self.last_action != action else 0)
              elif action == self.FLAT:
                      self.reward *= 1 - (self.trading_cost if self.last_action != action else 0)
              else:
                  raise ValueError("Received invalid action={} which is not part of the action space".format(action))
                  
              self.last_action = action
              self.current_step += 1
      
              # Have we iterate all data points?
              done = (self.current_step == self.ret.shape[0]-1)
      
              # Reward as return
              return self.ohlcv[self.current_step-5:self.current_step].astype(np.float32), self.reward, done, {}
    3. Get the processed training data.
    4. obs, rewards = self.get_observations_and_rewards()
    5. Initialize the environment with the observations and results.
    6. self.env = TradingEnv(obs, rewards)
    7. Call the DQN constructor with the learning policy and the gym environment.
    8. self.model = DQN(MlpPolicy, env)

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 252*2
    self.training_data = RollingWindow[TradeBar](training_length)
    history = self.history[TradeBar](self.spy, training_length, Resolution.DAILY)
    for trade_bar in history:
        self.training_data.add(trade_bar)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_observations_and_rewards(self, n_step=5):
        training_df = self.pandas_converter.get_data_frame[TradeBar](list(self.training_data)[::-1])
        daily_pct_change = training_df['close'].pct_change().dropna()
    
        obs = []
        rewards = []
        for i in range(len(daily_pct_change)-n_step):
            obs.append(training_df.iloc[i:i+n_step].values)
            rewards.append(float(daily_pct_change.iloc[i+n_step]))
        obs = np.array(obs)
        rewards = np.array(rewards)
    
        return obs, rewards
    
    def my_training_method(self):
        obs, rewards = self.get_observations_and_rewards()
        self.env = TradingEnv(obs, rewards)
        self.model = DQN("MlpPolicy", self.env)
        self.model.learn(total_timesteps=500)

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, call the Train train method as a Scheduled Event .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current TradeBar to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        if self._symbol in slice.Bars:
            self.training_data.Add(slice.Bars[self._symbol])

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and then call the predict method.

    features, _ = self.get_observations_and_rewards()
    action, _ = self.model.predict(features[-5:], deterministic=True)
    _, _, _, _ = self.env.step(action)

    You can use the label prediction to place orders.

    if action == 0:
        self.liquidate(self.spy)
    elif action == 1:
        self.set_holdings(self.spy, 1)
    elif action == 2:
        self.set_holdings(self.spy, -1)

    Save Models

    Follow these steps to save stable_baselines models into the Object Store :

    1. Set the key name of the model to be stored in the Object Store.
    2. model_key = "model"
    3. Call the GetFilePath get_file_path method with the key.
    4. file_name = self.object_store.get_file_path(model_key)

      This method returns the file path where the model will be stored.

    5. Call the save method the file path.
    6. self.model.save(file_name)

    Load Models

    You can load and trade with pre-trained keras models that you saved in the Object Store. To load a keras model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then call the load_model method.

    def initialize(self) -> None:
        if self.object_store.contains_key(model_key):
            file_name = self.object_store.get_file_path(model_key)
            self.model = DQN.load(file_name, env=env)

    The ContainsKey contains_key method returns a boolean that represents if the model_key is in the Object Store. If the Object Store doesn't contain the model_key , save the model using the model_key before you proceed.

    Clone Example Algorithm

     

    Popular Libraries

    Tensorflow

    Introduction

    This page explains how to build, train, deploy and store Tensorflow models.

    Import Libraries

    Import the tensorflow library.

    from AlgorithmImports import *
    import tensorflow as tf

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the tensorflow model and make predictions.

    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

    Build Models

    In this example, build a neural-network regression prediction model that uses the following features and labels:

    Data Category Description
    Features The last 5 close price differencing compared to current price
    Labels The following day's price change

    The following image shows the time difference between the features and labels:

    Features and labels for training

    Follow these steps to create a method to build the model:

    1. Define some parameters, including the number of factors, neurons, and epochs.
    2. num_factors = 5
      num_neurons_1 = 10
      num_neurons_2 = 10
      num_neurons_3 = 5
      self.epochs = 20
      self.learning_rate = 0.0001
    3. Create the model using built-in Keras API.
    4. self.model = tf.keras.sequential([
          tf.keras.layers.dense(num_neurons_1, activation=tf.nn.relu, input_shape=(num_factors,)),  # input shape required
          tf.keras.layers.dense(num_neurons_2, activation=tf.nn.relu),
          tf.keras.layers.dense(num_neurons_3, activation=tf.nn.relu),
          tf.keras.layers.dense(1)
      ])

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 300
    self.training_data = RollingWindow[float](training_length)
    history = self.history[TradeBar](self._symbol, training_length, Resolution.DAILY)
    for trade_bar in history:
        self.training_data.add(trade_bar.close)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_features_and_labels(self, lookback=5):
        lookback_series = []
    
        data = pd.Series(list(self.training_data)[::-1])
        for i in range(1, lookback + 1):
            df = data.diff(i)[lookback:-1]
            df.name = f"close-{i}"
            lookback_series.append(df)
    
        X = pd.concat(lookback_series, axis=1).reset_index(drop=True).dropna()
        Y = data.diff(-1)[lookback:-1].reset_index(drop=True)
        return X.values, Y.values
    
    def my_training_method(self):
        features, labels = self.get_features_and_labels()
    
        # Define the loss function, we use MSE in this example
        def loss_mse(target_y, predicted_y):
            return tf.reduce_mean(tf.square(target_y - predicted_y))
    
        # Train the model
        optimizer = tf.keras.optimizers.adam(learning_rate=self.learning_rate)
        for i in range(self.epochs):
            with tf.gradient_tape() as t:
                loss = loss_mse(labels, self.model(features))
    
            jac = t.gradient(loss, self.model.trainable_weights)
            optimizer.apply_gradients(zip(jac, self.model.trainable_weights))

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, schedule some training sessions .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current close price to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        if self._symbol in slice.bars:
            self.training_data.add(slice.bars[self._symbol].close)

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and then call the run method with new features.

    new_features, __ = self.get_features_and_labels()
    prediction = self.model(new_features)
    prediction = float(prediction.numpy()[-1])

    You can use the label prediction to place orders.

    if prediction > 0:
        self.SetHoldings(self._symbol, 1)
    elif prediction < 0:
        self.SetHoldings(self._symbol, -1)

    Save Models

    Follow these steps to save Tensorflow models into the Object Store :

    1. Set the key name of the model to be stored in the Object Store.
    2. model_key = "model.keras"

      Note that the model has to have the suffix .keras .

    3. Call the GetFilePath get_file_path method with the key.
    4. file_name = self.object_store.get_file_path(model_key)

      This method returns the file path where the model will be stored.

    5. Call the save method with the model and file path.
    6. model.save(file_name)
    7. Save the model to the file path.
    8. self.object_store.save(model_key)

    Load Models

    You can load and trade with pre-trained tensorflow models that you saved in the Object Store. To load a tensorflow model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then recall the graph and weights of the model.

    def initialize(self) -> None:
        model_key = 'model.keras'
        if self.object_store.contains_key(model_key):
            file_name = self.object_store.get_file_path(model_key)
            self.model = tf.keras.models.load_model(file_name)

    The ContainsKey contains_key method returns a boolean that represents if the model.keras is in the Object Store. If the Object Store doesn't contain the keys, save the model using them before you proceed.

    Clone Example Algorithm

     

    Popular Libraries

    Tslearn

    Introduction

    This page explains how to build, train, deploy and store Tslearn models.

    Import Libraries

    Import the tslearn libraries.

    from AlgorithmImports import *
    from tslearn.barycenters import softdtw_barycenter
    from tslearn.clustering import TimeSeriesKMeans

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the tslearn model.

    tickers = ["SPY", "QQQ", "DIA", 
               "AAPL", "MSFT", "TSLA", 
               "IEF", "TLT", "SHV", "SHY", 
               "GLD", "IAU", "SLV", 
               "USO", "XLE", "XOM"]
    symbols = [self.add_equity(ticker, Resolution.DAILY).symbol for ticker in tickers]

    Build Models

    In this example, train a model that clusters the universe of Equities into distinct groups and then allocate an equal portion of the portfolio to each cluster. To cluster the securities, instead of using a real-time comparison, apply Dynamic Time Wrapping Barycenter Averaging (DBA) to their historical prices and then run a k-means clustering algorithm. DBA is a technique of averaging a few time-series into a single one without losing much of their information. Since not all time-series move efficiently like in ideal EMH assumption, this technique allows similarity analysis of different time-series with sticky lags. The following image shows a visualization of the process. For more information about the technical details, see Dynamic Time Warping in the tslearn documentation .

    Dynamic time wraping barycenter averaging visualization

    To perform DBA and then cluster the securities by k-means, create a TimeSeriesKMeans model:

    self.model = TimeSeriesKMeans(n_clusters=6,   # We have 6 main groups
                        metric="dtw")

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 252
    self.training_data = {}
    history = self.history(self.symbols, training_length, Resolution.DAILY).unstack(0).close
    for symbol in self.symbols:
        self.training_data[symbol] = RollingWindow[float](training_length)
        for close_price in history[symbol]:
            self.training_data[symbol].add(close_price)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_features(self):
        close_price = pd.DataFrame({symbol: list(data)[::-1] for symbol, data in self.training_data.items()})
        log_price = np.log(close_price)
        log_normal_price = (log_price - log_price.mean()) / log_price.std()
    
        return log_normal_price
    
    def my_training_method(self):
        features = self.get_features()
        self.model.fit(features.T.values)

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, call the Train train method as a Scheduled Event .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current TradeBar to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        for kvp in slice.bars:
            self.training_data[kvp.key].add(kvp.value.CLOSE)

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and then call the predict method.

    features = self.get_features()
    self.labels = self.model.predict(features.T.values)

    You can use the label prediction to place orders.

    for i in set(self.labels):
        assets_in_cluster = features.columns[[n for n, k in enumerate(self.labels) if k == i]]
        size = 1/6/len(assets_in_cluster)
        self.set_holdings([PortfolioTarget(symbol, size) for symbol in assets_in_cluster])

    Save Models

    Follow these steps to save tslearn models into the Object Store :

    1. Set the key name of the model to be stored in the Object Store.
    2. model_key = "model.hdf5"
    3. Call the GetFilePath get_file_path method with the key.
    4. file_name = self.object_store.get_file_path(model_key)

      This method returns the file path where the model will be stored.

    5. Delete the current file to avoid a FileExistsError error when you save the model.
    6. import os
      os.remove(file_name)
    7. Call the to_hdf5 method with the file path.
    8. self.model.to_hdf5(file_name)

    Load Models

    You can load and trade with pre-trained tslearn models that saved in Object Store. To load a tslearn model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then call the from_hdf5 method.

    def initialize(self) -> None:
        if self.object_store.contains_key(model_key):
            file_name = self.object_store.get_file_path(model_key)
            self.model = TimeSeriesKMeans.from_hdf5(file_name + ".hdf5")

    The ContainsKey contains_key method returns a boolean that represents if the model_key is in the Object Store. If the Object Store does not contain the model_key , save the model using the model_key before you proceed.

    Clone Example Algorithm

     

    Popular Libraries

    XGBoost

    Introduction

    This page explains how to build, train, deploy and store XGBoost models.

    Import Libraries

    Import the XGBoost and joblib libraries.

    from AlgorithmImports import *
    import xgboost as xgb
    import joblib

    You need the joblib library to store models.

    Create Subscriptions

    In the Initialize initialize method, subscribe to some data so you can train the xgboost model and make predictions.

    self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol

    Build Models

    In this example, build a gradient boost tree regression prediction model that uses the following features and labels:

    Data Category Description
    Features The last 5 closing prices
    Labels The following day's closing price

    The following image shows the time difference between the features and labels:

    Features and labels for training

    Train Models

    You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.

    Warm Up Training Data

    You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize initialize method, make a history request .

    training_length = 252*2
    self.training_data = RollingWindow[float](training_length)
    history = self.history[TradeBar](self._symbol, training_length, Resolution.DAILY)
    for trade_bar in history:
        self.training_data.add(trade_bar.close)

    Define a Training Method

    To train the model, define a method that fits the model with the training data.

    def get_features_and_labels(self, n_steps=5):
        close_prices = np.array(list(self.training_data)[::-1])
        df = (np.roll(close_prices, -1) - close_prices) * 0.5 + close_prices * 0.5
        df = df[:-1]
    
        features = []
        labels = []
        for i in range(len(df)-n_steps):
            features.append(df[i:i+n_steps])
            labels.append(df[i+n_steps])
    
        features = np.array(features)
        labels = np.array(labels)
        features = (features - features.mean()) / features.std()
        labels = (labels - labels.mean()) / labels.std()
    
        d_matrix = xgb.DMatrix(features, label=labels)
    
        return d_matrix
    
    def my_training_method(self):
        d_matrix = self.get_features_and_labels()
        params = {
            'booster': 'gbtree',
            'colsample_bynode': 0.8,
            'learning_rate': 0.1,
            'lambda': 0.1,
            'max_depth': 5,
            'num_parallel_tree': 100,
            'objective': 'reg:squarederror',
            'subsample': 0.8,
          }
        self.model = xgb.train(params, d_matrix, num_boost_round=10)

    Set Training Schedule

    To train the model at the beginning of your algorithm, in the Initialize initialize method, call the Train train method.

    self.train(self.my_training_method)

    To periodically re-train the model as your algorithm executes, in the Initialize initialize method, call the Train train method as a Scheduled Event .

    # Train the model every Sunday at 8:00 AM
    self.train(self.date_rules.every(DayOfWeek.SUNDAY), self.time_rules.at(8, 0), self.my_training_method)

    Update Training Data

    To update the training data as the algorithm executes, in the OnData on_data method, add the current TradeBar to the RollingWindow that holds the training data.

    def on_data(self, slice: Slice) -> None:
        if self._symbol in slice.bars:
            self.training_data.add(slice.bars[self._symbol].close)

    Predict Labels

    To predict the labels of new data, in the OnData on_data method, get the most recent set of features and then call the predict method.

    new_d_matrix = self.get_features_and_labels(df)
    prediction = self.model.predict(new_d_matrix)
    prediction = prediction.flatten()

    You can use the label prediction to place orders.

    if float(prediction[-1]) > float(prediction[-2]):
        self.SetHoldings(self._symbol, 1)
    else:            
        self.SetHoldings(self._symbol, -1)

    Save Models

    Follow these steps to save xgboost models into the Object Store :

    1. Set the key name of the model to be stored in the Object Store.
    2. model_key = "model"
    3. Call the GetFilePath get_file_path method with the key.
    4. file_name = self.object_store.get_file_path(model_key)

      This method returns the file path where the model will be stored.

    5. Call the dump method the file path.
    6. joblib.dump(self.model, file_name)

      If you dump the model using the joblib module before you save the model, you don't need to retrain the model.

    Load Models

    You can load and trade with pre-trained xgboost models that saved in Object Store. To load a xgboost model from the Object Store, in the Initialize initialize method, get the file path to the saved model and then call the load method.

    def initialize(self) -> None:
        if self.object_store.contains_key(model_key):
            file_name = self.object_store.get_file_path(model_key)
            self.model = joblib.load(file_name)

    The ContainsKey contains_key method returns a boolean that represents if the model_key is in the Object Store. If the Object Store does not contain the model_key , save the model using the model_key before you proceed.

    Clone Example Algorithm

     

    Machine Learning

    Hugging Face

    Hugging Face

    Key Concepts

    Introduction

    Hugging Face is a leading company in natural language processing (NLP), providing powerful tools and pre-trained models that can significantly enhance your trading algorithms on QuantConnect. By integrating Hugging Face's models, you can easily leverage advanced NLP capabilities for tasks such as sentiment analysis, news classification, and market forecasting without defining and training the model yourself. Hugging Face provides an easy way to leverage the research of community members to increase the sophistication of your trading algorithms.

    Supported Models

    Hundreds of thousands of Hugging Face models are publicly available and ready to use. To view all of them, see the Model Hub on the Hugging Face website. The Model card tab of each model repository explains an overview of how the model works, its requirements, and a quick start guide.

    QuantConnect Cloud caches some of the most popular models to speed up your development workflow. The following table shows the cached models:

    Name Documentation
    ahmedrachid/FinancialBERT-Sentiment-Analysis
    amazon/chronos-t5-base
    amazon/chronos-t5-large
    amazon/chronos-t5-small
    amazon/chronos-t5-tiny
    autogluon/chronos-t5-base
    autogluon/chronos-t5-large
    autogluon/chronos-t5-tiny
    bardsai/finance-sentiment-fr-base
    cardiffnlp/twitter-roberta-base-sentiment-latest
    distilbert/distilbert-base-uncased
    FacebookAI/roberta-base
    google-bert/bert-base-uncased
    google/gemma-7b
    microsoft/deberta-base
    mrm8488/distilroberta-finetuned-financial-news-sentiment-analysis
    nickmuchi/deberta-v3-base-finetuned-finance-text-classification
    nickmuchi/distilroberta-finetuned-financial-text-classification
    nickmuchi/sec-bert-finetuned-finance-classification
    openai-community/gpt2
    ProsusAI/finbert
    Salesforce/moirai-1.0-R-base
    Salesforce/moirai-1.0-R-large
    Salesforce/moirai-1.0-R-small
    StephanAkkerman/FinTwitBERT-sentiment
    yiyanghkust/finbert-tone

    To see the commit hash of the cached models, run the following algorithm in QC Cloud and then view the logs :

    from huggingface_hub import scan_cache_dir
    
    class HuggingFaceModelHashAlgorithm(QCAlgorithm):
    
        def initialize(self):
            cache_info = scan_cache_dir()
            cached_models_log = ''
            for entry in cache_info.repos:
                revisions = [revision.commit_hash for revision in entry.revisions]
                cached_models_log += f'\nRepo: {entry.repo_id}. Revisions {str(revisions)}'
            self.quit(cached_models_log)

    Train Models

    Hugging Face models are pre-trained, so you can quickly load them into your algorithms and use their output to inform your trading decisions. To customize the model for your specific use case, you can fine-tune the pre-trained model with your own training data.

    Examples

    The following example algorithm demonstrates how to load a Hugging Face model into a trading algorithm, fine-tune it, and use its output to inform trading decisions:

     

    Hugging Face

    Popular Models

    Popular Models

    Chronos-T5

    Introduction

    This page explains how to use Chronos-T5 in LEAN trading algorithms. The model repository provides the following description:

    Chronos is a family of pretrained time series forecasting models based on language model architectures. A time series is transformed into a sequence of tokens via scaling and quantization, and a language model is trained on these tokens using the cross-entropy loss. Once trained, probabilistic forecasts are obtained by sampling multiple future trajectories given the historical context. Chronos models have been trained on a large corpus of publicly available time series data, as well as synthetic data generated using Gaussian processes.

    For details on Chronos models, training data and procedures, and experimental results, please refer to the paper Chronos: Learning the Language of Time Series .

    Use Cases

    The Chronos-T5 model is a time series forecasting model. The following use cases explain how you might utilize it in trading algorithms:

    1. Forecast the future equity curves for a set of assets, then pass them to an optimizer to determine the weights that maximize the future Sharpe ratio of the portfolio.
    2. Forecast the future volatility of an asset to manage risk and opimize portfolio allocations.
    3. Train the model to forecast the impact of specific events on an asset and then adjust your holdings in response to the event. For example, you could train the model to forecast the impact of news , corporate actions , or financial reports .

    Load Pre-Trained Model

    Follow these steps to load the pre-trained Chronos-T5 model:

    1. Add the following imports to the top of your code file:
    2. from chronos import ChronosPipeline
      import torch
    3. Call the ChronosPipeline.from_pretrained method with the model path.
    4. In QuantConnect Cloud, the path to the tiny model is amazon / chronos-t5-tiny .

      self._pipeline = ChronosPipeline.from_pretrained(
          "amazon/chronos-t5-tiny",
          device_map="cuda" if torch.cuda.is_available() else "cpu",
          torch_dtype=torch.bfloat16,
      )
    5. (Optional) Set the seed to enable reproducibility.
    6. from transformers import set_seed
      set_seed(1, True)

    Fine-Tune Model

    The Chronos-T5 model is pre-trained, so you don't need to fine-tune it. Fine-tuning the model just tailors it to your specific use case. Follow these steps to fine-tune it:

    1. Add the following imports to the top of your code file:
    2. import torch
      from ast import literal_eval
      from pathlib import Path
      from functools import partial
      from transformers import Trainer, TrainingArguments, set_seed 
      from gluonts.dataset.pandas import PandasDataset
      from gluonts.itertools import Filter
      from chronos import ChronosConfig, ChronosPipeline
      from chronos.scripts.training.train import ChronosDataset, has_enough_observations, load_model
      from chronos.scripts.training import train
      from logging import getLogger, INFO
    3. In the initialize method, define the model and some of its settings.
    4. In QuantConnect Cloud, the path to the tiny model is amazon/chronos-t5-tiny .

      self._prediction_length = 3*21  # Three months of trading days   
      self._device_map = "cuda" if torch.cuda.is_available() else "cpu"
      self._optimizer = 'adamw_torch_fused' if torch.cuda.is_available() else 'adamw_torch'
      self._model_name = "amazon/chronos-t5-tiny"
      self._model_path = self.object_store.get_file_path(
          f"llm/fine-tune/{self._model_name.replace('/', '-')}/"
      )
    5. Define the fine-tuning method.
    6. def _train_chronos(
              self, training_data,
              probability: Optional[str] = None,
              context_length: int = 512,
              prediction_length: int = 64,
              min_past: int = 64,
              max_steps: int = 200_000,
              save_steps: int = 50_000,
              log_steps: int = 500,
              per_device_train_batch_size: int = 32,
              learning_rate: float = 1e-3,
              optim: str = "adamw_torch_fused",
              shuffle_buffer_length: int = 100,
              gradient_accumulation_steps: int = 2,
              model_id: str = "google/t5-efficient-tiny",
              model_type: str = "seq2seq",
              random_init: bool = False,
              tie_embeddings: bool = False,
              output_dir: str = "./output/",
              tf32: bool = True,
              torch_compile: bool = True,
              tokenizer_class: str = "MeanScaleUniformBins",
              tokenizer_kwargs: str = "{'low_limit': -15.0, 'high_limit': 15.0}",
              n_tokens: int = 4096,
              n_special_tokens: int = 2,
              pad_token_id: int = 0,
              eos_token_id: int = 1,
              use_eos_token: bool = True,
              lr_scheduler_type: str = "linear",
              warmup_ratio: float = 0.0,
              dataloader_num_workers: int = 1,
              max_missing_prop: float = 0.9,
              num_samples: int = 20,
              temperature: float = 1.0,
              top_k: int = 50,
              top_p: float = 1.0):
      
          # Set up logging for the train object.
          train.logger = getLogger()
          train.logger.setLevel(INFO)
          # Ensure output_dir is a Path object.
          output_dir = Path(output_dir)
          # Convert probability from string to a list, or set default if 
          # None.
          if isinstance(probability, str):
              probability = literal_eval(probability)
          elif probability is None:
              probability = [1.0 / len(training_data)] * len(training_data)
          # Convert tokenizer_kwargs from string to a dictionary.
          if isinstance(tokenizer_kwargs, str):
              tokenizer_kwargs = literal_eval(tokenizer_kwargs)
          # Enable reproducibility.
          set_seed(1, True)
          # Create datasets for training, filtered by criteria.
          train_datasets = [
              Filter(
                  partial(
                      has_enough_observations,
                      min_length=min_past + prediction_length,
                      max_missing_prop=max_missing_prop,
                  ),
                  PandasDataset(data_frame, freq="D"),
              )
              for data_frame in training_data
          ]
          # Load the model with the specified configuration.
          model = load_model(
              model_id=model_id,
              model_type=model_type,
              vocab_size=n_tokens,
              random_init=random_init,
              tie_embeddings=tie_embeddings,
              pad_token_id=pad_token_id,
              eos_token_id=eos_token_id,
          )
          # Define the configuration for the Chronos 
          # tokenizer and other settings.
          chronos_config = ChronosConfig(
              tokenizer_class=tokenizer_class,
              tokenizer_kwargs=tokenizer_kwargs,
              n_tokens=n_tokens,
              n_special_tokens=n_special_tokens,
              pad_token_id=pad_token_id,
              eos_token_id=eos_token_id,
              use_eos_token=use_eos_token,
              model_type=model_type,
              context_length=context_length,
              prediction_length=prediction_length,
              num_samples=num_samples,
              temperature=temperature,
              top_k=top_k,
              top_p=top_p,
          )
      
          # Add extra items to model config so that 
          # it's saved in the ckpt.
          model.config.chronos_config = chronos_config.__dict__
          # Create a shuffled training dataset with the 
          # specified parameters.
          shuffled_train_dataset = ChronosDataset(
              datasets=train_datasets,
              probabilities=probability,
              tokenizer=chronos_config.create_tokenizer(),
              context_length=context_length,
              prediction_length=prediction_length,
              min_past=min_past,
              mode="training",
          ).shuffle(shuffle_buffer_length=shuffle_buffer_length)
      
          # Define the training arguments.
          training_args = TrainingArguments(
              output_dir=str(output_dir),
              per_device_train_batch_size=per_device_train_batch_size,
              learning_rate=learning_rate,
              lr_scheduler_type=lr_scheduler_type,
              warmup_ratio=warmup_ratio,
              optim=optim,
              logging_dir=str(output_dir / "train-logs"),
              logging_strategy="steps",
              logging_steps=log_steps,
              save_strategy="steps",
              save_steps=save_steps,
              report_to=["tensorboard"],
              max_steps=max_steps,
              gradient_accumulation_steps=gradient_accumulation_steps,
              dataloader_num_workers=dataloader_num_workers,
              tf32=tf32,  # remove this if not using Ampere GPUs (e.g., A100)
              torch_compile=torch_compile,
              ddp_find_unused_parameters=False,
              remove_unused_columns=False,
          )
      
          # Create a Trainer instance for training the model.
          trainer = Trainer(
              model=model,
              args=training_args,
              train_dataset=shuffled_train_dataset,
          )
          # Start the training process.
          trainer.train()
          # Save the trained model to the output directory.
          model.save_pretrained(output_dir)
          # Return the path to the output directory.
          return output_dir
      
    7. Create DataFrame(s) that contain your training samples.
    8. Each DataFrame should have one column, named "target". The rows throughout the DataFrame should span a consistent time. If there is no data for the time step (for example, the weekend price of an Equity asset), put NaN as the value for the time step. The following example demonstrates how to create DataFrames that contain one year of trailing prices for a set of Equities:

      # Get historical equity curves.
      history = self.history(symbols, timedelta(365), Resolution.DAILY)['close'].unstack(0)
      
      # Gather the training data.
      training_data_by_symbol = {}
      for symbol in symbols:
          df = history[[symbol]].dropna()
          if df.shape[0] < 10: # Skip this asset if there is very little data
              continue
          adjusted_df = df.reset_index()[['time', symbol]]
          adjusted_df = adjusted_df.rename(columns={str(symbol.id): 'target'})
          adjusted_df['time'] = pd.to_datetime(adjusted_df['time'])
          adjusted_df.set_index('time', inplace=True)
          adjusted_df = adjusted_df.resample('D').asfreq()
          training_data_by_symbol[symbol] = adjusted_df

      For more information about history requests, see History Requests .

    9. Call the fine-tuning method with the training data.
    10. output_dir_path = self._train_chronos(
          list(training_data_by_symbol.values()),
          context_length=int(252/2), # 6 months
          prediction_length=self._prediction_length,
          optim=self._optimizer,
          model_id=self._model_name,
          output_dir=self._model_path,
          learning_rate=1e-5,
          # Requires Ampere GPUs (e.g., A100)
          tf32=False,
          max_steps=3
      )
    11. Load the fine-tuned model.
    12. pipeline = ChronosPipeline.from_pretrained(
          output_dir_path,
          device_map=self._device_map,
          torch_dtype=torch.bfloat16,
      )

    Forecast Time Series

    1. Get some historical data .
    2. history = self.history(symbols, timedelta(365), Resolution.DAILY)['close'].unstack(0)
    3. Load the pre-trained or fine-tuned model.
    4. Forecast the future time series.
    5. all_forecasts = pipeline.predict(
          [
              torch.tensor(history[symbol].dropna())
              for symbol in symbols
          ], 
          self._prediction_length
      )

      In this example, the model returns several future price paths for each asset.

    6. Aggregate the future prices paths of each asset into a single price path for each asset.
    7. For example, take the median value of each time step in the future price paths.

      forecasts_df = pd.DataFrame(
          {
              symbol: np.quantile(
                  all_forecasts[i].numpy(), 0.5, axis=0   # 0.5 = median
              )
              for i, symbol in enumerate(symbols)
          }
      )

    Examples

    The following algorithm selects the most liquid assets at the beginning of each month. Once a quarter, it gets the trailing year of prices for all the assets in the universe and then forecasts the prices paths of all the assets over the upcoming quarter. It then uses the SciPy package to find the weights that maximize the future Sharpe ratio of the portfolio and rebalances the portfolio to those weights.


    The following algorithm expands the preceding algorithm by fine-tuning the model before each forecast:

     

    Popular Models

    FinBERT

    Introduction

    This page explains how to use FinBERT in LEAN trading algorithms. The model repository provides the following description::

    FinBERT is a pre-trained NLP model to analyze sentiment of financial text. It is built by further training the BERT language model in the finance domain, using a large financial corpus and thereby fine-tuning it for financial sentiment classification. Financial PhraseBank by Malo et al. (2014) is used for fine-tuning. For more details, please see the paper FinBERT: Financial Sentiment Analysis with Pre-trained Language Models and our related blog post on Medium.

    The model will give softmax outputs for three labels: positive, negative or neutral.

    Use Cases

    The FinBERT model is a sentiment analysis model. The following use cases explain how you might utilize it in trading algorithms:

    Load Pre-Trained Model

    Follow these steps to load the pre-trained FinBERT model:

    1. Import the model and tokenizer classes.
    2. from transformers import TFBertForSequenceClassification, BertTokenizer
    3. Define the path were the model is stored.
    4. In QuantConnect Cloud, the path is ProsusAI / finbert .

      model_path = "ProsusAI/finbert"
    5. Create a TFBertForSequenceClassification model.
    6. self._model = TFBertForSequenceClassification.from_pretrained(model_path, local_files_only=True)
    7. Create a BertTokenizer object.
    8. self._tokenizer = BertTokenizer.from_pretrained(model_path, local_files_only=True)
    9. (Optional) Set the seed to enable reproducibility.
    10. from transformers import set_seed
      set_seed(1, True)

    Fine-Tune Model

    The FinBERT model is pre-trained, so you don't need to fine-tune it. Fine-tuning the model just tailors it to your specific use case. Follow these steps to fine-tune it:

    1. Import the Dataset class.
    2. from datasets import Dataset
    3. Load the pre-trained model .
    4. Compile the model with an optimizer and loss function.
    5. model.compile(
          optimizer=tf.keras.optimizers.Adam(learning_rate=3e-5), 
          loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
      )

      You only need to compile the model once. TensorFlow offers many other optimizer and loss classes you can use.

    6. Create a DataFrame that contains your training samples.
    7. The DataFrame should have two columns, named "text" and "label". The label must be an integer that represents the sentiment class. By default, the FinBERT model has three classes. Class zero represents negative sentiment, class one represents neutral sentiment, and class two represents positive sentiment.

      samples = pd.DataFrame(columns=['text', 'label'])
      # Add rows to the DataFrame...
    8. Convert the samples DataFrame to a tf.data.Dataset object.
    9. dataset = Dataset.from_pandas(samples)
    10. Tokenize the text in each training sample.
    11. dataset = dataset.map(
          lambda sample: self._tokenizer(sample['text'], padding='max_length', truncation=True)
      )
    12. Call the model's prepare_tf_dataset method.
    13. dataset = model.prepare_tf_dataset(dataset, shuffle=True, tokenizer=self._tokenizer)
    14. Call the model's fit method.
    15. model.fit(dataset, epochs=2)

    Analyze Sentiment

    Follow these steps to analyze the sentiment of some text with FinBERT:

    1. Load the model .
    2. (Optional) Fine-tune the model .
    3. Get the text you want the model to analyze.
    4. The model can analyze a single sentence or a list of sentences.

      content = "AAPL stock price spikes after record-breaking sales figures."
    5. Tokenize the text(s).
    6. inputs = self._tokenizer(content, padding=True, truncation=True, return_tensors='tf')

      For more information about how to tokenize, see the PreTrainedTokenizer.__call__ reference on the Hugging Face website.

    7. Perform dictionary unpacking on the preceding result and pass it to the model as input.
    8. outputs = self._model(**inputs)
    9. Apply softmax to the outputs to get probabilities of each sentiment class.
    10. scores = tf.nn.softmax(outputs.logits, axis=-1).numpy()

      The result of the preceding operation is a two dimensional numpy array. Each element in the two dimensional array is a list that contains the probability that the sentiment of the corresponding sentence is negative, neutral, or postiive, respectively. For example, you may get the following result if you use a single sentence as input. The result shows that the input is more positive than negative, but is likely neutral.

      array([[0.21346861, 0.46771246, 0.318819]])

    Examples

    The following algorithm selects a volatile asset at the beginning of each month. It gets the Tiingo News articles that were released for the asset over the previous 10 days and then feeds them into the pre-trained FinBERT model. It then aggregates the sentiment scores of all the news releases. If the aggregated sentiment score is positive, it enters a long position for the month. If it's negative, it enters a long position for the month.


    The following algorithm selects a volatile asset at the beginning of each month. It gets the Tiingo News articles that were released for the asset over the previous 30 days to generate the training set. The label is the market return that occurs from the current news release to the next news release. The algorithm then fine-tunes the model, calculates the sentiment, and rebalances the portfolio.

     

    Algorithm Framework

    Algorithm Framework

    Overview

    Introduction

    Since QuantConnect was formed in 2013, the community has created more than 2 million algorithms. Although they all seek to achieve different results, they can all be abstracted into the same core features. The Algorithm Framework is our attempt to provide this well-defined structure to the community, encouraging good design and making your work more reusable. LEAN provides many pre-built Algorithm Framework models you can use in your algorithms.

    Strategy Styles

    The algorithm framework works best for portfolio rebalancing, ranking, and multi-factor style strategies. The default portfolio construction models are designed to weigh and invest in the assets as the signals values shift, aiming to be fully invested as much as possible.

    Some strategies might find it difficult to fit this model. Technical entry signals are often tightly coupled with their exit criteria, they may not have defined hold periods, and they might follow the market to determine when to exit. This style of strategy can be addressed in a few ways:

    1. Short Term Signals - Emitting insights for short periods until they are no longer valid.
    2. Cancel Signals - Updating an insight's expiry time so that it's expired upon the exit signal.
    3. Alpha Exit Signal - Treating exit as its own signal, a separate Alpha model could indicate exit.
    4. Risk Model - Tracking exit using a risk model that attempts to lock in gains.

    These techniques are still not ideal for many strategies. For example, with only a single signal, the built in EqualWeightingPortfolioConstructionModel will allocate 100% of buying power to a single asset, over concentrating risk. If a second signal comes a few days later, it would sell 50% of the portfolio to free cash and invest in the second asset. This can create high trading costs through portfolio churn.

    With a custom portfolio construction model , signals can mean what you need for your specific strategy style. For example, you might create a " MultiBetPortfolioConstructionModel " that uses each insight to open a specific "bet" that is separately allocated capital and tracked.

    Important Terminology

    The following table defines important Algorithm Framework terminology:

    Term Description
    Universe Selection model A framework module that selects assets for your algorithm.
    Alpha model A framework module that generates trading signals on the assets in your universe.
    Insight An object that represents a trading signal. The Alpha model generates these objects for the Portfolio Construction model.
    Portfolio Construction model A framework module that determines position size targets based on the Insight objects it receives from the Alpha model.
    PortfolioTarget An object that represents the target position size for an asset in the universe. The Portfolio Construction model generates these objects for the Risk Management model.
    Risk Management A framework module that manages market risks and ensures the algorithm remains within target parameters. This model adjusts the PortfolioTarget objects it receives from the Portfolio Construction model before they reach the Execution model.
    Execution A framework module that places trades to reach the target risk-adjust portfolio based on the PortfolioTarget objects it receives from the Risk Management model.

    Framework Advantages

    We recommend you design strategies with the Algorithm Framework in most cases. The Algorithm Framework has many advantages over the classic algorithm design.

    Pluggable Algorithm Modules

    With the Algorithm Framework, your code can instantly utilize all modules built within the framework. The modules clip together in well-defined ways, which enable them to be shared and swapped interchangeably.

    Focus On Your Strengths

    If you write code in modules, you can focus on your strengths. If you are great at building universes, you can build Universe Selection modules. If you have risk management experience, you could write reusable risk monitoring technology.

    Reduce Development By Using Community Modules

    Easily share modules you've made between algorithms or pull in ones produced by the community. The strict separation of duties makes the Algorithm Framework perfect for reusing code between strategies.

    System Architecture

    The Algorithm Framework is built into the QCAlgorithm class, so your strategy can access all the normal methods you use for algorithm development. You should be able to copy and paste your algorithms across without any changes. You don't need a separate class.

    The Algorithm Framework modules communicate w

    The framework data output of each module flows into the following module. The assets that the Universe Selection model selects are fed into the Alpha model to generate trade signals ( Insight objects). The Insight objects from the Alpha model are fed into the Portfolio Construction model to create PortfolioTarget objects, which contain the target number of units to hold for each asset. The PortfolioTarget objects from the Portfolio Construction model are fed into the Risk Management model to ensure the targets are within safe risk parameters and to adjust the PortfolioTarget objects if necessary. The PortfolioTarget objects from the Risk Management model are fed into the Execution model, which efficiently places trades to acquire the target portfolio.

    The flow of data between the Algorithm Framework modules
    public class MyFrameworkAlgorithm : QCAlgorithm 
    {
        public override void Initialize() 
        {
            SetUniverseSelection(new EmaCrossUniverseSelectionModel());
            AddAlpha(new RsiAlphaModel());
            SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel());
            SetExecution(new ImmediateExecutionModel());
            AddRiskManagement(new NullRiskManagementModel());
        }
    }
    class MyFrameworkAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.set_universe_selection(EmaCrossUniverseSelectionModel())
            self.add_alpha(RsiAlphaModel())
            self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())
            self.set_execution(ImmediateExecutionModel())
            self.add_risk_management(NullRiskManagementModel())

    For simple strategies, it may seem like overkill to abstract out your algorithm concepts. However, even simple strategies can benefit from reusing the ecosystem of modules available in QuantConnect. Imagine pairing your EMA-cross Alpha model with a better execution system or plugging in an open-source trailing stop Risk Management model .

    Separation of Concerns

    The separation of concerns principle is an algorithm design principle where individual components are isolated and their responsibilities don't overlap. The Algorithm Framework is designed to uphold this design principle. The individual framework components shouldn't rely on the state of the other framework components in order to operate.

    In the Algorithm Framework, the models should not communicate. The universe constituents and the Insight objects you emit should be the same, regardless of what you select for the Portfolio Construction, Risk Management, and Execution models. If your algorithm logic naturally violates the separation of concerns design principle, it's more appropriate to use the classic or hybrid design .

    Framework vs Classic Design

    Select the classic or Algorithm Framework design based on the needs of your algorithm. If your algorithm uses special order types or passes information between the different algorithm components, use the classic design. If you can reuse existing modules and the Algorithm Framework modules can work in isolation, use the Algorithm Framework design.

     

    Algorithm Framework

    Universe Selection

    Universe Selection

    Key Concepts

    Introduction

    The Universe Selection model creates Universe objects, which select the assets for your algorithm. As the universe changes, we notify your algorithm through the OnSecuritiesChanged on_securities_changed event handler. With this event handler, you can track the current universe constituents in other parts of your algorithm without breaking the separation of concerns design principle.

    Types of Universe Selection

    We have identified several types of universes that cover most people's requirements and built helper classes to make their implementation easier. The following table describes the types of pre-built Universe Selection models:

    Universe Type Description
    Manual Universes Universes that use a fixed, static set of assets
    Fundamental Universes Universes for US Equities that are based on coarse price or fundamental data
    Scheduled Universes Universes that trigger on regular, custom intervals
    Futures Universes Universes that subscribe to Future chains
    Option Universes Universes that subscribe to Option chains

    Add Models

    To add a Universe Selection model, in the Initialize initialize method, call the AddUniverseSelection method.

    var symbols = new [] {QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA)};
    AddUniverseSelection(new ManualUniverseSelectionModel(symbols));
    
    symbols = [Symbol.create("SPY", SecurityType.EQUITY, Market.USA)]
    self.add_universe_selection(ManualUniverseSelectionModel(symbols))

    To view all the pre-built Universe Selection models, see Types of Universe Selection .

    Multi-Universe Algorithms

    You can add multiple Universe Selection models to a single algorithm.

    UniverseSettings.Asynchronous = true;
    var symbols = new [] {QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA)};
    AddUniverseSelection(new ManualUniverseSelectionModel(symbols));
    
    AddUniverseSelection(new EmaCrossUniverseSelectionModel());
    self.universe_settings.asynchronous = True
    symbols = [Symbol.create("SPY", SecurityType.EQUITY, Market.USA)]
    self.add_universe_selection(ManualUniverseSelectionModel(symbols))
    		
    self.add_universe_selection(EmaCrossUniverseSelectionModel())

    If you add multiple Universe Selection models, the algorithm subscribes to the constituents of all the models.

    Model Structure

    Universe Selection models should extend the UniverseSelectionModel class. Extensions of the UniverseSelectionModel class must implement the CreateUniverses create_universes method, which receives an algorithm object and returns an array of Universe objects.

    public class MyUniverseSelectionModel : UniverseSelectionModel
    {
        // Creates the universes for this algorithm
        public override IEnumerable<Universe> CreateUniverses(QCAlgorithm algorithm)
        {
            return new List<Universe>();
        }
    
        // Gets the next time the framework should invoke the `CreateUniverses` method to refresh the set of universes.
        public override DateTime GetNextRefreshTimeUtc()
        {
            return DateTime.MaxValue;
        }
    }
    class MyUniverseSelectionModel(UniverseSelectionModel):
    
        # Creates the universes for this algorithm
        def create_universes(self, algorithm: QCAlgorithm) -> List[Universe]:
            universes = []
            return universes
        
        # Gets the next time the framework should invoke the `CreateUniverses` method to refresh the set of universes.
        def get_next_refresh_time_utc(self):
            return datetime.max

    The algorithm argument that the methods receive is an instance of the base QCAlgorithm class, not your subclass of it.

    Generally, you should be able to extend one of the pre-built Universe Selection types. If you need to do something that doesn't fit into the pre-built types, let us know and we'll create a new foundational type of Universe Selection model.

    Track Security Changes

    When the Universe Selection model adjusts the universe constituents, we notify your algorithm through the OnSecuritiesChanged on_securities_changed event handler on your other framework components. The method receives QCAlgorithm and SecurityChanges objects. The QCAlgorithm object is an instance of the base QCAlgorithm class, not a reference to your algorithm object. To access the added securities, check the changes.AddedSecurities changes.added_securities method property. To access the removed securities, check the changes.RemovedSecurities changes.removed_securities method property.

    public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
    {
        foreach (var security in changes.AddedSecurities)
        {
            Log($"Added {security.Symbol}");
        }
    
        foreach (var security in changes.RemovedSecurities)
        {
            Log($"Removed {security.Symbol}");
        }
    }
    def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
        for security in changes.added_securities::
            self.log(f"Added {security.symbol}")
    
        for security in changes.removed_securities:
            self.log(f"Removed {security.symbol}")

    Live Trading Considerations

    In live trading, the securities in your brokerage account are added to your user-defined universe. If your Universe Selection model doesn't select these securities, they are not removed from your user-defined universe. When you liquidate the positions, you can remove them from the user-defined universe. If you call the RemoveSecurity remove_security method, it automatically liquidates the position.

    To see the securities in your user-defined universe that were loaded from your brokerage account, check your algorithm's ActiveSecurities active_securities in the OnWarmupFinished on_warmup_finished event handler.

    Examples

    Demonstration Algorithms
    Manual Selection - BasicTemplateFrameworkAlgorithm.py Python Fundamental Selection - QC500UniverseSelectionModel.py Python Scheduled Selection - ScheduledUniverseSelectionModelRegressionAlgorithm.py Python Manual Selection - BasicTemplateFrameworkAlgorithm.cs C# Fundamental Selection - QC500UniverseSelectionModel.cs C# Scheduled Selection - ScheduledUniverseSelectionModelRegressionAlgorithm.cs C#

     

    Universe Selection

    Universe Settings

    Introduction

    Universe settings and security initializers enable you to configure some properties of the securities in a universe.

    Resolution

    The Resolution resolution setting defines the time period of the asset data. The Resolution enumeration has the following members:

    To view which resolutions are available for the asset class of your universe, follow these steps:

    1. Open the Asset Classes documentation page.
    2. Click an asset class.
    3. Click Requesting Data .
    4. On the Requesting Data page, in the table of contents, click Resolutions .

    The default value is Resolution.Minute Resolution.MINUTE . To change the resolution, in the Initialize method, adjust the algorithm's UniverseSettings before you create the Universe Selection model.

    UniverseSettings.Resolution = Resolution.Daily;
    AddUniverseSelection(new ETFConstituentsUniverseSelectionModel("SPY"));
    self.universe_settings.resolution = Resolution.DAILY
    self.add_universe_selection(ETFConstituentsUniverseSelectionModel("SPY"))

    Leverage

    The Leverage leverage setting is a float decimal that defines the maximum amount of leverage you can use for a single asset in a non-derivative universe. The default value is Security.NullLeverage Security.NULL_LEVERAGE (0). To change the leverage, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you create the Universe Selection model.

    UniverseSettings.Leverage = 2.0m;
    AddUniverseSelection(new EmaCrossUniverseSelectionModel());
    self.universe_settings.leverage = 2.0
    self.add_universe_selection(EmaCrossUniverseSelectionModel())

    Fill Forward

    The FillForward fill_forward setting is a bool that defines whether or not too fill forward data. The default value is true True . To disable fill forward in non-derivative universes, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you create the Universe Selection model.

    UniverseSettings.FillForward = false;
    AddUniverseSelection(
        new OptionUniverseSelectionModel(
            TimeSpan.FromDays(1), 
            _ => new [] { QuantConnect.Symbol.Create("SPY", SecurityType.Option, Market.USA) }
        )
    );
    from Selection.OptionUniverseSelectionModel import OptionUniverseSelectionModel 
    
    self.universe_settings.fill_forward = False
    self.add_universe_selection(
        OptionUniverseSelectionModel(
            timedelta(1), lambda _: [Symbol.create("SPY", SecurityType.OPTION, Market.USA)]
        )
    )

    Extended Market Hours

    The ExtendedMarketHours extended_market_hours setting is a bool that defines the trading schedule. If it's true True , your algorithm receives price data for all trading hours. If it's false False , your algorithm receives price data only for regular trading hours. The default value is false False .

    You only receive extended market hours data if you create the subscription with an intraday resolution. If you create the subscription with daily resolution, the daily bars only reflect the regular trading hours.

    To view the trading schedule of an asset, open Asset Classes , click an asset class, then click Market Hours .

    To enable extended market hours, in the Initialize initialize method, adjust the algorithm's UniverseSettings before you create the Universe Selection model.

    UniverseSettings.ExtendedMarketHours = true;
    var tickers = new[] {"SPY", "QQQ", "IWM"};
    var symbols = tickers.Select(ticker => QuantConnect.Symbol.Create(ticker, SecurityType.Equity, Market.USA));
    AddUniverseSelection(new ManualUniverseSelectionModel(symbols));
    self.universe_settings.extended_market_hours = True
    tickers = ["SPY", "QQQ", "IWM"]
    symbols = [ Symbol.create(ticker, SecurityType.EQUITY, Market.USA) for ticker in tickers]
    self.add_universe_selection(ManualUniverseSelectionModel(symbols))

    Minimum Time in Universe

    The MinimumTimeInUniverse minimum_time_in_universe setting is a timedelta TimeSpan object that defines the minimum amount of time an asset must be in the universe before the universe can remove it. The default value is TimeSpan.FromDays(1) timedelta(1) . To change the minimum time, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you create the Universe Selection model.

    UniverseSettings.MinimumTimeInUniverse = TimeSpan.FromDays(7);
    AddUniverseSelection(new ETFConstituentsUniverseSelectionModel("QQQ"));
    self.universe_settings.minimum_time_in_universe = timedelta(7)
    self.add_universe_selection(ETFConstituentsUniverseSelectionModel("QQQ"))

    Data Normalization Mode

    The DataNormalizationMode data_normalization_mode setting is an enumeration that defines how historical data is adjusted. This setting is only applicable for US Equities and Futures.

    In the case of US Equities, the data normalization mode affects how historical data is adjusted for corporate actions . To view all the available options, see Data Normalization . To change the data normalization mode, in the Initialize initialize method, adjust the algorithm's UniverseSettings universe_settings before you create the Universe Selection model.

    In the case of Futures, the data normalization mode affects how historical data of two contracts is stitched together to form the continuous contract . To view all the available options, see Data Normalization .

    The default value is DataNormalizationMode.Adjusted DataNormalizationMode.ADJUSTED . To change the data normalization mode, in the Initialize method, adjust the algorithm's UniverseSettings before you create the Universe Selection model.

    UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
    
    var tickers = new[] {"MSTR", "MSFT", "IBM"};
    var symbols = tickers.Select(ticker => QuantConnect.Symbol.Create(ticker, SecurityType.Equity, Market.USA));
    AddUniverseSelection(new ManualUniverseSelectionModel(symbols));
    self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW
    
    tickers = ["MSTR", "MSFT", "IBM"]
    symbols = [ Symbol.create(ticker, SecurityType.EQUITY, Market.USA) for ticker in tickers]
    self.add_universe_selection(ManualUniverseSelectionModel(symbols))

    Contract Depth Offset

    The ContractDepthOffset contract_depth_offset setting is an int that defines which contract to use for the continuous Futures contract. 0 is the front month contract, 1 is the following back month contract, and 3 is the second back month contract. The default value is 0. To change the contract depth offset, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you create the Universe Selection model.

    UniverseSettings.ContractDepthOffset = 1;
    AddUniverseSelection(
        new FutureUniverseSelectionModel(
            TimeSpan.FromDays(1), 
            _ => new List<Symbol> {{ QuantConnect.Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME) }}
        )
    );
    from Selection.FutureUniverseSelectionModel import FutureUniverseSelectionModel
    
    self.universe_settings.contract_depth_offset = 1
    self.add_universe_selection(
        FutureUniverseSelectionModel(
            timedelta(1), 
            lambda _: [Symbol.create(Futures.Indices.SP500E_MINI, SecurityType.FUTURE, Market.CME)]
        )
    )

    Asynchronous Selection

    The Asynchronous asynchronous setting is a bool that defines whether or not LEAN can run universe selection asynchronously, utilizing concurrent execution to increase the speed of your algorithm. The default value for this setting is false False . If you enable this setting, abide by the following rules:

    To enable asynchronous universe selection, in the Initialize method, adjust the algorithm's UniverseSettings universe_settings before you create the Universe Selection model.

    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(new EmaCrossUniverseSelectionModel());
    self.universe_settings.asynchronous = True
    self.add_universe_selection(EmaCrossUniverseSelectionModel())

    Schedule

    The Schedule setting defines the selection schedule of the universe. Most universes run on a daily schedule. To change the selection schedule, call the UniverseSettings.Schedule.On universe_settings.schedule.on method with an IDateRule object before you create the Universe Selection model.

    UniverseSettings.Schedule.On(DateRules.MonthStart());
    AddUniverseSelection(new ETFConstituentsUniverseSelectionModel("QQQ"));
    self.universe_settings.schedule.on(self.date_rules.month_start())
    self.add_universe_selection(ETFConstituentsUniverseSelectionModel("QQQ"))

    The following table describes the supported DateRules :

    Member Description
    self.date_rules.set_default_time_zone(time_zone: DateTimeZone) DateRules.SetDefaultTimeZone(DateTimeZone timeZone); Sets the time zone for the DateRules object used in all methods in this table. The default time zone is the algorithm time zone .
    self.date_rules.on(year: int, month: int, day: int) DateRules.On(int year, int month, int day) Trigger an event on a specific date.
    self.date_rules.every_day() DateRules.EveryDay() Trigger an event every day.
    self.date_rules.every_day(symbol: Symbol) DateRules.EveryDay(Symbol symbol) Trigger an event every day a specific symbol is trading.
    self.date_rules.every(days: List[DayOfWeek]) DateRules.Every(params DayOfWeek[] days) Trigger an event on specific days throughout the week. To view the DayOfWeek enum members, see DayOfWeek Enum in the .NET documentation.
    self.date_rules.month_start(days_offset: int = 0) DateRules.MonthStart(int daysOffset = 0) Trigger an event on the first day of each month plus an offset.
    self.date_rules.month_start(symbol: Symbol, daysOffset: int = 0) DateRules.MonthStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each month for a specific symbol plus an offset.
    self.date_rules.month_end(days_offset: int = 0) DateRules.MonthEnd(int daysOffset = 0) Trigger an event on the last day of each month minus an offset.
    self.date_rules.month_end(symbol: Symbol, daysOffset: int = 0) DateRules.MonthEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each month for a specific symbol minus an offset.
    self.date_rules.week_start(days_offset: int = 0) DateRules.WeekStart(int daysOffset = 0) Trigger an event on the first day of each week plus an offset.
    self.date_rules.week_start(symbol: Symbol, days_offset: int = 0) DateRules.WeekStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each week for a specific symbol plus an offset.
    self.date_rules.week_end(days_offset: int = 0) DateRules.WeekEnd(int daysOffset = 0) Trigger an event on the last day of each week minus an offset.
    self.date_rules.week_end(symbol: Symbol, days_offset: int = 0) DateRules.WeekEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each week for a specific symbol minus an offset.
    self.date_rules.today DateRules.Today Trigger an event once today.
    self.date_rules.tomorrow DateRules.Tomorrow Trigger an event once tomorrow.

    To define custom date rules, create a FuncDateRule object. The FuncDateRule constructor expects a name argument of type string str and a getDatesFunction get_dates_function argument of type Func<DateTime, DateTime, IEnumerable<DateTime>> Callable[[datetime, datetime], List[datetime]] . The getDatesFunction get_dates_function function receives the start and end dates of the algorithm and returns a list of dates for the date rule. In live trading, the end date is 12/31/2025. The following example demonstrates how to define a date rule that represents the 10th day of each month:

    var dateRule = new FuncDateRule(
        name: "10th_day_of_the_month",
        getDatesFunction: (start, end) => Enumerable.Range(start.Year, end.Year - start.Year + 1)
            .SelectMany(year => Enumerable.Range(1, 12).Select(month => new DateTime(year, month, 10)))
    );
    date_rule = FuncDateRule(
        name="10th_day_of_the_month", 
        get_dates_function=lambda start, end: [
            datetime(year, month, 10) 
            for year in range(start.year, end.year) for month in range(1,12)
        ]
    ) 

    In live trading, scheduled universes run at roughly 8 AM Eastern Time to ensure there is enough time for the data to process.

    Configure Securities

    Instead of configuring global universe settings, you can individually configure the settings of each security in the universe with a security initializer. Security initializers let you apply any security-level reality model or special data requests on a per-security basis. To set the security initializer, in the Initialize initialize method, call the SetSecurityInitializer set_security_initializer method and then define the security initializer.

    //In Initialize
    SetSecurityInitializer(CustomSecurityInitializer);
    
    private void CustomSecurityInitializer(Security security)
    {
        // Disable trading fees
        security.SetFeeModel(new ConstantFeeModel(0, "USD"));
    }
    
    #In Initialize
    self.set_security_initializer(self._custom_security_initializer)
    
    def _custom_security_initializer(self, security: Security) -> None:
        # Disable trading fees
        security.set_fee_model(ConstantFeeModel(0, "USD"))
    

    For simple requests, you can use the functional implementation of the security initializer. This style lets you configure the security object with one line of code.

    SetSecurityInitializer(security => security.SetFeeModel(new ConstantFeeModel(0, "USD")));
    self.set_security_initializer(lambda security: security.set_fee_model(ConstantFeeModel(0, "USD")))

    In some cases, you may want to trade a security in the same time loop that you create the security subscription. To avoid errors, use a security initializer to set the market price of each security to the last known price. The GetLastKnownPrices get_last_known_prices method seeds the security price by gathering the security data over the last 3 days. If there is no data during this period, the security price remains at 0.

    var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
    SetSecurityInitializer(security => seeder.SeedSecurity(security));
    seeder = FuncSecuritySeeder(self.get_last_known_prices)
    self.set_security_initializer(lambda security: seeder.seed_security(security))

    If you call the SetSecurityInitializer set_security_initializer method, it overwrites the default security initializer. The default security initializer uses the security-level reality models of the brokerage model to set the following reality models of each security:

    The default security initializer also sets the leverage of each security and intializes each security with a seeder function. To extend upon the default security initializer instead of overwriting it, create a custom BrokerageModelSecurityInitializer .

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite some of the reality models        
            security.SetFeeModel(new ConstantFeeModel(0, "USD"));    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite some of the reality models        
            security.set_fee_model(ConstantFeeModel(0, "USD"))

    To set a seeder function without overwriting the reality models of the brokerage, use the standard BrokerageModelSecurityInitializer .

    var seeder = new FuncSecuritySeeder(GetLastKnownPrices);
    SetSecurityInitializer(new BrokerageModelSecurityInitializer(BrokerageModel, seeder));
    
    seeder = FuncSecuritySeeder(self.get_last_known_prices)
    self.set_security_initializer(BrokerageModelSecurityInitializer(self.brokerage_model, seeder))
    

     

    Universe Selection

    Manual Universes

    Introduction

    The ManualUniverseSelectionModel selects a static, fixed set of assets. It is similar to adding securities with the traditional AddSecurity add_security API methods. If your algorithm has a static universe, you can use automatic indicators instead of manual indicators in your algorithm.

    Manual universes can be prone to look-ahead bias . For example, if you select a set of securities that have performed well during the backtest period, you are incorporating information from the future into the backtest and the algorithm may underperform in live mode.

    Add Manual Universe Selection

    To add a ManualUniverseSelectionModel to your algorithm, in the Initialize initialize method, call the AddUniverseSelection method. The ManualUniverseSelectionModel constructor expects a list of Symbol objects that represent the universe constituents.

    var tickers = new[] {"SPY", "QQQ", "IWM"};
    var symbols = tickers.Select(ticker => QuantConnect.Symbol.Create(ticker, SecurityType.Equity, Market.USA));
    AddUniverseSelection(new ManualUniverseSelectionModel(symbols));
    tickers = ["SPY", "QQQ", "IWM"]
    symbols = [ Symbol.create(ticker, SecurityType.EQUITY, Market.USA) for ticker in tickers]
    self.add_universe_selection(ManualUniverseSelectionModel(symbols))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    symbols IEnumerable<Symbol> List[Symbol] Universe constituents
    universeSettings universe_settings UniverseSettings The universe settings . If you don't provide an argument, the model uses the algorithm.UniverseSettings algorithm.universe_settings by default. None

    To move the universe tickers and Symbol objects outside of the algorithm class, create a universe selection model that inherits the ManualUniverseSelectionModel class.

    // In Initialize
    AddUniverseSelection(new IndexUniverseSelectionModel());
    
    // Outside of the algorithm class
    class IndexUniverseSelectionModel : ManualUniverseSelectionModel
    {
        public IndexUniverseSelectionModel()
            : base(SelectSymbols()) {}
    
        public static IEnumerable<Symbol> SelectSymbols()
        {
            var tickers = new[] {"SPY", "QQQ", "IWM"};
            return tickers.Select(ticker => QuantConnect.Symbol.Create(ticker, SecurityType.Equity, Market.USA));
        }
    }
    # In Initialize
    self.add_universe_selection(IndexUniverseSelectionModel())
    
    # Outside of the algorithm class
    class IndexUniverseSelectionModel(ManualUniverseSelectionModel):
        def __init__(self):
            tickers = ["SPY", "QQQ", "IWM"]
            symbols = [Symbol.create(ticker, SecurityType.EQUITY, Market.USA) for ticker in tickers]
            super().__init__(symbols)

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

     

    Universe Selection

    Fundamental Universes

    Introduction

    A FundamentalUniverseSelectionModel selects a universe of US Equities based on Fundamental data. Depending on the Fundamental properties you use, these universes rely on the US Equity Coarse Universe dataset, the US Fundamental dataset, or both.

    These types of universes operate on daily schedule by default. In backtests, they select assets at midnight. In live trading, the selection timing depends on the data provider you use. To adjust the selection schedule, see Schedule .

    If you use a fundamental Universe Selection model, the only way to unsubscribe from a security is to return a list from the selection function that doesn't include the security Symbol . The RemoveSecurity remove_security method doesn't work with these types of Universe Selection models.

    Fundamental Selection

    The FundamentalUniverseSelectionModel lets you select stocks based on corporate Fundamental data. You can specific the selection method, which takes a list of Fundamental objects as argument and returns a list of Symbol objects.

    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;
        AddUniverseSelection(new FundamentalUniverseSelectionModel(FundamentalFilterFunction));
    }
    
    public override List<Symbol> FundamentalFilterFunction(List<Fundamental> fundamental)
    {
        return (from f in fundamental
                where f.HasFundamentalData && f.Price > 10 && !Double.IsNaN(f.ValuationRatios.PERatio)
                orderby f.ValuationRatios.PERatio
                select f.Symbol).Take(10);
    }
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self.add_universe_selection(FundamentalUniverseSelectionModel(self.fundamental_filter_function))
    
    def fundamental_filter_function(self, fundamental: List[Fundamental]):
        filtered = [f for f in fundamental if f.has_fundamental_data and f.price > 10 and not np.isnan(f.valuation_ratios.pe_ratio)]
        sorted_by_pe_ratio = sorted(filtered, key=lambda f: f.valuation_ratios.pe_ratio)
        return [f.symbol for f in sorted_by_pe_ratio[:10]]

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    selector Func<IEnumerable<Fundamental>, IEnumerable<Symbol>> Callable[[List[Fundamental]], List[Symbol]] Filter function to select assets based on fundamental data.
    universeSettings universe_settings UniverseSettings The universe settings . If you don't provide an argument, the model uses the algorithm.UniverseSettings algorithm.universe_settings by default. None null

    The Fundamental objects have the following properties:

    To move the selection function outside of the algorithm class, create a universe selection model that inherits the FundamentalUniverseSelectionModel class and override its Select select method.

    // In Initialize
    UniverseSettings.Asynchronous = true;            
    AddUniverseSelection(new LiquidAndLowPEUniverseSelectionModel());
    
    // Outside of the algorithm class
    public class LiquidAndLowPEUniverseSelectionModel : FundamentalUniverseSelectionModel
    {
        public override IEnumerable Select(QCAlgorithm algorithm, IEnumerable fundamental)
        {
            return fundamental
                // select symbols with fundamental data and a price above $1
                .Where(x => x.HasFundamentalData && x.Price > 1 && !Double.IsNaN(x.ValuationRatios.PERatio))
                // sort descending by daily dollar volume
                .OrderByDescending(x => x.DollarVolume)
                .Take(100)
                // sort descending by P/E ratio
                .OrderByDescending(x => x.ValuationRatios.PERatio)
                .Take(10)
                .Select(x => x.Symbol);
        }
    }
    # In initialize
    self.universe_settings.asynchronous = True
    self.add_universe_selection(LiquidAndLowPEUniverseSelectionModel())
    
    # Outside of the algorithm class
    class LiquidAndLowPEUniverseSelectionModel(FundamentalUniverseSelectionModel):
        def select(self, fundamental: List[Fundamental]) -> List[Symbol]:
            filtered = [x for x in fundamental if x.price > 1 and not np.isnan(x.valuation_ratios.pe_ratio)]
            most_liquid = sorted(filtered, key=lambda x: x.dollar_volume)[-100:]
            lowest_pe_ratio = sorted(most_liquid, key=lambda x: x.valuation_ratios.pe_ratio)[:10]
            return [x.Symbol for x in lowest_pe_ratio]

    To return the current universe constituents from the selection function, return Universe. Unchanged UNCHANGED .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    EMA Cross Selection

    The EmaCrossUniverseSelectionModel applies two exponential moving average (EMA) indicators to the price history of assets and then selects the assets that have their fast EMA furthest above their slow EMA on a percentage basis.

    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;        
        AddUniverseSelection(new EmaCrossUniverseSelectionModel());
    }
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True   
        self.add_universe_selection(EmaCrossUniverseSelectionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    fastPeriod fast_period int Fast EMA period 100
    slowPeriod slow_period int Slow EMA period 300
    universeCount universe_count int Maximum number of members of this universe selection 500
    universeSettings universe_settings UniverseSettings The universe settings . If you don't provide an argument, the model uses the algorithm.UniverseSettings algorithm.universe_settings by default. None null

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Examples

    Demonstration Algorithms
    FundamentalUniverseSelectionAlgorithm.py Python EmaCrossUniverseSelectionFrameworkAlgorithm.py Python FundamentalUniverseSelectionAlgorithm.cs C# EmaCrossUniverseSelectionFrameworkAlgorithm.cs C#

     

    Universe Selection

    ETF Constituents Universes

    Introduction

    The ETFConstituentsUniverseSelectionModel selects a universe of US Equities based on the constituents of an ETF. These Universe Selection models rely on the US ETF Constituents dataset. They run on a daily schedule by default. To adjust the selection schedule, see Schedule .

    Add ETF Constituents Universe Selection

    To add an ETFConstituentsUniverseSelectionModel to your algorithm, in the Initialize initialize method, call the AddUniverseSelection method. The ETFConstituentsUniverseSelectionModel constructor expects an ETF ticker.

    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(new ETFConstituentsUniverseSelectionModel("SPY"));
    self.universe_settings.asynchronous = True
    self.add_universe_selection(ETFConstituentsUniverseSelectionModel("SPY"))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    etfTicker etf_ticker string Ticker of the ETF to get constituents for. To view the available ETFs, see Supported ETFs .
    universeSettings universe_settings UniverseSettings The universe settings . If you don't provide an argument, the model uses the algorithm.UniverseSettings algorithm.universe_settings by default. None
    universeFilterFunc universe_filter_func Func<IEnumerable<ETFConstituentUniverse>, IEnumerable<Symbol>> Callable[[List[ETFConstituentUniverse]], List[Symbol]] Function to filter ETF constituents. If you don't provide an argument, the model selects all of the ETF constituents by default. None null

    If you provide a universeFilterFunc universe_filter_func argument, you can use the following attributes of the ETFConstituentUniverse objects to select your universe:

    The following example shows how to select the 10 Equities with the largest weight in the SPY ETF:

    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;
        AddUniverseSelection(
            new ETFConstituentsUniverseSelectionModel("SPY", universeFilterFunc: ETFConstituentsFilter)
        );
    }
    
    private IEnumerable<Symbol> ETFConstituentsFilter(IEnumerable<ETFConstituentUniverse> constituents)
    {
        return constituents.OrderByDescending(c => c.Weight).Take(10).Select(c => c.Symbol);
    }
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True   
        self.add_universe_selection(
            ETFConstituentsUniverseSelectionModel("SPY", universe_filter_func=self.etf_constituents_filter)
        )
    
    def etf_constituents_filter(self, constituents: List[ETFConstituentUniverse]) -> List[Symbol]:
        selected = sorted(
            [c for c in constituents if c.weight],
            key=lambda c: c.weight, reverse=True
        )[:10]
        return [c.symbol for c in selected]

    To move the ETF Symbol and the selection function outside of the algorithm class, create a universe selection model that inherits the ETFConstituentsUniverseSelectionModel class.

    // In Initialize
    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(new LargestWeightSPYETFUniverseSelectionModel());
    
    // Outside of the algorithm class
    class LargestWeightSPYETFUniverseSelectionModel : ETFConstituentsUniverseSelectionModel
    {
        public LargestWeightSPYETFUniverseSelectionModel(UniverseSettings universeSettings = null)
            : base("SPY", universeFilterFunc: ETFConstituentsFilter)
        {
        }
    
        private static IEnumerable<Symbol> ETFConstituentsFilter(IEnumerable<ETFConstituentUniverse> constituents)
        {
            return constituents.OrderByDescending(c => c.Weight).Take(10).Select(c => c.Symbol);
        }
    }
    # In Initialize
    self.universe_settings.asynchronous = True
    self.add_universe_selection(LargestWeightSPYETFUniverseSelectionModel())
    
    # Outside of the algorithm class
    class LargestWeightSPYETFUniverseSelectionModel(ETFConstituentsUniverseSelectionModel):
        def __init__(self) -> None:
            super().__init__(symbol, universe_filter_func=self.etf_constituents_filter)
    
        def etf_constituents_filter(self, constituents: List[ETFConstituentUniverse]) -> List[Symbol]:
            selected = sorted(
                [c for c in constituents if c.weight],
                key=lambda c: c.weight, reverse=True
            )[:10]
            return [c.symbol for c in selected]

    To return the current universe constituents from the selection function, return Universe. Unchanged UNCHANGED .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

     

    Universe Selection

    Scheduled Universes

    Introduction

    A Scheduled Universe Selection model selects assets at fixed, regular intervals. In live trading, you can use this type of model to fetch tickers from Dropbox or to perform periodic historical analysis and select some assets.

    Scheduled Universe Selection

    The ScheduledUniverseSelectionModel selects assets on the schedule you provide. To use this model, provide a DateRule , TimeRule , and a selector function. The DateRule and TimeRule define the selection schedule. The selector function receives a datetime DateTime object and returns a list of Symbol objects. The Symbol objects you return from the selector function are the constituents of the universe.

    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(
        new ScheduledUniverseSelectionModel(
            DateRules.MonthStart(), 
            TimeRules.Midnight, 
            dt => new List<Symbol> { 
                QuantConnect.Symbol.Create(dt.Month == 10 ? "SPY" : "QQQ", SecurityType.Equity, Market.USA) 
            }
        )
    );
    self.universe_settings.asynchronous = True
    self.add_universe_selection(
        ScheduledUniverseSelectionModel(
            self.date_rules.month_start(), 
            self.time_rules.midnight, 
            lambda dt: [Symbol.create("SPY" if dt.month == 10 else "QQQ", SecurityType.EQUITY, Market.USA)]
        )
    )

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    dateRule date_rule IDateRule Date rule defines what days the universe selection function will be invoked
    timeRule time_rule ITimeRule Time rule defines what times on each day selected by date rule the universe selection function will be invoked
    selector Func<DateTime, IEnumerable<Symbol>> Callable[[datetime], List[Symbol]] Selector function accepting the date time firing time and returning the universe selected symbols
    settings UniverseSettings The universe settings . If you don't provide an argument, the model uses the algorithm.UniverseSettings algorithm.universe_settings by default. None null

    The model assumes the timeRule time_rule argument is in Coordinated Universal Time (UTC). To use a different timezone, pass a timeZone argument of type DateTimeZone before the dateRule date_rule argument.

    To return the current universe constituents from the selector function, return Universe. Unchanged UNCHANGED .

    // Selection will run on mon/tues/thurs at 00:00/06:00/12:00/18:00
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.Every(DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Thursday),
        TimeRules.Every(TimeSpan.FromHours(6)),
        SelectSymbols // selection function in algorithm.
    ));
    
    // Create selection function which returns symbol objects.
    private IEnumerable<Symbol> SelectSymbols(DateTime dateTime)
    {
        var tickers = new[] {"SPY", "AAPL", "IBM"};
        return tickers.Select(ticker =>
            QuantConnect.Symbol.Create(ticker, SecurityType.Equity, Market.USA));
    }
    
    # Selection will run on mon/tues/thurs at 00:00/06:00/12:00/18:00
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.every(DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.THURSDAY),
        self.time_rules.every(timedelta(hours = 6)),
        self.select_symbols # selection function in algorithm.
    ))
    
    # Create selection function which returns symbol objects.
    def select_symbols(self, date_time: datetime) -> List[Symbol]:
        tickers = ['SPY', 'AAPL', 'IBM']
        return [Symbol.create(ticker, SecurityType.EQUITY, Market.USA)
            for ticker in tickers]

    To view the implementation of this model, see the LEAN GitHub repository .

    Date Rules

    The following table describes the supported DateRules :

    Member Description
    self.date_rules.set_default_time_zone(time_zone: DateTimeZone) DateRules.SetDefaultTimeZone(DateTimeZone timeZone); Sets the time zone for the DateRules object used in all methods in this table. The default time zone is the algorithm time zone .
    self.date_rules.on(year: int, month: int, day: int) DateRules.On(int year, int month, int day) Trigger an event on a specific date.
    self.date_rules.every_day() DateRules.EveryDay() Trigger an event every day.
    self.date_rules.every_day(symbol: Symbol) DateRules.EveryDay(Symbol symbol) Trigger an event every day a specific symbol is trading.
    self.date_rules.every(days: List[DayOfWeek]) DateRules.Every(params DayOfWeek[] days) Trigger an event on specific days throughout the week. To view the DayOfWeek enum members, see DayOfWeek Enum in the .NET documentation.
    self.date_rules.month_start(days_offset: int = 0) DateRules.MonthStart(int daysOffset = 0) Trigger an event on the first day of each month plus an offset.
    self.date_rules.month_start(symbol: Symbol, daysOffset: int = 0) DateRules.MonthStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each month for a specific symbol plus an offset.
    self.date_rules.month_end(days_offset: int = 0) DateRules.MonthEnd(int daysOffset = 0) Trigger an event on the last day of each month minus an offset.
    self.date_rules.month_end(symbol: Symbol, daysOffset: int = 0) DateRules.MonthEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each month for a specific symbol minus an offset.
    self.date_rules.week_start(days_offset: int = 0) DateRules.WeekStart(int daysOffset = 0) Trigger an event on the first day of each week plus an offset.
    self.date_rules.week_start(symbol: Symbol, days_offset: int = 0) DateRules.WeekStart(Symbol symbol, int daysOffset = 0) Trigger an event on the first tradable date of each week for a specific symbol plus an offset.
    self.date_rules.week_end(days_offset: int = 0) DateRules.WeekEnd(int daysOffset = 0) Trigger an event on the last day of each week minus an offset.
    self.date_rules.week_end(symbol: Symbol, days_offset: int = 0) DateRules.WeekEnd(Symbol symbol, int daysOffset = 0) Trigger an event on the last tradable date of each week for a specific symbol minus an offset.
    self.date_rules.today DateRules.Today Trigger an event once today.
    self.date_rules.tomorrow DateRules.Tomorrow Trigger an event once tomorrow.

    To define custom date rules, create a FuncDateRule object. The FuncDateRule constructor expects a name argument of type string str and a getDatesFunction get_dates_function argument of type Func<DateTime, DateTime, IEnumerable<DateTime>> Callable[[datetime, datetime], List[datetime]] . The getDatesFunction get_dates_function function receives the start and end dates of the algorithm and returns a list of dates for the date rule. In live trading, the end date is 12/31/2025. The following example demonstrates how to define a date rule that represents the 10th day of each month:

    var dateRule = new FuncDateRule(
        name: "10th_day_of_the_month",
        getDatesFunction: (start, end) => Enumerable.Range(start.Year, end.Year - start.Year + 1)
            .SelectMany(year => Enumerable.Range(1, 12).Select(month => new DateTime(year, month, 10)))
    );
    date_rule = FuncDateRule(
        name="10th_day_of_the_month", 
        get_dates_function=lambda start, end: [
            datetime(year, month, 10) 
            for year in range(start.year, end.year) for month in range(1,12)
        ]
    ) 

    Time Rules

    The following table describes the supported TimeRules :

    Member Description
    self.time_rules.set_default_time_zone(time_zone: DateTimeZone) TimeRules.SetDefaultTimeZone(DateTimeZone timeZone) Sets the time zone for the TimeRules object used in all methods in this table, except when a different time zone is given. The default time zone is the algorithm time zone .
    self.time_rules.after_market_open(symbol: Symbol, minutes_after_open: float = 0, extended_market_open: bool = False) TimeRules.AfterMarketOpen(Symbol symbol, double minutesAfterOpen = 0, bool extendedMarketOpen = false) Trigger an event a few minutes after market open for a specific symbol (default is 0). This rule doesn't work for Crypto securities or custom data.
    self.time_rules.before_market_close(symbol: Symbol, minutes_after_open: float = 0, extended_market_open: bool = False) TimeRules.BeforeMarketClose(Symbol symbol, double minutesBeforeClose = 0, bool extendedMarketOpen = false) Trigger an event a few minutes before market close for a specific symbol (default is 0). This rule doesn't work for Crypto securities or custom data.
    self.time_rules.every(interval: timedelta) TimeRules.Every(TimeSpan interval) Trigger an event every period interval starting at midnight.
    self.time_rules.now TimeRules.Now Trigger an event at the current time of day.
    self.time_rules.midnight TimeRules.Midnight Trigger an event at midnight.
    self.time_rules.noon TimeRules.Noon Trigger an event at noon.
    self.time_rules.at(hour: int, minute: int, second: int = 0) TimeRules.At(int hour, int minute, int second = 0) Trigger an event at a specific time of day (e.g. 13:10).
    self.time_rules.at(hour: int, minute: int, second: int, time_zone: DateTimeZone) TimeRules.At(int hour, int minute, int second, DateTimeZone timeZone) Trigger an event at a specific time of day in the given time zone (e.g. 13:10 UTC).

    To define custom time rules, create a FuncTimeRule object. The FuncTimeRule constructor expects a name argument of type string str and a createUtcEventTimesFunction create_utc_event_times_function argument of type Func<IEnumerable<DateTime>, IEnumerable<DateTime>> Callable[[List[datetime]], List[datetime]] . The function receives the list of dates from the date rule and then returns a list of DateTime datetime that define the time rule.

    var timeRule = new FuncTimeRule(
        name: "CustomTimeRule",
        createUtcEventTimesFunction: dates => dates.Select(d => d.AddHours(10)));
    time_rule = FuncTimeRule(
        name="CustomTimeRule", 
        create_utc_event_times_function=lambda dates: [d + timedelta(hours=10) for d in dates]
    )

    Examples

    // Select the universe on a specific date at a specific time 
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.On(2013, 10, 7),
        TimeRules.At(13, 0),
        SelectSymbols));
    
    // Select the universe 10 minutes after SPY starts trading each day
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.EveryDay("SPY"),
        TimeRules.AfterMarketOpen("SPY", 10),
        SelectSymbols));
    
    // Select the universe 10 minutes before SPY stops trading each day
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.EveryDay("SPY"),
        TimeRules.BeforeMarketClose("SPY", 10),
        SelectSymbols));
    
    // Select the universe on Monday and Friday at noon
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.Every(DayOfWeek.Monday, DayOfWeek.Friday),
        TimeRules.At(12, 0),
        SelectSymbols));
    
    // Select the universe now
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.Today,
        TimeRules.Now,
        SelectSymbols));
    
    // Select the universe tomorrow at midnight
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.Tomorrow,
        TimeRules.Midnight,
        SelectSymbols));
    
    // Select the universe today at noon
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.Today,
        TimeRules.Noon,
        SelectSymbols));
    
    // Select the universe every 10 minutes on everyday 
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.EveryDay(), 
        TimeRules.Every(TimeSpan.FromMinutes(10)),
        SelectSymbols));
                
    // Select the universe at the market open on the first day of the month the SPY starts trading
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.MonthStart("SPY"),
        TimeRules.AfterMarketOpen("SPY"),
        SelectSymbols));
    
    // Select the universe at the market close on the last day of the month the SPY trades
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.MonthEnd("SPY"),
        TimeRules.BeforeMarketClose("SPY"),
        SelectSymbols));
    
    // Select the universe 5 minutes after SPY starts trading each week
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.WeekStart("SPY"),
        TimeRules.AfterMarketOpen("SPY", 5),
        SelectSymbols));
    
    // Select the universe 5 minutes before the SPY stops trading each week
    AddUniverseSelection(new ScheduledUniverseSelectionModel(
        DateRules.WeekEnd("SPY"),
        TimeRules.BeforeMarketClose("SPY", 5),
        SelectSymbols));
    
    
    // Define a selection function that returns Symbol objects
    private IEnumerable<Symbol> SelectSymbols(DateTime dateTime)
    {
        var tickers = new[] {"SPY", "AAPL", "IBM"};
        return tickers.Select(ticker =>
            QuantConnect.Symbol.Create(ticker, SecurityType.Equity, Market.USA));
    }      
    
    # Select the universe on a specific date at a specific time 
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.on(2013, 10, 7), 
        self.time_rules.at(13, 0),
        self.select_symbols))
        
    # Select the universe 10 minutes after SPY starts trading each day
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.every_day("SPY"), 
        self.time_rules.after_market_open("SPY", 10),
        self.select_symbols))
    
    # Select the universe 10 minutes before SPY stops trading each day
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.every_day("SPY"),
        self.time_rules.before_market_close("SPY", 10),
        self.select_symbols))
    
    # Select the universe on Monday and Friday at noon
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.every(DayOfWeek.MONDAY, DayOfWeek.FRIDAY),
        self.time_rules.at(12, 0),
        self.select_symbols))
    
    # Select the universe now
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.today,
        self.time_rules.now,
        self.select_symbols))
    
    # Select the universe tomorrow at midnight
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.tomorrow,
        self.time_rules.midnight,
        self.select_symbols))
        
    # Select the universe today at noon
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.today,
        self.time_rules.noon,
        self.select_symbols))
    
    # Select the universe every 10 minutes on everyday 
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.every_day(), 
        self.time_rules.every(timedelta(minutes=10)),
        self.select_symbols))
    
    # Select the universe at the market open on the first day of the month the SPY starts trading
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.month_start("SPY"),
        self.time_rules.after_market_open("SPY"),
        self.select_symbols))
    
    # Select the universe at the market close on the last day of the month the SPY trades
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.month_end("SPY"),
        self.time_rules.before_market_close("SPY"),
        self.select_symbols))
    
    # Select the universe 5 minutes after SPY starts trading each week
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.week_start("SPY"),
        self.time_rules.after_market_open("SPY", 5),
        self.select_symbols))
    
    # Select the universe 5 minutes before the SPY stops trading each week
    self.add_universe_selection(ScheduledUniverseSelectionModel(
        self.date_rules.week_end("SPY"),
        self.time_rules.before_market_close("SPY", 5),
        self.select_symbols))
    
    
    # Define a selection function that returns Symbol objects
    def select_symbols(self, date_time: datetime) -> List[Symbol]:
        tickers = ['SPY', 'AAPL', 'IBM']
        return [Symbol.create(ticker, SecurityType.EQUITY, Market.USA)
            for ticker in tickers]
    
    Demonstration Algorithms
    ScheduledUniverseSelectionModelRegressionAlgorithm.py Python ScheduledUniverseSelectionModelRegressionAlgorithm.cs C#

     

    Universe Selection

    Futures Universes

    Introduction

    A Future Universe Selection model selects contracts for a set of Futures.

    Future Universe Selection

    The FutureUniverseSelectionModel selects all the contracts for a set of Futures you specify. To use this model, provide a refreshInterval refresh_interval and a selector function. The refreshInterval refresh_interval defines how frequently LEAN calls the selector function. The selector function receives a DateTime datetime object that represents the current Coordinated Universal Time (UTC) and returns a list of Symbol objects. The Symbol objects you return from the selector function are the Futures of the universe.

    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(
        new FutureUniverseSelectionModel(
            TimeSpan.FromDays(1), 
            _ => new List<Symbol> {{ QuantConnect.Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME) }}
        )
    );
    from Selection.FutureUniverseSelectionModel import FutureUniverseSelectionModel
    
    self.universe_settings.asynchronous = True
    self.add_universe_selection(
        FutureUniverseSelectionModel(
            timedelta(1), 
            lambda _: [Symbol.create(Futures.Indices.SP500E_MINI, SecurityType.FUTURE, Market.CME)]
        )
    )

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    refreshInterval refresh_interval TimeSpan timedelta Time interval between universe refreshes
    futureChainSymbolSelector future_chain_symbol_selector Func<DateTime, IEnumerable<Symbol>> Callable[[datetime], List[Symbol]] A function that selects the Future symbols for a given Coordinated Universal Time (UTC). To view the supported assets in the US Futures dataset, see Supported Assets .
    universeSettings universe_settings UniverseSettings The universe settings . If you don't provide an argument, the model uses the algorithm.UniverseSettings algorithm.universe_settings by default. null None

    The following example shows how to define the Future chain Symbol selector as an isolated method:

    public override void Initialize()
    {
        AddUniverseSelection(
            new FutureUniverseSelectionModel(TimeSpan.FromDays(1), SelectFutureChainSymbols)
        );
    }
    
    private static IEnumerable<Symbol> SelectFutureChainSymbols(DateTime utcTime)
    {
        return new[] {
            QuantConnect.Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME),
            QuantConnect.Symbol.Create(Futures.Metals.Gold, SecurityType.Future, Market.COMEX)
        };
    }
    from Selection.FutureUniverseSelectionModel import FutureUniverseSelectionModel
    
    def initialize(self) -> None:
        self.set_universe_selection(
            FutureUniverseSelectionModel(timedelta(days=1), self.select_future_chain_symbols)
        )
    
    def select_future_chain_symbols(self, utc_time: datetime) -> List[Symbol]:
        return [ 
            Symbol.create(Futures.Indices.SP500E_MINI, SecurityType.FUTURE, Market.CME),
            Symbol.create(Futures.Metals.GOLD, SecurityType.FUTURE, Market.COMEX)
        ]

    This model uses the default Future contract filter, which doesn't select any Futures contracts. To use a different filter, subclass the FutureUniverseSelectionModel and define a Filter filter method. The Filter filter method accepts and returns a FutureFilterUniverse object to select the Futures contracts. The following table describes the filter methods of the FutureFilterUniverse class:

    Method Description
    StandardsOnly() standards_only() Selects standard contracts
    IncludeWeeklys() include_weeklys() Selects non-standard weekly contracts
    WeeklysOnly() weeklys_only() Selects weekly contracts
    FrontMonth() front_month() Selects the front month contract
    BackMonths() back_months() Selects the non-front month contracts
    BackMonth() back_month() Selects the back month contracts
    Expiration(TimeSpan minExpiry, TimeSpan maxExpiry) expiration(min_expiry: timedelta, max_expiry: timedelta) Selects contracts that expire within a range of dates relative to the current day
    Expiration(int minExpiryDays, int maxExpiryDays) expiration(min_expiry_days: int, max_expiry_days: int) Selects contracts that expire within a range of dates relative to the current day
    Contracts(IEnumerable<Symbol> contracts) contracts(contracts: List[Symbol]) Selects a list of contracts
    Contracts(Func<IEnumerable<Symbol>, IEnumerable< Symbol>> contractSelector) contracts(contractSelector: Callable[[List[Symbol]], List[Symbol]]) Selects contracts that a selector function selects

    The contract filter runs at the first time step of each day.

    To move the Future chain Symbol selector and the contract selection function outside of the algorithm class, create a universe selection model that inherits the FundamentalUniverseSelectionModel class and override its Select method.

    // In Initialize
    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(new FrontMonthFutureUniverseSelectionModel());
    
    // Outside of the algorithm class
    class FrontMonthFutureUniverseSelectionModel : FutureUniverseSelectionModel
    {
        public FrontMonthFutureUniverseSelectionModel()
            : base(TimeSpan.FromDays(1), SelectFutureChainSymbols) {}
    
        private static IEnumerable<Symbol> SelectFutureChainSymbols(DateTime utcTime)
        {
            return new List<Symbol> {
                QuantConnect.Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME),
                QuantConnect.Symbol.Create(Futures.Metals.Gold, SecurityType.Future, Market.COMEX)
            };
        }
    
        protected override FutureFilterUniverse Filter(FutureFilterUniverse filter)
        {
            return filter.FrontMonth();
        }
    }
    # In initialize
    self.universe_settings.asynchronous = True
    self.add_universe_selection(FrontMonthFutureUniverseSelectionModel())
    
    # Outside of the algorithm class
    class FrontMonthFutureUniverseSelectionModel(FutureUniverseSelectionModel):
        def __init__(self) -> None:
            super().__init__(timedelta(1), self.select_future_chain_symbols)
    
        def select_future_chain_symbols(self, utc_time: datetime) -> List[Symbol]:
            return [ 
                Symbol.create(Futures.Indices.SP500E_MINI, SecurityType.FUTURE, Market.CME),
                Symbol.create(Futures.Metals.GOLD, SecurityType.FUTURE, Market.COMEX) 
            ]
    
        def filter(self, filter: FutureFilterUniverse) -> FutureFilterUniverse:
            return filter.front_month()

    Some of the preceding filter methods only set an internal enumeration in the FutureFilterUniverse that it uses later on in the filter process. This subset of filter methods don't immediately reduce the number of contract Symbol objects in the FutureFilterUniverse .

    The AddUniverseSelection method doesn't return a Future object like the AddFuture method. The Future object contains Symbol and Mapped mapped properties, which reference the continuous contract and the currently selected contract in the continuous contract series, respectively. To get the Future object, define the OnSecuritiesChanged on_securities_changed method in your algorithm class or framework models and check the result of the IsCanonical method.

    public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
    {
        foreach (var security in changes.AddedSecurities)
        {
            if (security.Symbol.IsCanonical() && security.Type == SecurityType.Future)
            {
                _future = security as Future;
            }
        }
    }
    def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
        for security in changes.added_securities:
            if security.Symbol.IsCanonical():
                self.future = security

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Open Interest Future Universe Selection

    The OpenInterestFutureUniverseSelectionModel is an extension of the FutureUniverseSelectionModel that selects the contract with the greatest open interest on a daily basis.

    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(
        new OpenInterestFutureUniverseSelectionModel(
            this, 
            utcTime => new[] { QuantConnect.Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME) }
        )
    );
    self.universe_settings.asynchronous = True
    self.add_universe_selection(
        OpenInterestFutureUniverseSelectionModel(
            self, 
            lambda utc_time: [Symbol.create(Futures.Indices.SP500E_MINI, SecurityType.FUTURE, Market.CME)]
        )
    )

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    algorithm IAlgorithm Algorithm
    futureChainSymbolSelector future_chain_symbol_selector Func<DateTime, IEnumerable<Symbol>> Callable[[datetime], List[Symbol]] A function that selects the Future symbols for a given Coordinated Universal Time (UTC). To view the supported assets in the US Futures dataset, see Supported Assets .
    chainContractsLookupLimit chain_contracts_lookup_limit int? int/None Limit on how many contracts to query for open interest 6
    resultsLimit results_limit int? int/None Limit on how many contracts will be part of the universe 1

    The following example shows how to define the Future chain Symbol selector as an isolated method:

    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;  
        AddUniverseSelection(
            new OpenInterestFutureUniverseSelectionModel(this, SelectFutureChainSymbols)
        );
    }
    
    private static IEnumerable<Symbol> SelectFutureChainSymbols(DateTime utcTime)
    {
        return new[] {
            QuantConnect.Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME),
            QuantConnect.Symbol.Create(Futures.Metals.Gold, SecurityType.Future, Market.COMEX)
        };
    }
    
    
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self.add_universe_selection(
            OpenInterestFutureUniverseSelectionModel(self, self.select_future_chain_symbols)
        )
    
    def select_future_chain_symbols(self, utc_time: datetime) -> List[Symbol]:
        return [ 
            Symbol.create(Futures.Indices.SP500E_MINI, SecurityType.FUTURE, Market.CME),
            Symbol.create(Futures.Metals.GOLD, SecurityType.FUTURE, Market.COMEX)
        ]

    To move the Future chain Symbol selector outside of the algorithm class, create a universe selection model that inherits the OpenInterestFutureUniverseSelectionModel class.

    // In Initialize
    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(new GoldOpenInterestFutureUniverseSelectionModel(this));
    
    // Outside of the algorithm class
    class GoldOpenInterestFutureUniverseSelectionModel : OpenInterestFutureUniverseSelectionModel
    {
        public GoldOpenInterestFutureUniverseSelectionModel(QCAlgorithm algorithm, 
            int? chainContractsLookupLimit = 6, int? resultsLimit = 1)
            : base(algorithm, SelectFutureChainSymbols, chainContractsLookupLimit, resultsLimit) {}
    
        private static IEnumerable<Symbol> SelectFutureChainSymbols(DateTime utcTime)
        {
            return new List<Symbol> { 
                QuantConnect.Symbol.Create(Futures.Metals.Gold, SecurityType.Future, Market.COMEX) 
            };
        }
    }
    # In initialize
    self.universe_settings.asynchronous = True
    self.add_universe_selection(GoldOpenInterestFutureUniverseSelectionModel(self))
        
    # Outside of the algorithm class
    class GoldOpenInterestFutureUniverseSelectionModel(OpenInterestFutureUniverseSelectionModel):
        def __init__(self, algorithm: QCAlgorithm, chain_contracts_lookup_limit: int = 6, results_limit: int = 1):
            super().__init__(algorithm, self.select_future_chain_symbols, chain_contracts_lookup_limit, results_limit)
    
        def select_future_chain_symbols(self, utcTime: datetime) -> List[Symbol]:
            return [Symbol.Create(Futures.Metals.GOLD, SecurityType.FUTURE, Market.COMEX)]

    The AddUniverseSelection method doesn't return a Future object like the AddFuture method. The Future object contains Symbol and Mapped mapped properties, which reference the continuous contract and the currently selected contract in the continuous contract series, respectively. To get the Future object, define the OnSecuritiesChanged on_securities_changed method in your algorithm class or framework models and check the result of the IsCanonical method.

    public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
    {
        foreach (var security in changes.AddedSecurities)
        {
            if (security.Symbol.IsCanonical() && security.Type == SecurityType.Future)
            {
                _future = security as Future;
            }
        }
    }
    def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
        for security in changes.added_securities:
            if security.Symbol.IsCanonical():
                self.future = security

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Universe Selection

    Options Universes

    Introduction

    An Option Universe Selection model selects contracts for a set of Options.

    Options Universe Selection

    The OptionUniverseSelectionModel selects all the available contracts for the Equity Options, Index Options, and Future Options you specify. To use this model, provide a refreshInterval refresh_interval and a selector function. The refreshInterval refresh_interval defines how frequently LEAN calls the selector function. The selector function receives a DateTime datetime object that represents the current Coordinated Universal Time (UTC) and returns a list of Symbol objects. The Symbol objects you return from the selector function are the Options of the universe.

    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(
        new OptionUniverseSelectionModel(
            TimeSpan.FromDays(1), 
            _ => new [] { QuantConnect.Symbol.Create("SPY", SecurityType.Option, Market.USA) }
        )
    );
    from Selection.OptionUniverseSelectionModel import OptionUniverseSelectionModel 
    
    self.universe_settings.asynchronous = True
    self.set_universe_selection(
        OptionUniverseSelectionModel(
            timedelta(1), lambda _: [Symbol.create("SPY", SecurityType.OPTION, Market.USA)]
        )
    )

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    refreshInterval refresh_interval TimeSpan timedelta Time interval between universe refreshes
    optionChainSymbolSelector option_chain_symbol_selector Func<DateTime, IEnumerable<Symbol>> Callable[[datetime], List[Symbol]] A function that selects the Option symbols
    universeSettings universe_settings UniverseSettings The universe settings . If you don't provide an argument, the model uses the algorithm.UniverseSettings algorithm.universe_settings by default. null None

    The following example shows how to define the Option chain Symbol selector as an isolated method:

    public override void Initialize()
    {
        AddUniverseSelection(
            new OptionUniverseSelectionModel(TimeSpan.FromDays(1), SelectOptionChainSymbols)
        );
    }
    
    private IEnumerable<Symbol> SelectOptionChainSymbols(DateTime utcTime)
    {
        // Equity Options example:
        //var tickers = new[] {"SPY", "QQQ", "TLT"};
        //return tickers.Select(ticker => QuantConnect.Symbol.Create(ticker, SecurityType.Option, Market.USA));
    
        // Index Options example:
        //var tickers = new[] {"VIX", "SPX"};
        //return tickers.Select(ticker => QuantConnect.Symbol.Create(ticker, SecurityType.IndexOption, Market.USA));
    
        // Future Options example:
        var futureSymbol = QuantConnect.Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME);
        var futureContractSymbols = FutureChainProvider.GetFutureContractList(futureSymbol, Time);
        foreach (var symbol in futureContractSymbols)
        {
            yield return QuantConnect.Symbol.CreateCanonicalOption(symbol);
        }
    }
    from Selection.OptionUniverseSelectionModel import OptionUniverseSelectionModel 
    
    def initialize(self) -> None:
        self.add_universe_selection(
            OptionUniverseSelectionModel(timedelta(days=1), self.select_option_chain_symbols)
        )
    
    def select_option_chain_symbols(self, utc_time: datetime) -> List[Symbol]:
        # Equity Options example:
        #tickers = ["SPY", "QQQ", "TLT"]
        #return [Symbol.create(ticker, SecurityType.OPTION, Market.USA) for ticker in tickers]
    
        # Index Options example:
        #tickers = ["VIX", "SPX"]
        #return [Symbol.create(ticker, SecurityType.INDEX_OPTION, Market.USA) for ticker in tickers]
    
        # Future Options example:
        future_symbol = Symbol.create(Futures.Indices.SP500E_MINI, SecurityType.FUTURE, Market.CME)
        future_contract_symbols = self.future_chain_provider.get_future_contract_list(future_symbol, self.time)
        return [Symbol.create_canonical_option(symbol) for symbol in future_contract_symbols]

    This model uses the default Option filter, which selects all of the available Option contracts at the current time step. To use a different filter for the contracts, subclass the OptionUniverseSelectionModel and define a Filter filter method. The Filter filter method accepts and returns an OptionFilterUniverse object to select the Option contracts. The following table describes the methods of the OptionFilterUniverse class:

    Method Description
    Strikes(int minStrike, int maxStrike) strikes(min_strike: int, max_strike: int) Selects contracts that are within minStrike m_strike strikes below the underlying price and maxStrike max_strike strikes above the underlying price
    CallsOnly() calls_only() Selects call contracts
    PutsOnly() puts_only() Selects put contracts
    StandardsOnly() standards_only() Selects standard contracts
    IncludeWeeklys() include_weeklys() Selects non-standard weeklys contracts
    WeeklysOnly() weeklys_only() Selects weekly contracts
    FrontMonth() front_month() Selects the front month contract
    BackMonths() back_months() Selects the non-front month contracts
    BackMonth() back_month() Selects the back month contracts
    Expiration(TimeSpan minExpiry, TimeSpan maxExpiry) expiration(min_expiry: timedelta, max_expiry: timedelta) Selects contracts that expire within a range of dates relative to the current day
    Expiration(int minExpiryDays, int maxExpiryDays) expiration(min_expiryDays: int, max_expiryDays: int) Selects contracts that expire within a range of dates relative to the current day
    Contracts(IEnumerable<Symbol> contracts) contracts(contracts: List[Symbol]) Selects a list of contracts
    Contracts(Func<IEnumerable<Symbol>, IEnumerable< Symbol>> contractSelector) contracts(contract_selector: Callable[[List[Symbol]], List[Symbol]]) Selects contracts that a selector function selects

    The contract filter runs at the first time step of each day.

    To move the Option chain Symbol selector outside of the algorithm class, create a universe selection model that inherits the OptionUniverseSelectionModel class.

    // In Initialize
    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(new EarliestExpiringAtTheMoneyCallOptionUniverseSelectionModel(this));
    
    // Outside of the algorithm class
    class EarliestExpiringAtTheMoneyCallOptionUniverseSelectionModel : OptionUniverseSelectionModel
    {
        public EarliestExpiringAtTheMoneyCallOptionUniverseSelectionModel(QCAlgorithm algorithm)
                : base(TimeSpan.FromDays(1), utcTime => SelectOptionChainSymbols(algorithm, utcTime)) {}
        
        private static IEnumerable<Symbol> SelectOptionChainSymbols(QCAlgorithm algorithm, DateTime utcTime)
        {
            // Equity Options example:
            //var tickers = new[] {"SPY", "QQQ", "TLT"};
            //return tickers.Select(ticker => QuantConnect.Symbol.Create(ticker, SecurityType.Option, Market.USA));
    
            // Index Options example:
            //var tickers = new[] {"VIX", "SPX"};
            //return tickers.Select(ticker => QuantConnect.Symbol.Create(ticker, SecurityType.IndexOption, Market.USA));
    
            // Future Options example:
            var futureSymbol = QuantConnect.Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME);
            var futureContractSymbols = algorithm.FutureChainProvider.GetFutureContractList(futureSymbol, algorithm.Time);
            foreach (var symbol in futureContractSymbols)
            {
                yield return QuantConnect.Symbol.CreateCanonicalOption(symbol);
            }
        }
    
        protected override OptionFilterUniverse Filter(OptionFilterUniverse filter)
        {
            return filter.Strikes(-1, -1).Expiration(0, 7).CallsOnly();
        }
    }
    
    # In initialize
    self.universe_settings.asynchronous = True
    self.add_universe_settings(EarliestExpiringAtTheMoneyCallOptionUniverseSelectionModel(self))
    
    # Outside of the algorithm class
    class EarliestExpiringAtTheMoneyCallOptionUniverseSelectionModel(OptionUniverseSelectionModel):
        def __init__(self, algorithm):
            self.algo = algorithm
            super().__init__(timedelta(1), self.select_option_chain_symbols)
        
        def select_option_chain_symbols(self, utc_time: datetime) -> List[Symbol]:
            # Equity Options example:
            #tickers = ["SPY", "QQQ", "TLT"]
            #return [Symbol.create(ticker, SecurityType.OPTION, Market.USA) for ticker in tickers]
    
            # Index Options example:
            #tickers = ["VIX", "SPX"]
            #return [Symbol.create(ticker, SecurityType.INDEX_OPTION, Market.USA) for ticker in tickers]
    
            # Future Options example:
            future_symbol = Symbol.create(Futures.Indices.SP500E_MINI, SecurityType.FUTURE, Market.CME)
            future_contract_symbols = self.algo.future_chain_provider.get_future_contract_list(future_symbol, self.algo.time)
            return [Symbol.create_canonical_option(symbol) for symbol in future_contract_symbols]
    
        def Filter(self, option_filter_universe: OptionFilterUniverse) -> OptionFilterUniverse:
            return option_filter_universe.strikes(-1, -1).expiration(0, 7).calls_only()

    Some of the preceding filter methods only set an internal enumeration in the OptionFilterUniverse that it uses later on in the filter process. This subset of filter methods don't immediately reduce the number of contract Symbol objects in the OptionFilterUniverse .

    To override the default pricing model of the Options, set a pricing model in a security initializer.

    To override the initial guess of implied volatility , set and warm up the underlying volatility model .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Option Chained Universe Selection

    An Option chained universe subscribes to Option contracts on the constituents of a US Equity universe .

    UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(
        new OptionChainedUniverseSelectionModel(
            AddUniverse(Universe.DollarVolume.Top(10)),
            optionFilterUniverse => optionFilterUniverse.Strikes(-2, +2).FrontMonth().CallsOnly()
        )
    );
    self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW
    self.universe_settings.asynchronous = True
    self.add_universe_selection(
        OptionChainedUniverseSelectionModel(
            self.add_universe(self.universe.dollar_volume.top(10)),
            lambda option_filter_universe: option_filter_universe.strikes(-2, +2).front_month().calls_only()
        )
    )

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    universe Universe The universe to chain onto the Option Universe Selection model
    optionFilter option_filter Func<OptionFilterUniverse, OptionFilterUniverse> Callable[[OptionFilterUniverse], OptionFilterUniverse] The Option filter universe to use
    universeSettings universe_settings UniverseSettings The universe settings . If you don't provide an argument, the model uses the algorithm.UniverseSettings algorithm.universe_settings by default. null None

    The optionFilter option_filter function receives and returns an OptionFilterUniverse to select the Option contracts. The following table describes the methods of the OptionFilterUniverse class:

    Method Description
    Strikes(int minStrike, int maxStrike) strikes(min_strike: int, max_strike: int) Selects contracts that are within minStrike m_strike strikes below the underlying price and maxStrike max_strike strikes above the underlying price
    CallsOnly() calls_only() Selects call contracts
    PutsOnly() puts_only() Selects put contracts
    StandardsOnly() standards_only() Selects standard contracts
    IncludeWeeklys() include_weeklys() Selects non-standard weeklys contracts
    WeeklysOnly() weeklys_only() Selects weekly contracts
    FrontMonth() front_month() Selects the front month contract
    BackMonths() back_months() Selects the non-front month contracts
    BackMonth() back_month() Selects the back month contracts
    Expiration(TimeSpan minExpiry, TimeSpan maxExpiry) expiration(min_expiry: timedelta, max_expiry: timedelta) Selects contracts that expire within a range of dates relative to the current day
    Expiration(int minExpiryDays, int maxExpiryDays) expiration(min_expiryDays: int, max_expiryDays: int) Selects contracts that expire within a range of dates relative to the current day
    Contracts(IEnumerable<Symbol> contracts) contracts(contracts: List[Symbol]) Selects a list of contracts
    Contracts(Func<IEnumerable<Symbol>, IEnumerable< Symbol>> contractSelector) contracts(contract_selector: Callable[[List[Symbol]], List[Symbol]]) Selects contracts that a selector function selects

    The following example shows how to define the Option filter as an isolated method:

    public override void Initialize()
    {
        UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
        UniverseSettings.Asynchronous = true;
        AddUniverseSelection(
            new OptionChainedUniverseSelectionModel(
                AddUniverse(Universe.DollarVolume.Top(10)), OptionFilterFunction
            )
        );
    }
    
    private OptionFilterUniverse OptionFilterFunction(OptionFilterUniverse optionFilterUniverse)
    {
        return optionFilterUniverse.Strikes(-2, +2).FrontMonth().CallsOnly();
    }
    def initialize(self) -> None:
        self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW
        self.universe_settings.asynchronous = True
        self.add_universe_selection(
            OptionChainedUniverseSelectionModel(
                self.add_universe(self.universe.dollar_volume.top(10)), self.option_filter_function
            )
        )
    
    def option_filter_function(self, option_filter_universe: OptionFilterUniverse) -> OptionFilterUniverse:
        return option_filter_universe.strikes(-2, +2).front_month().calls_only()

    Some of the preceding filter methods only set an internal enumeration in the OptionFilterUniverse that it uses later on in the filter process. This subset of filter methods don't immediately reduce the number of contract Symbol objects in the OptionFilterUniverse .

    To view the implementation of this model, see the LEAN GitHub repository .

    Example

    The following example chains a fundamental universe and an Equity Options universe . It first selects 10 stocks with the lowest PE ratio and then selects their front-month call Option contracts. It buys one front-month call Option contract every day.

    To override the default pricing model of the Options, set a pricing model in a security initializer.

    To override the initial guess of implied volatility , set and warm up the underlying volatility model .

    using QuantConnect.Data;
    using QuantConnect.Data.Fundamental;
    using QuantConnect.Data.UniverseSelection;
    using QuantConnect.Securities;
    using QuantConnect.Securities.Option;
    using QuantConnect.Util;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    namespace QuantConnect.Algorithm.CSharp
    {
        public class ETFUniverseOptions : QCAlgorithm
        {
            private int _day;
            public override void Initialize()
            {
                SetStartDate(2023, 2, 2);
                SetCash(100000);
                UniverseSettings.Asynchronous = true;
                UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
                SetSecurityInitializer(new CustomSecurityInitializer(this));
    
                var universe = AddUniverse(FundamentalFunction);
                AddUniverseOptions(universe, OptionFilterFunction);
            }
    
            private IEnumerable&ltSymbol&gt FundamentalFunction(IEnumerable&ltFundamental&gt fundamental)
            {
                return fundamental
                    .Where(f =&gt !double.IsNaN(f.ValuationRatios.PERatio))
                    .OrderBy(f =&gt f.ValuationRatios.PERatio)
                    .Take(10)
                    .Select(x =&gt x.Symbol);
            }
    
            private OptionFilterUniverse OptionFilterFunction(OptionFilterUniverse optionFilterUniverse)
            {
                return optionFilterUniverse.Strikes(-2, +2).FrontMonth().CallsOnly();
            }
    
            public override void OnData(Slice data)
            {
                if (IsWarmingUp || _day == Time.Day) return;
    
                foreach (var (symbol, chain) in data.OptionChains)
                {
                    if (Portfolio[chain.Underlying.Symbol].Invested)
                        Liquidate(chain.Underlying.Symbol);
    
                    var spot = chain.Underlying.Price;
                    var contract = chain.OrderBy(x =&gt Math.Abs(spot-x.Strike)).FirstOrDefault();
                    var tag = $"IV: {contract.ImpliedVolatility:F3} Δ: {contract.Greeks.Delta:F3}";
                    MarketOrder(contract.Symbol, 1, true, tag);
                    _day = Time.Day;
                }
            }
        }
    
        internal class CustomSecurityInitializer : BrokerageModelSecurityInitializer
        {
            private QCAlgorithm _algorithm;
            public CustomSecurityInitializer(QCAlgorithm algorithm)
                : base(algorithm.BrokerageModel, new FuncSecuritySeeder(algorithm.GetLastKnownPrices))
            {
                _algorithm = algorithm;
            }    
        
            public override void Initialize(Security security)
            {
                // First, call the superclass definition
                // This method sets the reality models of each security using the default reality models of the brokerage model
                base.Initialize(security);
    
                // Next, overwrite the price model        
                if (security.Type == SecurityType.Option) // Option type
                {
                    (security as Option).PriceModel = OptionPriceModels.CrankNicolsonFD();
                }
    
                // Overwrite the volatility model and warm it up
                if (security.Type == SecurityType.Equity)
                {
                    security.VolatilityModel = new StandardDeviationOfReturnsVolatilityModel(30);
                    var tradeBars = _algorithm.History(security.Symbol, 30, Resolution.Daily);
                    foreach (var tradeBar in tradeBars)
                        security.VolatilityModel.Update(security, tradeBar);
                }    
            }
        }
    }
    from AlgorithmImports import *
    
        class ChainedUniverseAlgorithm(QCAlgorithm):
        def initialize(self):
            self.set_start_date(2023, 2, 2)
            self.set_cash(100000)
            self.universe_settings.asynchronous = True
            self.universe_settings.data_normalization_mode = DataNormalizationMode.RAW
            self.set_security_initializer(CustomSecurityInitializer(self))
    
            universe = self.add_universe(self.fundamental_function)
            self.add_universe_options(universe, self.option_filter_function)
            self.day = 0
    
        def fundamental_function(self, fundamental: List[Fundamental]) -&gt List[Symbol]:
            filtered = (f for f in fundamental if not np.isnan(f.valuation_ratios.pe_ratio))
            sorted_by_pe_ratio = sorted(filtered, key=lambda f: f.valuation_ratios.pe_ratio)
            return [f.symbol for f in sorted_by_pe_ratio[:10]]
    
        def option_filter_function(self, option_filter_universe: OptionFilterUniverse) -&gt OptionFilterUniverse:
            return option_filter_universe.strikes(-2, +2).front_month().calls_only()
    
        def on_data(self, data: Slice) -&gt None:
            if self.is_warming_up or self.day == self.time.day:
                return
            
            for symbol, chain in data.option_chains.items():
                if self.portfolio[chain.underlying.symbol].invested:
                    self.liquidate(chain.underlying.symbol)
    
                spot = chain.underlying.price
                contract = sorted(chain, key=lambda x: abs(spot-x.strike))[0]
                tag = f"IV: {contract.implied_volatility:.3f} Δ: {contract.greeks.delta:.3f}"
                self.market_order(contract.symbol, 1, True, tag)
                self.day = self.time.day
    
    class CustomSecurityInitializer(BrokerageModelSecurityInitializer):
        def __init__(self, algorithm: QCAlgorithm) -&gt None:
            super().__init__(algorithm.brokerage_model, FuncSecuritySeeder(algorithm.get_last_known_prices))
            self.algorithm = algorithm
    
        def initialize(self, security: Security) -&gt None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Overwrite the price model        
            if security.type == SecurityType.OPTION: # Option type
                security.price_model = OptionPriceModels.crank_nicolson_fd()
    
            # Overwrite the volatility model and warm it up
            if security.type == SecurityType.EQUITY:
                security.volatility_model = StandardDeviationOfReturnsVolatilityModel(30)
                trade_bars = self.algorithm.history[TradeBar](security.symbol, 30, Resolution.DAILY)
                for trade_bar in trade_bars:
                    security.volatility_model.update(security, trade_bar)

     

    Universe Selection

    Legacy Fundamental Universes

    Introduction

    Warning: This API for Universe Selection was deprecated on November 2023. Please refer to the new Fundamental Selection API .

    A FundamentalUniverseSelectionModel selects a universe of US Equities based on CoarseFundamental and, sometimes, FineFundamental data. If the model uses CoarseFundamental data, it relies on the US Equity Coarse Universe dataset. If the Universe Selection model uses FineFundamental data, it relies on the US Fundamental dataset.

    These types of universes operate on daily schedule. In backtests, they select assets at midnight. In live trading, the selection timing depends on the data provider you use.

    If you use a fundamental Universe Selection model, the only way to unsubscribe from a security is to return a list from the selection functions that doesn't include the security Symbol . The RemoveSecurity remove_security method doesn't work with these types of Universe Selection models.

    Coarse Fundamental Selection

    The CoarseFundamentalUniverseSelectionModel selects assets based on CoarseFundamental data. To use this model, define a coarse selection function. The coarse selection function receives a list of CoarseFundamental objects and returns a list of Symbol objects. The Symbol objects you return from the coarse selection function are the constituents of the universe.

    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;
        AddUniverseSelection(new CoarseFundamentalUniverseSelectionModel(SelectCoarse));
    }
    
    private IEnumerable<Symbol> SelectCoarse(IEnumerable<CoarseFundamental> coarse)
    {
        // Return most liquid assets w/ fundamentals
        return coarse.Where(c => c.HasFundamentalData)
                     .OrderByDescending(c => c.DollarVolume)
                     .Take(100)
                     .Select(c => c.Symbol);
    }
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self.add_universe_selection(CoarseFundamentalUniverseSelectionModel(self.select_coarse))
    
    def select_coarse(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
        selected = [c for c in coarse if c.has_fundamental_data]
        sorted_by_dollar_volume = sorted(selected, key=lambda c: c.dollar_volume, reverse=True)
        return [c.symbol for c in sorted_by_dollar_volume[:100]] # Return most liquid assets w/ fundamentals

    To move the coarse selection function outside of the algorithm class, create a universe selection model that inherits the CoarseFundamentalUniverseSelectionModel class.

    // In Initialize
    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(new MostLiquidFundamentalUniverseSelectionModel(UniverseSettings));
    
    // Outside of the algorithm class
    class MostLiquidFundamentalUniverseSelectionModel : CoarseFundamentalUniverseSelectionModel
    {
        public MostLiquidFundamentalUniverseSelectionModel(UniverseSettings universeSettings)
            : base(default(Func<IEnumerable<CoarseFundamental>, IEnumerable<Symbol>>), universeSettings)
        {
        }
    
        public override IEnumerable<Symbol> SelectCoarse(QCAlgorithm algorithm, IEnumerable<CoarseFundamental> coarse)
        {
            return coarse.Where(c => c.HasFundamentalData)
                         .OrderByDescending(c => c.DollarVolume)
                         .Take(100)
                         .Select(c => c.Symbol);
        }
    }
    # In Initialize
    self.universe_settings.asynchronous = True
    self.add_universe_selection(MostLiquidFundamentalUniverseSelectionModel(self.universe_settings))
    
    # Outside of the algorithm class
    class MostLiquidFundamentalUniverseSelectionModel(CoarseFundamentalUniverseSelectionModel):
        def __init__(self, universe_settings: UniverseSettings) -> None:
            super().__init__(self.select_coarse, universe_settings)
    
        def select_coarse(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
            selected = [c for c in coarse if c.has_fundamental_data]
            sorted_by_dollar_volume = sorted(selected, key=lambda c: c.dollar_volume, reverse=True)
            return [c.symbol for c in sorted_by_dollar_volume[:100]]

    To return the current universe constituents from the coarse selection function, return Universe.Unchanged .

    To view the implementation of this model, see the LEAN GitHub repository .

    Fine Fundamental Selection

    The FineFundamentalUniverseSelectionModel selects assets based on CoarseFundamental and FineFundamental data. This is the only model that provides corporate fundamental data to your algorithm. To use this model, define a coarse selection function and a fine selection function. The coarse selection function receives a list of CoarseFundamental objects and returns a list of Symbol objects. To filter the CoarseFundamental down to the securities that have fundamental data, add a HasFundamentalData has_fundamental_data filter to the coarse selection function. The fine selection function receives a subset of FineFundamental objects generated from coarse selection results and returns a list of Symbol objects. The Symbol objects you return from the fine selection function are the constituents of the universe.

    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;
        AddUniverseSelection(new FineFundamentalUniverseSelectionModel(SelectCoarse, SelectFine));
    }
    
    private IEnumerable<Symbol> SelectCoarse(IEnumerable<CoarseFundamental> coarse)
    {
        // Return most liquid assets w/ fundamentals
        return coarse.Where(c => c.HasFundamentalData)
                     .OrderByDescending(c => c.DollarVolume)
                     .Take(100)
                     .Select(c => c.Symbol);
    }
    
    private IEnumerable<Symbol> SelectFine(IEnumerable<FineFundamental> fine)
    {
        // Return assets with lowest P/E ratios
        return fine.OrderBy(f => f.ValuationRatios.PERatio)
                   .Take(10)
                   .Select(f => f.Symbol);
    }
    
    def initialize(self) -> None:
        self.universe_settings.asynchronous = True
        self.add_universe_selection(FineFundamentalUniverseSelectionModel(self.select_coarse, self.select_fine))
    
    def select_coarse(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
        selected = [c for c in coarse if c.has_fundamental_data]
        sorted_by_dollar_volume = sorted(selected, key=lambda c: c.dollar_volume, reverse=True)
        return [c.symbol for c in sorted_by_dollar_volume[:100]] # Return most liquid assets w/ fundamentals
    
    def select_fine(self, fine: List[FineFundamental]) -> List[Symbol]:
        sorted_by_pe_ratio = sorted(fine, key=lambda x: x.valuation_ratios.pe_ratio, reverse=False)
        return [c.symbol for c in sorted_by_pe_ratio[:10]] # Return assets with lowest P/E ratios

    To move the selection functions outside of the algorithm class, create a universe selection model that inherits the FineFundamentalUniverseSelectionModel class.

    // In Initialize
    UniverseSettings.Asynchronous = true;
    AddUniverseSelection(new LowPERatioUniverseSelectionModel(UniverseSettings));
    
    // Outside of the algorithm class
    class LowPERatioUniverseSelectionModel : FineFundamentalUniverseSelectionModel
    {
        public LowPERatioUniverseSelectionModel(UniverseSettings universeSettings = null)
            : base(default(Func<IEnumerable<CoarseFundamental>, IEnumerable<Symbol>>), 
                   default(Func<IEnumerable<FineFundamental>, IEnumerable<Symbol>>),
                   universeSettings)
        {
        }
    
        public override IEnumerable<Symbol> SelectCoarse(QCAlgorithm algorithm, IEnumerable<CoarseFundamental> coarse)
        {
            return coarse.Where(c => c.HasFundamentalData)
                         .OrderByDescending(c => c.DollarVolume)
                         .Take(100)
                         .Select(c => c.Symbol);
        }
    
        public override IEnumerable<Symbol> SelectFine(QCAlgorithm algorithm, IEnumerable<FineFundamental> fine)
        {
            return fine.OrderBy(f => f.ValuationRatios.PERatio)
                       .Take(10)
                       .Select(f => f.Symbol);
        }
    }
    # In Initialize
    self.universe_settings.asynchronous = True
    self.add_universe_selection(LowPERatioUniverseSelectionModel(self.universe_settings))
    
    # Outside of the algorithm class
    class LowPERatioUniverseSelectionModel(FineFundamentalUniverseSelectionModel):
        def __init__(self, universe_settings: universe_settings = None) -> None:
            super().__init__(self.select_coarse, self.select_fine, universe_settings)
    
        def select_coarse(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
            selected = [c for c in coarse if c.has_fundamental_data]
            sorted_by_dollar_volume = sorted(selected, key=lambda c: c.dollar_volume, reverse=True)
            return [c.symbol for c in sorted_by_dollar_volume[:100]]
    
        def select_fine(self, fine: List[FineFundamental]) -> List[Symbol]:
            sorted_by_pe_ratio = sorted(fine, key=lambda x: x.valuation_ratios.pe_ratio, reverse=False)
            return [c.symbol for c in sorted_by_pe_ratio[:10]]

    To return the current universe constituents from the coarse or fine selection function, return Universe. Unchanged UNCHANGED .

    If you add a FineFundamentalUniverseSelectionModel to your algorithm, you can access fundamental data in the fine selection function or from the Equity object. To access fundamental data from the Equity object, use the Equity. Fundamentals fundamentals property.

    To view the implementation of this model, see the LEAN GitHub repository .

     

    Algorithm Framework

    Alpha

    Alpha

    Key Concepts

    Introduction

    The Alpha model predicts market trends and signals the best moments to trade. These signals, or Insight objects, contain the Direction , Magnitude , and Confidence of a market prediction and the suggested portfolio Weight . You should generate insights on the set of assets provided by the Universe Selection model and only generate them when your predictions change.

    Add Models

    To add an Alpha model, in the Initialize initialize method, call the AddAlpha method.

    AddAlpha(new EmaCrossAlphaModel());
    self.add_alpha(EmaCrossAlphaModel())

    To view all the pre-built Alpha models, see Supported Models .

    Multi-Alpha Algorithms

    You can add multiple Alpha models to a single algorithm and generate Insight objects with all of them.

    AddAlpha(new RsiAlphaModel());
    AddAlpha(new EmaCrossAlphaModel());
    self.add_alpha(RsiAlphaModel())
    self.add_alpha(EmaCrossAlphaModel())

    Each Alpha model has a unique name. The Insight objects they generate are automatically named according to the Alpha model name.

    If you add multiple Alpha models, each alpha model receives the current slice in the order that you add the Alphas. The combined stream of Insight objects is passed to the Portfolio Construction model that defines how the Insight collection is combined. If you have a hybrid algorithm, the combined stream of Insight objects is passed to the event handler .

    Model Structure

    Alpha models should extend the AlphaModel class. Extensions of the AlphaModel class must implement the Update update method, which receives a Slice object and returns an array of Insight objects. Extensions should also implement the OnSecuritiesChanged on_securities_changed method to track security changes in the universe.

    // Algorithm framework model that produces insights
    class MyAlphaModel : AlphaModel
    {
        // Updates this Alpha model with the latest data from the algorithm.
        // This is called each time the algorithm receives data for subscribed securities
        public override IEnumerable<Insight> Update(QCAlgorithm algorithm, Slice data) 
        {
            var insights = new List<Insight>();
            return insights;
        }
    
        public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes) 
        {
            // Security additions and removals are pushed here.
            // This can be used for setting up algorithm state.
            // changes.AddedSecurities
            // changes.RemovedSecurities
        }
    }
    # Algorithm framework model that produces insights
    class MyAlphaModel(AlphaModel):
    
        def update(self, algorithm: QCAlgorithm, data: Slice) -> List[Insight]:
            # Updates this Alpha model with the latest data from the algorithm.
            # This is called each time the algorithm receives data for subscribed securities
            # Generate insights on the securities in the universe.
            insights = []
            return insights
    
        def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
            # Security additions and removals are pushed here.
            # This can be used for setting up algorithm state.
            # changes.added_securities
            # changes.removed_securities
            pass

    Method Parameters

    The algorithm parameter that the methods receive is an instance of the base QCAlgorithm class, not your subclass of it. To access members of your algorithm object, either use a global variable or pass an algorithm reference to Alpha model constructor. Both of these approaches violate the separation of concerns principle.

    The data parameter contains the latest data available to the algorithm.

    The changes parameter contains the universe changes.

    Model Names

    To ensure your Alpha model is compatible with all Portfolio Construction models , assign a unique name to your Alpha model. Some Portfolio Construction models can combine multiple Alpha models together, so it can be important to distinguish between the Alpha models.

    public class RsiAlphaModel : AlphaModel
    {
        // Give your alpha a name (perhaps based on its constructor args?)
        public override string Name { get; }
    }

    By default, LEAN uses the string representation of a Guid object to set the Alpha model name. An example default name is "0f8fad5b-d9cb-469f-a165-70867728950e". This default name is different for every backtest you run and every live algorithm you deploy. For consistent behavior, manually set the Alpha model name.

    Example

    To view a full example of an AlphaModel subclass, see the ConstantAlphaModel ConstantAlphaModel in the LEAN GitHub repository.

    Track Security Changes

    The Universe Selection model may select a dynamic universe of assets, so you should not assume a fixed set of assets in the Alpha model. When the Universe Selection model adds and removes assets from the universe, it triggers an OnSecuritiesChanged on_securities_changed event. In the OnSecuritiesChanged on_securities_changed event handler, you can initialize the security-specific state or load any history required for your Alpha model. If you need to save data for individual securities, add custom members to the respective Security object cast the Security object to a dynamic object and then save custom members to it .

    class MyAlphaModel : AlphaModel
    {
        private List<Security> _securities = new List<Security>();
        
        public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes) {
            foreach (var security in changes.AddedSecurities)
            {               
                var dynamicSecurity = security as dynamic;
                dynamicSecurity.Sma = SMA(security.Symbol, 20);
                algorithm.WarmUpIndicator(security.Symbol, dynamicSecurity.Sma);
                _securities.Add(security);
            }
    
            foreach (var security in changes.RemovedSecurities)
            {
                if (_securities.Contains(security))
                {
                    algorithm.DeregisterIndicator((security as dynamic).Sma);
                    _securities.Remove(security);
                }
            }
        }
    }
    class MyAlphaModel(AlphaModel):
        securities = []
    
        def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
            for security in changes.added_securities::
                security.indicator = algorithm.SMA(security.symbol, 20)
                algorithm.warm_up_indicator(security.symbol, security.indicator)
                self.securities.append(security)
    
            for security in changes.removed_securities:
                if security in self.securities:
                    algorithm.deregister_indicator(security.indicator)
                    self.securities.remove(security)

    Insights

    An Insight is a single prediction for an asset. The Update update method returns an array of Insight objects. You can think of these as actionable trading signals, indicating the asset direction, magnitude, and confidence in the near future. All insights can take a weight parameter to set the desired weighting for the insight. If you change the cash of the algorithm, it will affect the orders, but not necessarily the insights.

    The Portfolio Construction model consumes the Insight objects from the Alpha model. It's up to the Portfolio Construction model to define how Insight objects are converted into PortfolioTarget objects. In the pre-built Portfolio Construction models, down insights translate to short-biased trades, up insights translate to long-biased trades, and flat insights usually close open positions, but this doesn't have to be the case in custom Portfolio Construction models .

    Insight Properties

    Insight objects have the following properties:

    Create Insights

    To create an Insight , call the Insight constructor.

    # Insight(symbol, period, type, direction, magnitude=None, confidence=None, source_model=None, weight=None, tag='')
    insight = Insight("IBM", timedelta(minutes=20), InsightType.PRICE, InsightDirection.UP)
    // new Insight(symbol, period, type, direction, magnitude=null, confidence=null, sourceModel=null, weight=null, tag="");
    var insight = new Insight("IBM", TimeSpan.FromMinutes(20), InsightType.Price, InsightDirection.Up);

    In the Insight constructor, the period argument can be a timedelta TimeSpan object or a function that receives a DateTime datetime object and returns the expiry DateTime datetime . Some of the constructor arguments are optional to create the Insight object, but some of the Portfolio Construction models may require these properties. To check which Insight properties a Portfolio Construction model requires, see Supported Models .

    You can also use the helper method to create Insight objects of the Price type.

    # Insight.price(symbol, period, direction, magnitude=None, confidence=None, source_model=None, weight=None, tag='') 
    insight = Insight.price("IBM", timedelta(minutes = 20), InsightDirection.UP)
    
    # Insight.price(symbol, resolution, barCount, direction, magnitude=None, confidence=None, source_model=None, weight=None, tag='') 
    insight = Insight.price("IBM", Resolution.MINUTE, 20, InsightDirection.UP)
    // new Insight(symbol, period, direction, magnitude=null, confidence=null, sourceModel=null, weight=null, tag="")
    var insight = Insight.Price("IBM", TimeSpan.FromMinutes(20), InsightDirection.Up);
    
    // new Insight(symbol, resolution, barCount, direction, magnitude=null, confidence=null, sourceModel=null, weight=null, tag="")
    var insight = Insight.Price("IBM", Resolution.Minute, 20, InsightDirection.Up);

    In the Price price method, the period argument can be a timedelta TimeSpan object, a DateTime datetime object, or a function that receives a DateTime datetime object and returns the expiry DateTime datetime .

    Group Insights

    Sometimes an algorithm's performance relies on multiple insights being traded together, like in pairs trading and options straddles. These types insights should be grouped. Insight groups signal to the Execution model that the insights need to be acted on as a single unit to maximize the alpha created.

    To mark insights as a group, call the Insight.Group method.

    return Insight.Group(
    	Insight.price("IBM", TimeSpan.FromMinutes(20), InsightDirection.UP), 
    	Insight.price("SPY", TimeSpan.FromMinutes(20), InsightDirection.UP), 
    	Insight.price("AAPL", TimeSpan.FromMinutes(20), InsightDirection.UP)
    );
    tickers = ["IBM", "SPY", "AAPL"]
    insights = [Insight.price(ticker, timedelta(minutes = 20), InsightDirection.UP) for ticker in tickers]
    return Insight.group(insights)
    

    Cancel Insights

    If an Alpha model in your algorithm emits an Insight to enter a position but it determines the trading opportunity has pre-maturely ended, you should cancel the Insight. For example, say you want your algorithm to enter a long position in a security when its Relative Strength Index (RSI) moves below 20 and then liquidate the position when the security's RSI moves above 30. If you emit an Insight that has a duration of 30 days when the RSI moves below 20 but the RSI moves above 30 in 10 days, you should cancel the Insight.

    To cancel an Insight, call its Cancel cancel / Expire method with the algorithm's Coordinated Universal Time (UTC).

    self.insight.cancel(algorithm.utc_time)
    _insight.Cancel(algorithm.UtcTime);

    If you don't have a reference to the Insight you want to cancel, get it from the InsightManager .

    When you cancel an insight, it's CloseTimeUtc close_time_utc property is set to one second into the past.

    Stop Loss Orders Workaround

    In some cases, if you add a Risk Management model that uses stop loss logic, the Risk Management model generates PortfolioTarget objects with a 0 quantity to make the Execution model liquidate your positions, but then the Portfolio Construction model generates PortfolioTarget objects with a non-zero quantity to make the Execution model re-enter the same position. This issue can occur if your Portfolio Construction model rebalances and your Alpha model still has an active insight for the liquidated securities. To avoid this issue, add the stop loss order logic to the Alpha model. When the stop loss is hit, emit a flat insight for the security. Note that this is a workaround, but it violates the separation of concerns principle since the Alpha Model shouldn't react to open positions.

    Universe Timing Considerations

    If the Alpha model manages some indicators or consolidators for securities in the universe and the universe selection runs during the indicator sampling period or the consolidator aggregation period, the indicators and consolidators might be missing some data. For example, take the following scenario:

    In this scenario, you create and warm-up the indicator at noon. Since it runs at noon, the history request that gathers daily data to warm up the indicator won't contain any data from the current day and the consolidator that updates the indicator also won't aggregate any data from before noon. This process doesn't cause issues if the indicator only uses the close price to calculate the indicator value (like the simple moving average indicator) because the first consolidated bar that updates the indicator will have the correct close price. However, if the indicator uses more than just the close price to calculate its value (like the True Range indicator), the open, high, and low values of the first consolidated bar may be incorrect, causing the initial indicator values to be incorrect.

     

    Alpha

    Supported Models

    Introduction

    This page describes the pre-built Alpha models in LEAN. The number of models grows over time. To add a model to LEAN, make a pull request to the GitHub repository . If none of these models perform exactly how you want, create a custom Alpha model .

    Null Model

    The NullAlphaModel doesn't emit any insights. It's the default Alpha model.

    AddAlpha(new NullAlphaModel());
    self.add_alpha(NullAlphaModel())

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Constant Model

    The ConstantAlphaModel always returns the same insight for each security.

    AddAlpha(new ConstantAlphaModel(InsightType.Price, InsightDirection.Up, TimeSpan.FromDays(30)));
    self.add_alpha(ConstantAlphaModel(InsightType.PRICE, InsightDirection.UP, timedelta(30)))

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    type InsightType The type of insight
    direction InsightDirection The direction of the insight
    period TimeSpan timedelta The period over which the insight will come to fruition
    magnitude double? float/NoneType The predicted change in magnitude as a +/- percentage null None
    confidence double? float/NoneType The confidence in the insight null None
    weight double? float/NoneType The portfolio weight of the insights null None

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Historical Returns Model

    The HistoricalReturnsAlphaModel buys securities that have a positive trailing return and sells securities that have a negative trailing return. It sets the magnitude of the Insight objects to the trailing rate of change.

    AddAlpha(new HistoricalReturnsAlphaModel());
    self.add_alpha(HistoricalReturnsAlphaModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    lookback int Historical return lookback period 1
    resolution Resolution The resolution of historical data Resolution.Daily Resolution.DAILY

    This model cancels all the active insights it has emit for a security when the security has a 0% historical return.

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    EMA Cross Model

    The EmaCrossAlphaModel uses an exponential moving average (EMA) cross to create insights. When the fast EMA crosses above the slow EMA, it emits up insights. When the fast EMA crosses below the slow EMA, it emits down insights. It sets the duration of Insight objects to be the product of the resolution and fastPeriod fast_period arguments.

    AddAlpha(new EmaCrossAlphaModel());
    self.add_alpha(EmaCrossAlphaModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    fastPeriod fast_period int The fast EMA period 12
    slowPeriod slow_period int The slow EMA period 26
    resolution Resolution The resolution of data sent into the EMA indicators Resolution.Daily Resolution.DAILY

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    MACD Model

    The MacdAlphaModel emits insights based on moving average convergence divergence (MACD) crossovers. If the MACD signal line is 1% above the security price, the model emits an up insight. If the MACD signal line is 1% below the security price, the model emits a down insight. If the MACD signal line is within 1% of the security price, the model cancels all the active insights it has emitted for the security.

    AddAlpha(new MacdAlphaModel());
    self.add_alpha(MacdAlphaModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    fastPeriod fast_period int The MACD fast period 12
    slowPeriod slow_period int The MACD slow period 26
    signalPeriod signal_period int The smoothing period for the MACD signal 9
    movingAverageType moving_average_type MovingAverageType The type of moving average to use in the MACD MovingAverageType. Exponential EXPONENTIAL
    resolution Resolution The resolution of data sent into the MACD indicator Resolution.Daily Resolution.DAILY

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    RSI Model

    The RsiAlphaModel generates insights based on the relative strength index (RSI) indicator values. When the RSI value passes above 70, the model emits a down insight. When the RSI value passes below 30, the model emits an up insight. The model uses the Wilder moving average type and sets the duration of Insight objects to be the product of the resolution and period arguments.

    AddAlpha(new RsiAlphaModel());
    self.add_alpha(RsiAlphaModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    period int The RSI indicator period 14
    resolution Resolution The resolution of data sent into the RSI indicator Resolution.Daily Resolution.DAILY

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Base Pairs Trading Model

    The BasePairsTradingAlphaModel analyzes every possible pair combination from securities that the Universe Selection model selects. This model calculates a ratio between the two securities by dividing their historical prices over a lookback window. It then calculates the mean of this ratio by taking the 500-period EMA of the quotient. When the ratio diverges far enough from the mean ratio, this model emits generates alternating long ratio/short ratio insights emitted as a group to capture the reversion of the ratio.

    AddAlpha(new BasePairsTradingAlphaModel());
    self.add_alpha(BasePairsTradingAlphaModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    lookback int Lookback period of the analysis 1
    resolution Resolution Analysis resolution Resolution.Daily Resolution.DAILY
    threshold decimal float The percent [0, 100] deviation of the ratio from the mean before emitting an insight 1

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Pearson Correlation Pairs Trading Model

    The PearsonCorrelationPairsTradingAlphaModel ranks every pair combination by its Pearson correlation coefficient and trades the pair with the highest correlation. This model follows the same insight logic as the BasePairsTradingModel .

    AddAlpha(new PearsonCorrelationPairsTradingAlphaModel());
    self.add_alpha(PearsonCorrelationPairsTradingAlphaModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    lookback int Lookback period of the analysis 15
    resolution Resolution Analysis resolution Resolution.Minute Resolution.MINUTE
    threshold decimal float The percent [0, 100] deviation of the ratio from the mean before emitting an insight 1
    minimumCorrelation minimum_correlation double float The minimum correlation to consider a tradable pair 0.5

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

     

    Algorithm Framework

    Portfolio Construction

    Portfolio Construction

    Key Concepts

    Introduction

    The Portfolio Construction model receives Insight objects from the Alpha model and creates PortfolioTarget objects for the Risk Management model. A PortfolioTarget provides the number of units of an asset to hold.

    Set Models

    To set a Portfolio Construction model, in the Initialize initialize method, call the SetPortfolioConstruction method.

    SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel());
    self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())

    To view all the pre-built Portfolio Construction models, see Supported Models .

    Model Structure

    Portfolio Construction models should extend the PortfolioConstructionModel class or one of the supported models . Extensions of the PortfolioConstructionModel class should implement the CreateTargets create_targets method, which receives an array of Insight objects from the Alpha model at every time step and returns an array of PortfolioTarget objects. The Portfolio Construction model seeks to answer the question, "how many units should I buy based on the insight predictions I've been presented?".

    If you don't override the CreateTargets create_targets method, the base class implementation calls the model's IsRebalanceDue is_rebalance_due , DetermineTargetPercent determine_target_percent , and GetTargetInsights get_target_insights helper methods. The GetTargetInsights get_target_insights method, in turn, calls the model's ShouldCreateTargetForInsight should_create_target_for_insight method. You can override any of these helper methods. If you don't override the CreateTargets create_targets method from the PortfolioConstructionModel class, your class must at least override the DetermineTargetPercent determine_target_percent method.

    // Portfolio construction scaffolding class; basic method args.
    class MyPortfolioConstructionModel : PortfolioConstructionModel
    {
        // Create list of PortfolioTarget objects from Insights
        public override List<PortfolioTarget> CreateTargets(QCAlgorithm algorithm, Insight[] insights)
        {
            return base.CreateTargets(algorithm, insights);
        }
        
        // Determines if the portfolio should rebalance based on the provided rebalancing func
        protected virtual bool IsRebalanceDue(Insight[] insights, DateTime algorithmUtc) 
        {
            return base.IsRebalanceDue(insights, algorithmUtc);
        }
        
        // Determines the target percent for each insight
        protected override Dictionary<Insight, double> DetermineTargetPercent(List<Insight> activeInsights)
        {
            return new Dictionary<Insight, double>();
        }
    
        // Gets the target insights to calculate a portfolio target percent for, they will be piped to DetermineTargetPercent()
        protected override List<Insight> GetTargetInsights()
        {
            return base.GetTargetInsights();
        }
    
        // Determine if the portfolio construction model should create a target for this insight
        protected override bool ShouldCreateTargetForInsight(Insight insight)
        {
            return base.ShouldCreateTargetForInsight(insight);
        }
    
        // Security change details
        public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
        {
            return base.OnSecuritiesChanged(algorithm, changes);
        }
    }
     # Portfolio construction scaffolding class; basic method args.
    class MyPortfolioConstructionModel(PortfolioConstructionModel):
        # Create list of PortfolioTarget objects from Insights
        def create_targets(self, algorithm: QCAlgorithm, insights: List[Insight]) -> List[PortfolioTarget]:
            return super().create_targets(algorithm, insights)
    	
        # Determines if the portfolio should rebalance based on the provided rebalancing func
        def is_rebalance_due(self, insights: List[Insight], algorithmUtc: datetime) -> bool:
            return super().is_rebalance_due(insights, algorithmUtc)
    
        # Determines the target percent for each insight
        def determine_target_percent(self, activeInsights: List[Insight]) -> Dict[Insight, float]:
            return {}
    
        # Gets the target insights to calculate a portfolio target percent for, they will be piped to DetermineTargetPercent()
        def get_target_insights(self) -> List[Insight]:
            return super().get_target_insights()
    
        # Determine if the portfolio construction model should create a target for this insight
        def should_create_target_for_insight(self, insight: Insight) -> bool:
            return super().should_create_target_for_insight(insight)
    
        # Security change details
        def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
            super().on_securities_changed(algorithm, changes)
    

    The Portfolio Construction model should remove expired insights from the Insight Manager . The CreateTargets create_targets definition of the base PortfolioConstructionModel class already removes them during each rebalance. Therefore, if you override the CreateTargets create_targets method and don't call the CreateTargets create_targets definition of the base class, your new method definition should remove expired insights from the Insight Manager.

    The model should also remove all a security's insights from the Insight Manager when the security is removed from the universe . The OnSecuritiesChanged on_securities_changed definition of the base PortfolioConstructionModel class already does this. Therefore, if you override the OnSecuritiesChanged on_securities_changed method and don't call the OnSecuritiesChanged on_securities_changed definition of the base class, your new method definition should remove the security's insights from the Insight Manager.

    The algorithm argument that the methods receive is an instance of the base QCAlgorithm class, not your subclass of it.

    You may use the PortfolioBias enumeration in the definition of Portfolio Construction model methods. The PortfolioBias enumeration has the following members:

    To view a full example of a PortfolioConstructionModel subclass, see the EqualWeightingPortfolioConstructionModel EqualWeightingPortfolioConstructionModel in the LEAN GitHub repository.

    Multi-Alpha Algorithms

    If you add multiple Alpha models , each Alpha model receives the current slice in the order that you add the Alphas. The combined stream of Insight objects is passed to the Portfolio Construction model.

    Each Portfolio Construction model has a unique method to combine Insight objects. The base PortfolioConstructionModel that most PCM's inherit from doesn't combine information from Insight objects with the same Symbol - but just gets the most recent active insight. To combine the active insights differently, override the GetTargetInsights get_target_insights , and return all active insights. The DetermineTargetPercent determine_target_percent method implements the combination criteria and determines the target for each Symbol .

    public class MultipleAlphaPortfolioConstructionModel : PortfolioConstructionModel
    {
        protected override List<Insight> GetTargetInsights()
        {
            return InsightCollection.GetActiveInsights(Algorithm.UtcTime).ToList();
        }
    
        protected override Dictionary<Insight, double> DetermineTargetPercent(List<Insight> activeInsights)
        {
            return new Dictionary<Insight, double>();
        }
    }
    class MultipleAlphaPortfolioConstructionModel(PortfolioConstructionModel):
        def get_target_insights(self) -> List[Insight]:
            return list(self.insight_collection.get_active_insights(self.algorithm.utc_time))
    
        def determine_target_percent(self, activeInsights: List[Insight]) -> Dict[Insight, float]:
            return {}

    Portfolio Targets

    The Portfolio Construction model returns PortfolioTarget objects, which are passed to the Risk Management model.

    To create a PortfolioTarget object based on a quantity, pass the Symbol and quantity to the PortfolioTarget constructor.

    // Create a new portfolio target for 1200 IBM shares.
    var target = new PortfolioTarget("IBM", 1200);
    # Create a new portfolio target for 1200 IBM shares.
    target = PortfolioTarget("IBM", 1200)

    To create a PortfolioTarget object based on a portfolio weight, call the Percent percent method. This method is only available for margin accounts.

    // Calculate target equivalent to 10% of portfolio value
    var target = PortfolioTarget.Percent(algorithm, "IBM", 0.1);
    # Calculate target equivalent to 10% of portfolio value
    target = PortfolioTarget.percent(algorithm, "IBM", 0.1)

    To include more information in the PortfolioTarget object, pass a tag argument to the constructor or the Percent percent method.

    The CreateTargets create_targets method of your Portfolio Construction model must return an array of PortfolioTarget objects.

    return new PortfolioTarget[] {  new PortfolioTarget("IBM", 1200)  };
    return [ PortfolioTarget("IBM", 1200) ]

    Portfolio Target Collection

    The PortfolioTargetCollection class is a helper class to manage PortfolioTarget objects. The class manages an internal dictionary that has the security Symbol as the key and a PortfolioTarget as the value.

    Add Portfolio Targets

    To add a PortfolioTarget to the PortfolioTargetCollection , call the Add add method.

    _targetsCollection.Add(portfolioTarget);
    self.targets_collection.add(portfolio_target)

    To add a list of PortfolioTarget objects, call the AddRange add_range method.

    _targetsCollection.AddRange(portfolioTargets);
    self.targets_collection.add_range(portfolio_targets)

    Check Membership

    To check if a PortfolioTarget exists in the PortfolioTargetCollection , call the Contains contains method.

    var targetInCollection = _targetsCollection.Contains(portfolioTarget);
    target_in_collection = self.targets_collection.contains(portfolio_target)

    To check if a Symbol exists in the PortfolioTargetCollection , call the ContainsKey contains_key method.

    var symbolInCollection = _targetsCollection.ContainsKey(symbol);
    symbol_in_collection = self.targets_collection.contains_key(symbol)

    To get all the Symbol objects, use the Keys keys property.

    var symbols = _targetsCollection.Keys;
    symbols = self.targets_collection.keys

    Access Portfolio Targets

    To access the PortfolioTarget objects for a Symbol, index the PortfolioTargetCollection with the Symbol.

    var portfolioTarget = _targetsCollection[symbol];
    portfolio_target = self.targets_collection[symbol]

    To iterate through the PortfolioTargetCollection , call the GetEnumerator get_enumerator method.

    var enumerator = _targetsCollection.GetEnumerator();
    enumerator = self.targets_collection.get_enumerator()

    To get all the PortfolioTarget objects, use the Values values property

    var portfolioTargets = _targetsCollection.Values;
    portfolio_targets = self.targets_collection.values

    Order Portfolio Targets by Margin Impact

    To get an enumerable where position reducing orders are executed first and the remaining orders are executed in decreasing order value, call the OrderByMarginImpact order_by_margin_impact method.

    foreach (var target in _targetsCollection.OrderByMarginImpact(algorithm))
    {
        // Place order
    }
    for target in self.targets_collection.order_by_margin_impact(algorithm):
        # Place order

    This method won't return targets for securities that have no data yet. This method also won't return targets for which the sum of the current holdings and open orders quantity equals the target quantity.

    Remove Portfolio Targets

    To remove a PortfolioTarget from the PortfolioTargetCollection , call the Remove remove method.

    removeSuccessful = _targetsCollection.Remove(symbol);
    remove_successful = self.targets_collection.remove(symbol)

    To remove all the PortfolioTarget objects, call the Clear clear method.

    _targetsCollection.Clear();
    self.targets_collection.clear()

    To remove all the PortfolioTarget objects that have been fulfilled, call the ClearFulfilled clear_fulfilled method.

    _targetsCollection.ClearFulfilled(algorithm);
    self.targets_collection.clear_fulfilled(algorithm)

    Rebalance Frequency

    If you use a Portfolio Construction model that is a subclass of the PortfolioConstructionModel class, you can set the rebalancing frequency of the model with a function. The rebalancing function receives the Coordinated Universal Time (UTC) of the algorithm and should return the next rebalance UTC time or None null . If the function returns None null , the model doesn't rebalance unless the rebalance settings trigger a rebalance. For a full example of a custom rebalance function, see the PortfolioRebalanceOnCustomFuncRegressionAlgorithm PortfolioRebalanceOnCustomFuncRegressionAlgorithm .

    If you use a Portfolio Construction model with the following characteristics, you can also set the rebalancing frequency of the model with a timedelta TimeSpan , Resolution , or DateRules :

    To check which of the pre-built Portfolio Construction models support this functionality, see Supported Models .

    Rebalance Settings

    By default, portfolio construction models create PortfolioTarget objects to rebalance the portfolio when any of the following events occur:

    To disable rebalances when the Alpha model emits insights or when insights expire, set RebalancePortfolioOnInsightChanges rebalance_portfolio_on_insight_changes to false.

    // In Initialize
    Settings.RebalancePortfolioOnInsightChanges = false;
    # In Initialize
    self.settings.rebalance_portfolio_on_insight_changes = False

    To disable rebalances when security changes occur, set RebalancePortfolioOnSecurityChanges rebalance_portfolio_on_security_changes to false.

    // In Initialize
    Settings.RebalancePortfolioOnSecurityChanges = false;
    # In Initialize
    self.settings.rebalance_portfolio_on_security_changes = False

    Portfolio Optimizer Structure

    Some portfolio construction models contain an optimizer that accepts the historical returns of each security and returns a list of optimized portfolio weights. Portfolio optimizer models must implement the IPortfolioOptimizer interface, which has an Optimize optimize method.

    public class MyPortfolioOptimizer : IPortfolioOptimizer
    {
        public double[] Optimize(double[,] historicalReturns, double[] expectedReturns = null, double[,] covariance = null)
        {
            // Create weights
            //  For example, equal-weighting:
            int numAssets = historicalReturns.GetLength(1);
            var weights = Enumerable.Repeat(1.0 / numAssets, numAssets).ToArray();
    
            return weights;
        }
    }
    class MyPortfolioOptimizer:
    
        def optimize(self, historicalReturns: pd.DataFrame, expectedReturns: pd.Series = None, covariance: pd.DataFrame = None) -> pd.Series:
            # Create weights
            #  For example, equal-weighting:
            num_assets = historical_returns.shape[1]
            weights = [1/num_assets] * num_assets
    
            return weights

    The following table describes the arguments the Optimize optimize method accepts:

    Argument Data Type Description Default Value
    historicalReturns historical_returns double[,] DataFrame Matrix of annualized historical returns where each column represents a security and each row returns for the given date/time (size: K x N)
    expectedReturns expected_returns double[] Series Array of double with the portfolio annualized expected returns (size: K x 1) null None
    covariance double[,] DataFrame Multi-dimensional array of double with the portfolio covariance of annualized returns (size: K x K) null None

    The method should return a K x 1 array of double objects that represent the portfolio weights.

    To view all the pre-built portfolio optimization algorithms, see Supported Optimizers .

    To view a full example of an IPortfolioOptimizer implementation, see the MaximumSharpeRatioPortfolioOptimizer MaximumSharpeRatioPortfolioOptimizer in the LEAN GitHub repository.

    If you define a custom optimizer and want to use it as the optimizer argument for one of the pre-built Portfolio Construction models , import the Python version of the Portfolio Construction model into your project file. For example, to pair your optimizer with the Black Litterman Optimization Model , add the following line:

    from Portfolio.black_litterman_optimization_portfolio_construction_model import BlackLittermanOptimizationPortfolioConstructionModel

    Track Security Changes

    The Universe Selection model may select a dynamic universe of assets, so you should not assume a fixed set of assets in the Portfolio Construction model. When the Universe Selection model adds and removes assets from the universe, it triggers an OnSecuritiesChanged on_securities_changed event. In the OnSecuritiesChanged on_securities_changed event handler, you can initialize the security-specific state or load any history required for your Portfolio Construction model. If you need to save data for individual securities, add custom members to the respective Security object cast the Security object to a dynamic object and then save custom members to it .

    class MyPortfolioConstructionModel : PortfolioConstructionModel{
        private List<Security> _securities = new List<Security>();
    
        public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
        {
            base.OnSecuritiesChanged(algorithm, changes);
            foreach (var security in changes.AddedSecurities)
            {               
                // Store and manage Symbol-specific data
                var dynamicSecurity = security as dynamic;
                dynamicSecurity.Sma = SMA(security.Symbol, 20);
    
                _securities.Add(security);
            }
    
            foreach (var security in changes.RemovedSecurities)
            {
                if (_securities.Contains(security))
                {
                    algorithm.DeregisterIndicator((security as dynamic).Sma);
    
                    _securities.Remove(security);
                }
            }
        }
    }
    class MyPortfolioConstructionModel(PortfolioConstructionModel):
        _securities = []
    
        def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
            super().on_securities_changed(algorithm, changes)
            for security in changes.added_securities::
                # Store and manage Symbol-specific data
                security.indicator = algorithm.sma(security.symbol, 20)
                algorithm.warm_up_indicator(security.symbol, security.indicator)
    
                self._securities.append(security)
    
            for security in changes.removed_securities:
                if security in self.securities:
                    algorithm.deregister_indicator(security.indicator)
                    self._securities.remove(security)

    Universe Timing Considerations

    If the Portfolio Construction model manages some indicators or consolidators for securities in the universe and the universe selection runs during the indicator sampling period or the consolidator aggregation period, the indicators and consolidators might be missing some data. For example, take the following scenario:

    In this scenario, you create and warm-up the indicator at noon. Since it runs at noon, the history request that gathers daily data to warm up the indicator won't contain any data from the current day and the consolidator that updates the indicator also won't aggregate any data from before noon. This process doesn't cause issues if the indicator only uses the close price to calculate the indicator value (like the simple moving average indicator) because the first consolidated bar that updates the indicator will have the correct close price. However, if the indicator uses more than just the close price to calculate its value (like the True Range indicator), the open, high, and low values of the first consolidated bar may be incorrect, causing the initial indicator values to be incorrect.

     

    Portfolio Construction

    Supported Models

    Introduction

    This page describes the pre-built Portfolio Construction models in LEAN. The number of models grows over time. To add a model to LEAN, make a pull request to the GitHub repository . If none of these models perform exactly how you want, create a custom Portfolio Construction model .

    Null Model

    The NullPortfolioConstructionModel is the default Portfolio Construction model. It doesn't return any PortfolioTarget objects. It's useful if you need to analyze an Alpha model in isolation.

    SetPortfolioConstruction(new NullPortfolioConstructionModel()); 
    self.set_portfolio_construction(NullPortfolioConstructionModel()) 

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Equal Weighting Model

    The EqualWeightingPortfolioConstructionModel assigns an equal share of the portfolio to the securities with active insights. This weighting scheme is useful for universe rotation based on simple portfolio strategies.

    SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel());
    self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    rebalance resolution Resolution Rebalancing frequency Resolution.Daily Resolution.DAILY

    This model supports other data types for the rebalancing frequency argument. For more information about the supported types, see Rebalance Frequency .

    This model removes expired insights from the Insight Manager during each rebalance. It also removes all insights for a security when the security is removed from the universe .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Confidence Weighted Model

    The ConfidenceWeightedPortfolioConstructionModel generates target portfolio weights based on the Insight. Confidence confidence for the last Insight of each Symbol. If the Insight has a direction of InsightDirection. Up UP , the model generates long targets. If the Insight has a direction of InsightDirection. Down DOWN , the model generates short targets. If the sum of all the last active Insight per Symbol is greater than 1, the model factors down each target percent holdings proportionally so the sum is 1. The model ignores Insight objects that have no Confidence value.

    SetPortfolioConstruction(new ConfidenceWeightedPortfolioConstructionModel());
    self.set_portfolio_construction(ConfidenceWeightedPortfolioConstructionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    rebalance resolution Resolution Rebalancing frequency Resolution.Daily Resolution.DAILY
    portfolioBias portfolio_bias PortfolioBias The bias of the portfolio PortfolioBias. LongShort LONG_SHORT

    This model supports other data types for the rebalancing frequency argument. For more information about the supported types, see Rebalance Frequency .

    This model removes expired insights from the Insight Manager during each rebalance. It also removes all insights for a security when the security is removed from the universe .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Insight Weighting Model

    The InsightWeightingPortfolioConstructionModel generates target portfolio weights based on the Insight. Weight weight for the last Insight of each Symbol. If the Insight has a direction of InsightDirection. Up UP , the model generates long targets. If the Insight has a direction of InsightDirection. Down DOWN , the model generates short targets. If the sum of all the last active Insight per Symbol is greater than 1, the model factors down each target percent holdings proportionally so the sum is 1. The model takes the absolute value of the Weight of each Insight object and ignores Insight objects that have no Weight value.

    SetPortfolioConstruction(new InsightWeightingPortfolioConstructionModel());
    self.set_portfolio_construction(InsightWeightingPortfolioConstructionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    rebalance resolution Resolution Rebalancing frequency Resolution.Daily Resolution.DAILY
    portfolioBias portfolio_bias PortfolioBias The bias of the portfolio PortfolioBias. LongShort LONG_SHORT

    This model supports other data types for the rebalancing frequency argument. For more information about the supported types, see Rebalance Frequency .

    This model removes expired insights from the Insight Manager during each rebalance. It also removes all insights for a security when the security is removed from the universe .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Sector Weighting Model

    The SectorWeightingPortfolioConstructionModel generates target portfolio weights based on the CompanyReference.IndustryTemplateCode company_reference.industry_template_code provided by the US Fundamental dataset . The target percent holdings of each sector is 1/S where S is the number of sectors and the target percent holdings of each security is 1/N where N is the number of securities of each sector. If the insight has a direction of InsightDirection. Up UP , the model generates long targets. If the insight has a direction of InsightDirection. Down DOWN , the model generates short targets. The model ignores Insight objects for Symbols that have no CompanyReference.IndustryTemplateCode company_reference.industry_template_code .

    SetPortfolioConstruction(new SectorWeightingPortfolioConstructionModel());
    self.set_portfolio_construction(SectorWeightingPortfolioConstructionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    rebalance resolution Resolution Rebalancing frequency Resolution.Daily Resolution.DAILY

    This model supports other data types for the rebalancing frequency argument. For more information about the supported types, see Rebalance Frequency .

    This model removes expired insights from the Insight Manager during each rebalance. It also removes all insights for a security when the security is removed from the universe .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Accumulative Insight Model

    The AccumulativeInsightPortfolioConstructionModel generates target portfolio weights based on all the active insights of a security. For each active Insight of direction InsightDirection. Up UP , it increases the position size by a fixed percent. For each active Insight of direction InsightDirection. Down DOWN , it decreases the position size by a fixed percent. For each active Insight of direction InsightDirection.Flat , it moves the position size towards 0 by a fixed percent.

    SetPortfolioConstruction(new AccumulativeInsightPortfolioConstructionModel());
    self.set_portfolio_construction(AccumulativeInsightPortfolioConstructionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    rebalance rebalanceFunc Func<DateTime, DateTime?> Any of the following types:
    • timedelta
    • Resolution
    • DateRules
    • None
    • Callable[[datetime], datetime]
    A function that receives the algorithm UTC time and returns the next expected rebalance time. If the function returns None null , the portfolio doesn't rebalance. Rebalancing parameter. If it's a timedelta , DateRules or Resolution , it's converted into a function. If it's None , it's ignored. The function returns the next expected rebalance time for a given algorithm UTC DateTime. The function returns None if unknown, in which case the function will be called again in the next loop. If the function returns the current time, the portfolio rebalances. None null
    portfolioBias portfolio_bias PortfolioBias The bias of the portfolio PortfolioBias. LongShort LONG_SHORT
    percent double float The percentage amount of the portfolio value to allocate to a single insight 0.03 (3%)

    This model supports other data types for the rebalancing frequency argument. For more information about the supported types, see Rebalance Frequency .

    This model removes expired insights from the Insight Manager during each rebalance. It also removes all insights for a security when the security is removed from the universe .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Mean Variance Optimization Model

    The MeanVarianceOptimizationPortfolioConstructionModel seeks to build a portfolio with the least volatility possible and achieve a target return.

    SetPortfolioConstruction(new MeanVarianceOptimizationPortfolioConstructionModel());
    self.set_portfolio_construction(MeanVarianceOptimizationPortfolioConstructionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    rebalance rebalanceResolution Resolution Rebalancing frequency Resolution.Daily Resolution.DAILY
    portfolioBias portfolio_bias PortfolioBias The bias of the portfolio PortfolioBias. LongShort LONG_SHORT
    lookback int Historical return lookback period 1
    period int The time interval of history price to calculate the weight 63
    resolution Resolution The resolution of the history price Resolution.Daily Resolution.DAILY
    targetReturn target_return double float The target portfolio return 0.02 (2%)
    optimizer IPortfolioOptimizer The portfolio optimization algorithm null None

    This model supports other data types for the rebalancing frequency argument. For more information about the supported types, see Rebalance Frequency . If you don't provide an optimizer argument, the default one is the MinimumVariancePortfolioOptimizer with upper and lower weights that respect the portfolioBias .

    This model removes expired insights from the Insight Manager during each rebalance. It also removes all insights for a security when the security is removed from the universe .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Black Litterman Optimization Model

    The BlackLittermanOptimizationPortfolioConstructionModel receives Insight objects from multiple Alphas and combines them into a single portfolio. These multiple sources of Alpha models can be seen as the "investor views" required in the classical model.

    SetPortfolioConstruction(new BlackLittermanOptimizationPortfolioConstructionModel());
    self.set_portfolio_construction(BlackLittermanOptimizationPortfolioConstructionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    rebalance rebalanceResolution Resolution Rebalancing frequency Resolution.Daily Resolution.DAILY
    portfolioBias portfolio_bias PortfolioBias The bias of the portfolio PortfolioBias. LongShort LONG_SHORT
    lookback int Historical return lookback period 1
    period int The time interval of history price to calculate the weight 63
    resolution Resolution The resolution of the history price Resolution.Daily Resolution.DAILY
    risk_free_rate riskFreeRate double float The risk free rate 0.0
    delta double float The risk aversion coefficient of the market portfolio 2.5
    tau double float The model parameter indicating the uncertainty of the CAPM prior 0.05
    optimizer IPortfolioOptimizer The portfolio optimization algorithm null None

    This model supports other data types for the rebalancing frequency argument. For more information about the supported types, see Rebalance Frequency . If you don't provide an optimizer argument, the default one is the MinimumVariancePortfolioOptimizer with upper and lower weights that respect the portfolioBias .

    This model removes expired insights from the Insight Manager during each rebalance. It also removes all insights for a security when the security is removed from the universe .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Mean Reversion Model

    The MeanReversionPortfolioConstructionModel implements an on-line portfolio selection technique, named "On-Line Moving Average Reversion" (OLMAR). The basic idea is to represent multi-period mean reversion as "Moving Average Reversion" (MAR), which explicitly predicts next price relatives using moving averages and then forms portfolios with online learning techniques.

    SetPortfolioConstruction(new MeanReversionPortfolioConstructionModel());
    self.set_portfolio_construction(MeanReversionPortfolioConstructionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    rebalance rebalanceResolution Resolution Rebalancing frequency Resolution.Daily Resolution.DAILY
    portfolioBias portfolio_bias PortfolioBias The bias of the portfolio PortfolioBias. LongShort LONG_SHORT
    reversionThreshold reversion_threshold decimal float Reversion threshold 1
    windowSize window_size int The window size of mean price 20
    resolution Resolution The resolution of the history price Resolution.Daily Resolution.DAILY

    This model supports other data types for the rebalancing frequency argument. For more information about the supported types, see Rebalance Frequency .

    This model removes expired insights from the Insight Manager during each rebalance. It also removes all insights for a security when the security is removed from the universe .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Reference:

    Risk Parity Model

    The RiskParityPortfolioConstructionModel seeks to build a portfolio with the equal contribution of risk to the total portfolio risk from all assets.

    SetPortfolioConstruction(new RiskParityPortfolioConstructionModel());
    self.set_portfolio_construction(RiskParityPortfolioConstructionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    rebalance rebalanceResolution Resolution Rebalancing frequency Resolution.Daily Resolution.DAILY
    portfolioBias portfolio_bias PortfolioBias The bias of the portfolio PortfolioBias. LongShort LONG_SHORT
    lookback int Historical return lookback period 1
    period int The time interval of history price to calculate the weight 252
    resolution Resolution The resolution of the history price Resolution.Daily Resolution.DAILY
    optimizer IPortfolioOptimizer The portfolio optimization algorithm null None

    This model supports other data types for the rebalancing frequency argument. For more information about the supported types, see Rebalance Frequency . If you don't provide an optimizer argument, the default one is the RiskParityPortfolioOptimizer .

    This model removes expired insights from the Insight Manager during each rebalance. It also removes all insights for a security when the security is removed from the universe .

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

     

    Portfolio Construction

    Supported Optimizers

    Introduction

    This page describes the pre-built Portfolio Optimizer models in LEAN. The number of models grows over time. To add a model to LEAN, make a pull request to the GitHub repository . If none of these models perform exactly how you want, create a custom Portfolio Optimizer model .

    Maximum Sharpe Ratio Optimizer

    The MaximumSharpeRatioPortfolioOptimizer seeks to maximize the portfolio Sharpe Ratio .

    var optimizer = new MaximumSharpeRatioPortfolioOptimizer();
    optimizer = MaximumSharpeRatioPortfolioOptimizer()

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    minimum_weight lower double float The lower bounds on portfolio weights -1
    maximum_weight upper double float The upper bounds on portfolio weights 1
    risk_free_rate riskFreeRate double float The risk free rate 0

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Minimum Variance Optimizer

    The MinimumVariancePortfolioOptimizer seeks to minimize the portfolio variance and achieve a target return.

    var optimizer = new MinimumVariancePortfolioOptimizer();
    optimizer = MinimumVariancePortfolioOptimizer()

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    minimum_weight lower double float The lower bounds on portfolio weights -1
    maximum_weight upper double float The upper bounds on portfolio weights 1
    target_return targetReturn double float The target portfolio return 0.02 (2%)

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Unconstrained Mean Variance Optimizer

    The UnconstrainedMeanVariancePortfolioOptimizer seeks to find the optimal risk-adjusted portfolio that lies on the efficient frontier.

    var optimizer = new UnconstrainedMeanVariancePortfolioOptimizer();
    optimizer = UnconstrainedMeanVariancePortfolioOptimizer()

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Risk Parity Optimizer

    The RiskParityPortfolioOptimizer seeks to equalize the individual risk contribution to the total portfolio risk from each asset.

    var optimizer = new RiskParityPortfolioOptimizer();
    optimizer = RiskParityPortfolioOptimizer()

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    minimum_weight lower double float The lower bounds on portfolio weights 1e-05
    maximum_weight upper double float The upper bounds on portfolio weights sys.float_info.max Double.MaxValue

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

     

    Algorithm Framework

    Risk Management

    Risk Management

    Key Concepts

    Introduction

    The Risk Management model seeks to manage risk on the PortfolioTarget collection it receives from the Portfolio Construction model before the targets reach the Execution model. There are many creative ways to manage risk. Some examples of risk management include the following:

    Add Models

    To set a Risk Management model, in the Initialize initialize method, call the AddRiskManagement method.

    self.add_risk_management(NullRiskManagementModel())
    AddRiskManagement(new NullRiskManagementModel());

    To view all the pre-built Risk Management models, see Supported Models .

    Multi-Model Algorithms

    To add multiple Risk Management models, in the Initialize initialize method, call the AddRiskManagement method multiple times.

    AddRiskManagement(new MaximumDrawdownPercentPerSecurity());
    AddRiskManagement(new MaximumSectorExposureRiskManagementModel());
    self.add_risk_management(MaximumDrawdownPercentPerSecurity())
    self.add_risk_management(MaximumSectorExposureRiskManagementModel())

    If you add multiple Risk Management models, the original collection of PortfolioTarget objects from the Portfolio Construction model is passed to the first Risk Management model. The risk-adjusted targets from the first Risk Management model are passed to the second Risk Management model. The process continues sequentially until all of the Risk Management models have had an opportunity to adjust the targets.

    Model Structure

    Risk Management models should extend the RiskManagementModel class. Extensions of the RiskManagementModel class must implement the ManageRisk manage_risk method, which receives an array of PortfolioTarget objects from the Portfolio Construction model at every time step and should return an array of risk-adjusted PortfolioTarget objects. The method should only return the adjusted targets, not all of targets. If the method creates a PortfolioTarget object to liquidate a security, cancel the security's insights to avoid re-entering the position.

    class MyRiskManagementModel : RiskManagementModel
    {
        // Adjust the portfolio targets and return them. If no changes emit nothing.
        public override List<PortfolioTarget> ManageRisk(QCAlgorithm algorithm, PortfolioTarget[] targets)
        {
            return new List<PortfolioTarget>();
        }
    
        // Optional: Be notified when securities change
        public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
        {
            // Security additions and removals are pushed here.
            // This can be used for setting up algorithm state.
            // changes.AddedSecurities
            // changes.RemovedSecurities
        }
    }
    class MyRiskManagementModel(RiskManagementModel):
        # Adjust the portfolio targets and return them. If no changes emit nothing.
        def manage_risk(self, algorithm: QCAlgorithm, targets: List[PortfolioTarget]) -> List[PortfolioTarget]:
            return []
    
        # Optional: Be notified when securities change
        def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
            # Security additions and removals are pushed here.
            # This can be used for setting up algorithm state.
            # changes.added_securities
            # changes.removed_securities
            pass
    

    The algorithm argument that the methods receive is an instance of the base QCAlgorithm class, not your subclass of it.

    To view a full example of a RiskManagementModel subclass, see the MaximumDrawdownPercentPerSecurity MaximumDrawdownPercentPerSecurity in the LEAN GitHub repository.

    Track Security Changes

    The Universe Selection model may select a dynamic universe of assets, so you should not assume a fixed set of assets in the Risk Management model. When the Universe Selection model adds and removes assets from the universe, it triggers an OnSecuritiesChanged on_securities_changed event. In the OnSecuritiesChanged on_securities_changed event handler, you can initialize the security-specific state or load any history required for your Risk Management model. If you need to save data for individual securities, add custom members to the respective Security object cast the Security object to a dynamic object and then save custom members to it .

    class MyRiskManagementModel : RiskManagementModel{
        private List<Security> _securities = new List<Security>();
    
        public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
        {
            base.OnSecuritiesChanged(algorithm, changes);
            foreach (var security in changes.AddedSecurities)
            {               
                // Store and manage Symbol-specific data
                var dynamicSecurity = security as dynamic;
                dynamicSecurity.Sma = SMA(security.Symbol, 20);
    
                _securities.Add(security);
            }
    
            foreach (var security in changes.RemovedSecurities)
            {
                if (_securities.Contains(security))
                {
                    algorithm.DeregisterIndicator((security as dynamic).Sma);
    
                    _securities.Remove(security);
                }
            }
        }
    }
    class MyRiskManagementModel(RiskManagementModel):
        _securities = []
    
        def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
            super().on_securities_changed(algorithm, changes)
            for security in changes.added_securities::
                # Store and manage Symbol-specific data
                security.indicator = algorithm.sma(security.symbol, 20)
                algorithm.warm_up_indicator(security.symbol, security.indicator)
    
                self._securities.append(security)
    
            for security in changes.removed_securities:
                if security in self.securities:
                    algorithm.deregister_indicator(security.indicator)
                    self._securities.remove(security)

    Portfolio Target Collection

    The PortfolioTargetCollection class is a helper class to manage PortfolioTarget objects. The class manages an internal dictionary that has the security Symbol as the key and a PortfolioTarget as the value.

    Add Portfolio Targets

    To add a PortfolioTarget to the PortfolioTargetCollection , call the Add add method.

    _targetsCollection.Add(portfolioTarget);
    self.targets_collection.add(portfolio_target)

    To add a list of PortfolioTarget objects, call the AddRange add_range method.

    _targetsCollection.AddRange(portfolioTargets);
    self.targets_collection.add_range(portfolio_targets)

    Check Membership

    To check if a PortfolioTarget exists in the PortfolioTargetCollection , call the Contains contains method.

    var targetInCollection = _targetsCollection.Contains(portfolioTarget);
    target_in_collection = self.targets_collection.contains(portfolio_target)

    To check if a Symbol exists in the PortfolioTargetCollection , call the ContainsKey contains_key method.

    var symbolInCollection = _targetsCollection.ContainsKey(symbol);
    symbol_in_collection = self.targets_collection.contains_key(symbol)

    To get all the Symbol objects, use the Keys keys property.

    var symbols = _targetsCollection.Keys;
    symbols = self.targets_collection.keys

    Access Portfolio Targets

    To access the PortfolioTarget objects for a Symbol, index the PortfolioTargetCollection with the Symbol.

    var portfolioTarget = _targetsCollection[symbol];
    portfolio_target = self.targets_collection[symbol]

    To iterate through the PortfolioTargetCollection , call the GetEnumerator get_enumerator method.

    var enumerator = _targetsCollection.GetEnumerator();
    enumerator = self.targets_collection.get_enumerator()

    To get all the PortfolioTarget objects, use the Values values property

    var portfolioTargets = _targetsCollection.Values;
    portfolio_targets = self.targets_collection.values

    Order Portfolio Targets by Margin Impact

    To get an enumerable where position reducing orders are executed first and the remaining orders are executed in decreasing order value, call the OrderByMarginImpact order_by_margin_impact method.

    foreach (var target in _targetsCollection.OrderByMarginImpact(algorithm))
    {
        // Place order
    }
    for target in self.targets_collection.order_by_margin_impact(algorithm):
        # Place order

    This method won't return targets for securities that have no data yet. This method also won't return targets for which the sum of the current holdings and open orders quantity equals the target quantity.

    Remove Portfolio Targets

    To remove a PortfolioTarget from the PortfolioTargetCollection , call the Remove remove method.

    removeSuccessful = _targetsCollection.Remove(symbol);
    remove_successful = self.targets_collection.remove(symbol)

    To remove all the PortfolioTarget objects, call the Clear clear method.

    _targetsCollection.Clear();
    self.targets_collection.clear()

    To remove all the PortfolioTarget objects that have been fulfilled, call the ClearFulfilled clear_fulfilled method.

    _targetsCollection.ClearFulfilled(algorithm);
    self.targets_collection.clear_fulfilled(algorithm)

    Universe Timing Considerations

    If the Risk Management model manages some indicators or consolidators for securities in the universe and the universe selection runs during the indicator sampling period or the consolidator aggregation period, the indicators and consolidators might be missing some data. For example, take the following scenario:

    In this scenario, you create and warm-up the indicator at noon. Since it runs at noon, the history request that gathers daily data to warm up the indicator won't contain any data from the current day and the consolidator that updates the indicator also won't aggregate any data from before noon. This process doesn't cause issues if the indicator only uses the close price to calculate the indicator value (like the simple moving average indicator) because the first consolidated bar that updates the indicator will have the correct close price. However, if the indicator uses more than just the close price to calculate its value (like the True Range indicator), the open, high, and low values of the first consolidated bar may be incorrect, causing the initial indicator values to be incorrect.

     

    Risk Management

    Supported Models

    Introduction

    This page describes the pre-built Risk Management models in LEAN. The number of models grows over time. To add a model to LEAN, make a pull request to the GitHub repository . If none of these models perform exactly how you want, create a custom Risk Management model .

    Null Model

    The NullRiskManagementModel is the default Risk Management model. It doesn't adjust any of the PortfolioTarget objects it receives from the Portfolio Construction model.

    AddRiskManagement(new NullRiskManagementModel());
    self.add_risk_management(NullRiskManagementModel())

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Maximum Security Drawdown Model

    The MaximumDrawdownPercentPerSecurity model monitors the unrealized profit percentage of each security in the portfolio. When the percentage drops below a threshold relative to the opening price, it liquidates the position and cancels all insights in the Insight Manager that are for the security. This model can operate even when the Portfolio Construction model provides an empty list of PortfolioTarget objects.

    AddRiskManagement(new MaximumDrawdownPercentPerSecurity());
    self.add_risk_management(MaximumDrawdownPercentPerSecurity())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    maximumDrawdownPercent maximum_drawdown_percent decimal float The maximum percentage drawdown allowed for any single security holding 0.05 (5%)

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Maximum Portfolio Drawdown Model

    The MaximumDrawdownPercentPortfolio model monitors the portfolio drawdown . The drawdown can be relative to the starting portfolio value or the maximum portfolio value. When the portfolio value drops below a percentage threshold, the model liquidates the portfolio and cancels all insights in the Insight Manager . To liquidate the portfolio, the model must receive at least 1 PortfolioTarget after the drawdown threshold is passed. After the portfolio is liquidated, the model resets. This model can operate even when the Portfolio Construction model provides an empty list of PortfolioTarget objects.

    AddRiskManagement(new MaximumDrawdownPercentPortfolio());
    self.add_risk_management(MaximumDrawdownPercentPortfolio())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    maximumDrawdownPercent maximum_drawdown_percent decimal float Maximum spread accepted comparing to current price in percentage 0.05 (5%)
    isTrailing is_trailing bool If false False , the drawdown is relative to the starting value of the portfolio. If true True , the drawdown is relative the last maximum portfolio value False false

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Maximum Unrealized Profit Model

    The MaximumUnrealizedProfitPercentPerSecurity model monitors the unrealized profit of each security in the portfolio. When the unrealized profit exceeds a profit threshold, it liquidates the position and cancels all insights in the Insight Manager that are for the security. This model can operate even when the Portfolio Construction model provides an empty list of PortfolioTarget objects.

    AddRiskManagement(new MaximumUnrealizedProfitPercentPerSecurity());
    self.add_risk_management(MaximumUnrealizedProfitPercentPerSecurity())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    maximumUnrealizedProfitPercent maximum_unrealized_profit_percent decimal float The maximum percentage unrealized profit allowed for any single security holding 0.05 (5%)

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Maximum Sector Exposure Model

    The MaximumSectorExposureRiskManagementModel limits the absolute portfolio exposure in a each industry sector to a predefined maximum percentage. If the absolute portfolio exposure exceeds the maximum percentage, the weight of each Equity in the sector is scaled down so the sector doesn't exceed the maximum percentage. This process requires assets that are selected by Morningstar fundamental data . This model can operate even when the Portfolio Construction model provides an empty list of PortfolioTarget objects.

    AddRiskManagement(new MaximumSectorExposureRiskManagementModel());
    self.add_risk_management(MaximumSectorExposureRiskManagementModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    maximumSectorExposure maximum_sector_exposure decimal float The maximum exposure for any sector 0.2 (20%)

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Trailing Stop Model

    The TrailingStopRiskManagementModel monitors the drawdown of each security in the portfolio. When the peak-to-trough drawdown of the unrealized profit exceeds a threshold, it liquidates the position and cancels all insights in the Insight Manager that are for the security. This model can operate even when the Portfolio Construction model provides an empty list of PortfolioTarget objects.

    AddRiskManagement(new TrailingStopRiskManagementModel());
    self.add_risk_management(TrailingStopRiskManagementModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    maximumDrawdownPercent maximum_drawdown_percent decimal float The maximum percentage drawdown allowed for algorithm portfolio compared with the highest unrealized profit 0.05 (5%)

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

     

    Algorithm Framework

    Execution

    Execution

    Key Concepts

    Introduction

    The Execution model receives an array of risk-adjusted PortfolioTarget objects from the Risk Management model and places trades in the market to satisfy the targets. The Execution model only receives updates to the portfolio target share counts. It doesn't necessarily receive all of the targets at once.

    Set Models

    To set an Execution model, in the Initialize initialize method, call the SetExecution method.

    SetExecution(new ImmediateExecutionModel()); 
    self.set_execution(ImmediateExecutionModel()) 

    To view all the pre-built Execution models, see Supported Models .

    Model Structure

    Execution models should extend the ExecutionModel class. Extensions of the ExecutionModel must implement the Execute execute method, which receives an array of PortfolioTarget objects at every time step and is responsible for reaching the target portfolio as efficiently as possible. The Portfolio Construction model creates the PortfolioTarget objects, the Risk Management model may adjust them, and then the Execution model places the orders to fulfill them.

     // Basic Execution Model Scaffolding Structure Example
    class MyExecutionModel : ExecutionModel {
    
       // Fill the supplied portfolio targets efficiently.
       public override void Execute(QCAlgorithm algorithm, IPortfolioTarget[] targets)
       {
          // NOP
       }
    
       //  Optional: Securities changes event for handling new securities.
       public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
       {
            // Security additions and removals are pushed here.
            // This can be used for setting up algorithm state.
            // changes.AddedSecurities
            // changes.RemovedSecurities
       }
    }
    # Execution Model scaffolding structure example
    class MyExecutionModel(ExecutionModel):
    
        # Fill the supplied portfolio targets efficiently
        def execute(self, algorithm: QCAlgorithm, targets: List[PortfolioTarget]) -> None:
            pass
    
        # Optional: Securities changes event for handling new securities.
        def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
            # Security additions and removals are pushed here.
            # This can be used for setting up algorithm state.
            # changes.added_securities
            # changes.removed_securities
            pass

    The algorithm argument that the methods receive is an instance of the base QCAlgorithm class, not your subclass of it.

    The following table describes the properties of the PortfolioTarget class that you may access in the Execution model:

    Property Data Type Description
    Symbol symbol Symbol Asset to trade
    Quantity quantity decimal float Number of units to hold

    To view a full example of an ExecutionModel subclass, see the ImmediateExecutionModel ImmediateExecutionModel in the LEAN GitHub repository.

    Track Security Changes

    The Universe Selection model may select a dynamic universe of assets, so you should not assume a fixed set of assets in the Execution model. When the Universe Selection model adds and removes assets from the universe, it triggers an OnSecuritiesChanged on_securities_changed event. In the OnSecuritiesChanged on_securities_changed event handler, you can initialize the security-specific state or load any history required for your Execution model. If you need to save data for individual securities, add custom members to the respective Security object cast the Security object to a dynamic object and then save custom members to it .

    class MyExecutionModel : ExecutionModel{
        private List<Security> _securities = new List<Security>();
    
        public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
        {
            foreach (var security in changes.AddedSecurities)
            {               
                // Store and manage Symbol-specific data
                var dynamicSecurity = security as dynamic;
                dynamicSecurity.Sma = SMA(security.Symbol, 20);
    
                _securities.Add(security);
            }
    
            foreach (var security in changes.RemovedSecurities)
            {
                if (_securities.Contains(security))
                {
                    algorithm.DeregisterIndicator((security as dynamic).Sma);
    
                    _securities.Remove(security);
                }
            }
        }
    }
    class MyExecutionModel(ExecutionModel):
        _securities = []
    
        def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
            for security in changes.added_securities::
                # Store and manage Symbol-specific data
                security.indicator = algorithm.sma(security.symbol, 20)
                algorithm.warm_up_indicator(security.symbol, security.indicator)
    
                self._securities.append(security)
    
            for security in changes.removed_securities:
                if security in self.securities:
                    algorithm.deregister_indicator(security.indicator)
                    self._securities.remove(security)

    Portfolio Target Collection

    The PortfolioTargetCollection class is a helper class to manage PortfolioTarget objects. The class manages an internal dictionary that has the security Symbol as the key and a PortfolioTarget as the value.

    Add Portfolio Targets

    To add a PortfolioTarget to the PortfolioTargetCollection , call the Add add method.

    _targetsCollection.Add(portfolioTarget);
    self.targets_collection.add(portfolio_target)

    To add a list of PortfolioTarget objects, call the AddRange add_range method.

    _targetsCollection.AddRange(portfolioTargets);
    self.targets_collection.add_range(portfolio_targets)

    Check Membership

    To check if a PortfolioTarget exists in the PortfolioTargetCollection , call the Contains contains method.

    var targetInCollection = _targetsCollection.Contains(portfolioTarget);
    target_in_collection = self.targets_collection.contains(portfolio_target)

    To check if a Symbol exists in the PortfolioTargetCollection , call the ContainsKey contains_key method.

    var symbolInCollection = _targetsCollection.ContainsKey(symbol);
    symbol_in_collection = self.targets_collection.contains_key(symbol)

    To get all the Symbol objects, use the Keys keys property.

    var symbols = _targetsCollection.Keys;
    symbols = self.targets_collection.keys

    Access Portfolio Targets

    To access the PortfolioTarget objects for a Symbol, index the PortfolioTargetCollection with the Symbol.

    var portfolioTarget = _targetsCollection[symbol];
    portfolio_target = self.targets_collection[symbol]

    To iterate through the PortfolioTargetCollection , call the GetEnumerator get_enumerator method.

    var enumerator = _targetsCollection.GetEnumerator();
    enumerator = self.targets_collection.get_enumerator()

    To get all the PortfolioTarget objects, use the Values values property

    var portfolioTargets = _targetsCollection.Values;
    portfolio_targets = self.targets_collection.values

    Order Portfolio Targets by Margin Impact

    To get an enumerable where position reducing orders are executed first and the remaining orders are executed in decreasing order value, call the OrderByMarginImpact order_by_margin_impact method.

    foreach (var target in _targetsCollection.OrderByMarginImpact(algorithm))
    {
        // Place order
    }
    for target in self.targets_collection.order_by_margin_impact(algorithm):
        # Place order

    This method won't return targets for securities that have no data yet. This method also won't return targets for which the sum of the current holdings and open orders quantity equals the target quantity.

    Remove Portfolio Targets

    To remove a PortfolioTarget from the PortfolioTargetCollection , call the Remove remove method.

    removeSuccessful = _targetsCollection.Remove(symbol);
    remove_successful = self.targets_collection.remove(symbol)

    To remove all the PortfolioTarget objects, call the Clear clear method.

    _targetsCollection.Clear();
    self.targets_collection.clear()

    To remove all the PortfolioTarget objects that have been fulfilled, call the ClearFulfilled clear_fulfilled method.

    _targetsCollection.ClearFulfilled(algorithm);
    self.targets_collection.clear_fulfilled(algorithm)

    Universe Timing Considerations

    If the Execution model manages some indicators or consolidators for securities in the universe and the universe selection runs during the indicator sampling period or the consolidator aggregation period, the indicators and consolidators might be missing some data. For example, take the following scenario:

    In this scenario, you create and warm-up the indicator at noon. Since it runs at noon, the history request that gathers daily data to warm up the indicator won't contain any data from the current day and the consolidator that updates the indicator also won't aggregate any data from before noon. This process doesn't cause issues if the indicator only uses the close price to calculate the indicator value (like the simple moving average indicator) because the first consolidated bar that updates the indicator will have the correct close price. However, if the indicator uses more than just the close price to calculate its value (like the True Range indicator), the open, high, and low values of the first consolidated bar may be incorrect, causing the initial indicator values to be incorrect.

     

    Execution

    Supported Models

    Introduction

    This page describes the pre-built Execution models in LEAN. The number of models grows over time. To add a model to LEAN, make a pull request to the GitHub repository . If none of these models perform exactly how you want, create a custom Execution model .

    Null Model

    The NullExecutionModel doesn't place any trades.

    SetExecution(new NullExecutionModel());
    self.set_execution(NullExecutionModel())

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Immediate Model

    The ImmediateExecutionModel is the default Execution model. It uses market orders to immediately fill portfolio targets. It's similar to placing market orders in line with your algorithm logic.

    SetExecution(new ImmediateExecutionModel());
    self.set_execution(ImmediateExecutionModel())

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Spread Model

    The SpreadExecutionModel executes trades with market orders if the exchange is open and the bid-ask spread is within a threshold percentage. The model only works if the security subscription provides QuoteBar data. The spread percentage is calculated as

    $$ \frac{a - b}{p} $$

    where $a$ is the ask price, $b$ is the bid price, and $p$ is the price.

    SetExecution(new SpreadExecutionModel());
    self.set_execution(SpreadExecutionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    acceptingSpreadPercent accepting_spread_percent decimal float Maximum spread accepted comparing to current price in percentage 0.005 (0.5%)

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    Standard Deviation Model

    The StandardDeviationExecutionModel seeks to fill orders when the price is more than 2 standard deviations lower than the average price over a trailing period. The intent is to find dips in the market to place trades. In strongly trending markets, this procedure can result in delayed trade placement since it might be a while before the next price spike or dip.

    SetExecution(new StandardDeviationExecutionModel());
    self.set_execution(StandardDeviationExecutionModel())

    The following table describes the arguments the model accepts:

    Argument Data Type Description Default Value
    period decimal float Period of the standard deviation indicator 60
    deviations int The number of deviations away from the mean before submitting an order 2
    resolution Resolution The resolution of the STD and SMA indicators Resolution.Minute Resolution.MINUTE

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

    VWAP Model

    The VolumeWeightedAveragePriceExecutionModel works to fill your orders at or better than the volume-weighted average price (VWAP) for the trading day. This is a best-effort algorithm, so no guarantee can be made that it will reach the VWAP.

    VWAP execution model implementation
    VWAP Execution Model Fill Placements

    The model uses market orders and it only works if the security subscription provides intraday data. It sets a maximum order size of 1% of the current bar's volume, but you can update the maximum order size through the MaximumOrderQuantityPercentVolume maximum_order_quantity_percent_volume member.

    SetExecution(new VolumeWeightedAveragePriceExecutionModel());
    self.set_execution(VolumeWeightedAveragePriceExecutionModel())

    To view the implementation of this model, see the LEAN GitHub repository LEAN GitHub repository .

     

    Algorithm Framework

    Hybrid Algorithms

    Introduction

    Classic style algorithms can also use Algorithm Framework modules. This allows you to get the best of both styles of algorithm design, combining easily pluggable modules with the superior control of classic format.

    Examples of popular use-cases of a hybrid approach are:

    Universe Selection

    You can add one or more Framework Universe Selection Models to your algorithm and it will operate normally. You can also combine it with the AddUniverse add_universe method of the classic approach. The following example initializes a classic algorithm with framework universe selection models:

    public override void Initialize()
    {
        UniverseSettings.Asynchronous = true;
        SetUniverseSelection(new ManualUniverseSelectionModel(QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA)));
        AddUniverseSelection(new ManualUniverseSelectionModel(QuantConnect.Symbol.Create("AAPL", SecurityType.Equity, Market.USA)));
        AddUniverse(Universe.DollarVolume.Top(5));
    }
    def initialize(self):
        self.universe_settings.asynchronous = True       
        self.set_universe_selection(ManualUniverseSelectionModel([ Symbol.create("SPY", SecurityType.EQUITY, Market.USA) ]))
        self.add_universe_selection(ManualUniverseSelectionModel([ Symbol.create("AAPL", SecurityType.EQUITY, Market.USA) ]))
        self.add_universe(self.universe.dollar_volume.top(5))

    Alpha

    You can add one or multiple Alpha models to your classic algorithm and place the orders using Insight objects without a Portfolio Construction model. To receive the collection of Insight objects in a classic algorithm, implement the InsightsGenerated insights_generated event handler:

    public override void Initialize()
    {
        AddAlpha(new EmaCrossAlphaModel());
        InsightsGenerated += OnInsightsGenerated;
    }
    private void OnInsightsGenerated(IAlgorithm algorithm, GeneratedInsightsCollection insightsCollection)
    {
        var insights = insightsCollection.Insights;
    }
    def initialize(self):
        self.add_alpha(EmaCrossAlphaModel())
        self.insights_generated += self.on_insights_generated
    
    def on_insights_generated(self, algorithm: IAlgorithm, insights_collection: GeneratedInsightsCollection) -> None:
        insights = insights_collection.insights

    Portfolio Construction

    You can add a Portfolio Construction model to your classic algorithm and have it place orders without returning Insight objects from an Alpha model. To emit insights without an Alpha model, in the OnData on_data method, call the EmitInsights method.

    The following example uses a Portfolio Construction Framework model with EmitInsights method in a classic algorithm:

    public override void Initialize()
    {
        SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel());
    }
    
    public override void OnData(Slice slice)
    {
    	EmitInsights(new Insight("GOOG", TimeSpan.FromMinutes(20), InsightType.Price, InsightDirection.Up));
    	EmitInsights(new []{
    		new Insight("AAPL", TimeSpan.FromMinutes(20), InsightType.Price, InsightDirection.Up),
    		new Insight("MSFT", TimeSpan.FromMinutes(20), InsightType.Price, InsightDirection.Up)
    	});
    }
    def initialize(self):
        self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())
    
    def on_data(self, slice):
    	self.emit_insights(Insight("GOOG", TimeSpan.from_minutes(20), InsightType.PRICE, InsightDirection.UP))
    	self.emit_insights([
    		Insight("AAPL", TimeSpan.from_minutes(20), InsightType.PRICE, InsightDirection.UP),
    		Insight("MSFT", TimeSpan.from_minutes(20), InsightType.PRICE, InsightDirection.UP)
    	])

    Risk Management

    Some Risk Management Models don't require a Portfolio Construction model to provide PortfolioTarget objects, allowing them to directly monitor the portfolio holdings and liquidate positions when neccessary. To see which pre-built Risk Management models don't need the Portfolio Construction model to provide PortfolioTarget objects, see Supported Models .

    You can add one or more Risk Management Models to your algorithm and it will operate normally. The following example initializes a classic algorithm with framework risk management models:

    public override void Initialize()
    {
        AddRiskManagement(new MaximumDrawdownPercentPerSecurity(0.05m));
        AddRiskManagement(new MaximumUnrealizedProfitPercentPerSecurity(0.1m));
    }
    def initialize(self):
        self.add_risk_management(MaximumDrawdownPercentPerSecurity(0.05))
        self.add_risk_management(MaximumUnrealizedProfitPercentPerSecurity(0.1))

    Execution

    Execution models can place orders for your strategy instead of placing them manually. To do so, PortfolioTarget s are routed to the Execute execute method of the Execution Model to place orders.

    The following example uses a Framework Execution Model in a classic style algorithm:

    public override void Initialize()
    {
        SetExecution(new ImmediateExecutionModel());
    }
    def initialize(self):
        self.set_execution(ImmediateExecutionModel())

    Universe Timing Considerations

    If the Alpha, Portfolio Construction, Risk Management, or Execution model manages some indicators or consolidators for securities in the universe and the universe selection runs during the indicator sampling period or the consolidator aggregation period, the indicators and consolidators might be missing some data. For example, take the following scenario:

    In this scenario, you create and warm-up the indicator at noon. Since it runs at noon, the history request that gathers daily data to warm up the indicator won't contain any data from the current day and the consolidator that updates the indicator also won't aggregate any data from before noon. This process doesn't cause issues if the indicator only uses the close price to calculate the indicator value (like the simple moving average indicator) because the first consolidated bar that updates the indicator will have the correct close price. However, if the indicator uses more than just the close price to calculate its value (like the True Range indicator), the open, high, and low values of the first consolidated bar may be incorrect, causing the initial indicator values to be incorrect.

     

    Algorithm Framework

    Insight Manager

    Introduction

    The InsightManager tracks all of the Insight objects in your algorithm. It's an InsightCollection , which stores all of your insights in an internal dictionary that has the security Symbol as the key and a list of Insight objects as the value. You can access the manager anywhere in your algorithm where you have reference to the algorithm class. If you want to use an InsightCollection in your algorithm that's seperate from the InsightManager , create a new InsightCollection .

    Add Insights

    To add insights to the InsightManager , return a list of Insight objects from the Update update method of your Alpha model or call the EmitInsights emit_insights method. If you manage an InsightCollection that's seperate from the InsightManager , there are some methods to add Insight objects to it.

    To add an insight to an InsightCollection , call the Add add method.

    _insightCollection.Add(insight);
    self.insight_collection.add(insight)

    To add a list of insights, call the AddRange add_range method.

    _insightCollection.AddRange(insights);
    self.insight_collection.add_range(insights)

    Check Membership

    To check if an insight exists in the InsightManager , call the Contains contains method.

    if (algorithm.Insights.Contains(insight))
    {
        
    }
    if algorithm.insights.contains(insight):
        pass

    To check if the InsightManager has an insight for a Symbol , call the ContainsKey contains_key method.

    if (algorithm.Insights.ContainsKey(symbol))
    {
        
    }
    if algorithm.insights.contains_key(symbol):
        pass

    To check if the InsightManager has active insights for a Symbol at a specific Coordinated Universal Time (UTC), call the HasActiveInsights has_active_insights method.

    if (algorithm.Insights.HasActiveInsights(symbol, utcTime))
    {
        
    }
    if algorithm.insights.has_active_insights(symbol, utc_time):
        pass

    Get Insights

    To get the insights for a Symbol , index the InsightManager with the Symbol .

    if (algorithm.Insights.ContainsKey(symbol))
    {
        var insights = algorithm.Insights[symbol];
    }
    if algorithm.insights.contains_key(symbol):
        insights = algorithm.insights[symbol]

    To get the insights that pass a filter, call the GetInsights get_insights method.

    var insights = algorithm.Insights.GetInsights(insight => insight.Direction == InsightDirection.Up);
    insights = algorithm.insights.get_insights(lambda insight: insight.direction == Insightdirection.up)

    To iterate through the InsightManager , call the GetEnumerator get_enumerator method.

    var enumerator = algorithm.insights.get_enumerator();
    enumerator = algorithm.insights.get_enumerator()

    To get all of the insights that will be active at a certain UTC time, call the GetActiveInsights get_active_insights method.

    var activeInsights = algorithm.Insights.GetActiveInsights(utcTime);
    active_insights = algorithm.insights.get_active_insights(utc_time)

    Get the Next Expiry Time

    To get the next insight expiry time in UTC, call the GetNextExpiryTime get_next_expiry_time method.

    var nextExpiry = algorithm.Insights.GetNextExpiryTime();
    next_expiry = algorithm.insights.get_next_expiry_time()

    Remove Insights

    Only the Portfolio Construction model should remove insights from the InsightManager . It should remove insights when the insights expire and when the corresponding security leaves the universe .

    To remove an insight from the InsightManager , call the Remove remove method.

    var removeSuccessful = algorithm.Insights.Remove(insight);
    remove_successful = algorithm.insights.remove(insight)

    To remove all the insights for a set of Symbol objects, pass a list of Symbol objects the Clear clear method.

    algorithm.insights.clear(symbols);
    algorithm.insights.clear(symbols)

    To remove all the insights that will be expired at a certain UTC time, call the RemoveExpiredInsights remove_expired_insights method.

    var expiredInsights = algorithm.Insights.RemoveExpiredInsights(utcTime);
    expired_insights = algorithm.insights.remove_expired_insights(utc_time)

    Cancel Insights

    In some cases, you may want to cancel an Insight. For example, if a Risk Management model in your algorithm liquidates a security, it should also cancel all of the active insights for the security. If you don't cancel the insights, the Portfolio Construction model might create a new PortfolioTarget to re-enter the position.

    Another example of a situtation where you would want to cancel an Insight is when an Alpha model in your algorithm determines the trading opportunity has pre-maturely ended. For instance, say you want your algorithm to enter a long position in a security when its Relative Strength Index (RSI) moves below 20 and then liquidate the position when the security's RSI moves above 30. If you emit an Insight that has a duration of 30 days when the RSI moves below 20 but the RSI moves above 30 in 10 days, you should cancel the Insight when the RSI moves above 30.

    To cancel insights, call the Cancel cancel / Expire method with a list of Insight objects.

    algorithm.insights.cancel(insights)
    algorithm.insights.cancel(insights);

    To cancel all the insights for some securities, call the Cancel cancel / Expire method with a list of Symbol objects.

    algorithm.insights.cancel(symbols)
    algorithm.insights.cancel(symbols);

    When you cancel an active insight, it's CloseTimeUtc close_time_utc property is set to one second into the past.

    Preserve Insights Between Deployments

    Follow these steps to use the Object Store to preserve the algorithm state across live deployments:

    1. Create an algorithm that defines a storage key and adds insights to the Insight Manager .
    2. public class ObjectStoreChartingAlgorithm : QCAlgorithm
      {
          private string _insightKey;
          public override void Initialize()
          {
              _insightKey = $"{ProjectId}/insights";
              SetUniverseSelection(new ManualUniverseSelectionModel(QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA)));
              SetAlpha(new ConstantAlphaModel(InsightType.Price, InsightDirection.Up, TimeSpan.FromDays(5), 0.025, null));    
          }
      }
      class ObjectStoreChartingAlgorithm(QCAlgorithm):
          def initialize(self):
              self.insight_key = f"{self.project_id}/insights"
              self.set_universe_selection(ManualUniverseSelectionModel([ Symbol.create("SPY", SecurityType.EQUITY, Market.USA) ]))
              self.set_alpha(ConstantAlphaModel(InsightType.PRICE, InsightDirection.UP, timedelta(5), 0.025, None))
    3. At the top of the algorithm file, add the following imports:
    4. from Newtonsoft.Json import JsonConvert
      from System.Collections.Generic import List

      Insight objects are a C# objects, so you need the preceding C# libraries to serialize and deserialize them.

    5. In the OnEndOfAlgorithm on_end_of_algorithm event handler of the algorithm, get the Insight objects and save them in the Object Store as a JSON object.
    6. public override void OnEndOfAlgorithm()
      {
          var insights = Insights.GetInsights(x => x.IsActive(UtcTime));
          ObjectStore.SaveJson(_insightKey, insights);
      }
      def on_end_of_algorithm(self):
          insights = self.insights.get_insights(lambda x: x.is_active(self.utc_time))
          content = ','.join([JsonConvert.SerializeObject(x) for x in insights])
          self.object_store.save(self.insight_key, f'[{content}]')
    7. At the bottom of the Initialize initialize method, read the Insight objects from the Object Store and add them to the Insight Manager .
    8. if (ObjectStore.ContainsKey(_insightKey))
      {
          var insights = ObjectStore.ReadJson<List<Insight>>(_insightKey);
          Insights.AddRange(insights);
      }
      if self.object_store.contains_key(self.insight_key):
          insights = self.object_store.read_json[List[Insight]](self.insight_key)
          self.insights.add_range(insights)

    The following algorithm provides a full example of preserving the Insight state between deployments:

    Properties

    The InsightManager has the following properties:

     

    Charting

    Introduction

    We provide a powerful charting API that you can use to build many chart types.

    Charts

    Charts contain a collection of series, which display data on the chart. To add a chart to an algorithm, create a Chart object and then call the AddChart add_chart method.

    var chart = new Chart("<chartName>");
    AddChart(chart);
    chart = Chart("<chartName>")
    self.add_chart(chart)

    The Chart constructor expects a name argument. The following chart names are reserved:

    Series

    A chart series displays data on the chart. To add a series to a chart, create a Series object and then call the AddSeries add_series method.

    var series = new Series("<seriesName>");
    chart.AddSeries(series);
    series = Series("<seriesName>")
    chart.add_series(series)

    Arguments

    There are several other headers for the Series constructor.

    Series(name, type)
    Series(name, type, index)
    Series(name, type, index, unit)
    Series(name, type, unit)
    Series(name, type, unit, color)
    Series(name, type, unit, color, symbol)
    

    The following table describes the constructor arguments:

    Argument Data Type Description
    name string str Name of the series
    type SeriesType Type of the series
    index int Index position on the chart of the series
    unit string str Unit for the series axis
    color Color Color of the series
    symbol ScatterMarkerSymbol Symbol for the marker in a scatter plot series

    The default Series is a line chart with a "$" unit on index 0.

    Names

    The Series constructor expects a name argument. If you add a series to one of the default charts, some series names may be reserved. The following table shows the reserved series name for the default charts:

    Chart Name Reserved Series Names
    Strategy Equity Equity, Return
    Capacity Strategy Capacity
    Drawdown Equity Drawdown
    Benchmark Benchmark
    Portfolio Turnover Portfolio Turnover

    Types

    The SeriesType enumeration has the following members:

    Index

    The series index refers to its position in the chart. If all the series are at index 0, they lay on top of each other. If each series has its own index, each series will be separate on the chart. The following image shows an EMA cross chart with both EMA series set to the same index:

    Ema values are on the same chart window

    The following image shows the same EMA series, but with the short EMA on index 0 and the long EMA on index 1:

    Ema values are on separate chart windows

    Colors

    To view the available Color options, see the Color Struct Properties in the .NET documentation.

    Scatter Marker Symbols

    The ScatterMarkerSymbol enumeration has the following members:

    Candlestick Series

    A chart candlestick series displays candlesticks on the chart. To add a candlestick series to a chart, create a CandlestickSeries object and then call the AddSeries add_series method.

    var candlestickSeries = new CandlestickSeries("<seriesName>");
    chart.AddSeries(candlestickSeries);
    candlestick_series = CandlestickSeries("<seriesName>")
    chart.add_series(candlestick_series)

    There are several other headers for the CandlestickSeries constructor.

    CandlestickSeries(name)
    CandlestickSeries(name, index)
    CandlestickSeries(name, index, unit)
    CandlestickSeries(name, unit)
    

    The following table describes the constructor arguments:

    Argument Data Type Description
    name string str Name of the series
    index int Index position on the chart of the series
    unit string str Unit for the series axis

    The default CandlestickSeries has 0 index and "$" unit.

    Plot Series

    To add a data point to a chart series, call the Plot plot method. If you haven't already created a chart and series with the names you pass to the Plot plot method, the chart and/or series is automatically created.

    Plot("<chartName>", "<seriesName>", value);
    self.plot("<chartName>", "<seriesName&gt", value)

    The value argument can be an integer or decimal number. If the chart is a time series, the value is added to the chart using the algorithm time as the x-coordinate.

    To plot the current value of indicators, call the Plot plot method. The method accepts up to four indicators.

    // In Initialize
    var symbol = AddEquity("SPY");
    var smaShort = SMA(symbol, 10);
    var smaLong = SMA(symbol, 20);
    
    // In OnData
    Plot("<chartName>", smaShort, smaLong)
    # In Initialize
    symbol = self.add_equity("SPY")
    sma_short = self.sma(symbol, 10)
    sma_long = self.sma(symbol, 20)
    
    # In OnData
    self.plot("<chartName>", sma_short, sma_long)

    To plot all of the values of some indicators, in the Initialize initialize method, call the PlotIndicator plot_indicator method. The method plots each indicator value as the indicator updates. The method accepts up to four indicators.

    var symbol = AddEquity("SPY");
    var smaShort = SMA(symbol, 10);
    var smaLong = SMA(symbol, 20);
    PlotIndicator("<chartName>", smaShort, smaLong)
    symbol = self.add_equity("SPY")
    sma_short = self.sma(symbol, 10)
    sma_long = self.sma(symbol, 20)
    self.plot_indicator("<chartName>", sma_short, sma_long)

    Plot Candlestick

    To add a sample of open, high, low, and close values to a candlestick series, call the Plot plot method with the data points. If you haven't already created a chart and series with the names you pass to the Plot plot method, the chart and/or series is automatically created.

    Plot("<chartName>", "<seriesName>", open, high, low, close);
    self.plot("<chartName>", "<seriesName&gt", open, high, low, close)

    The open , high , low , and close arguments can be an integer for decimal number. If the chart is a time series, the values are added to the chart using the algorithm time as the x-coordinate.

    To plot the current trade bar, call the Plot plot method with a TradeBar argument in the OnData on_data method.

    // In Initialize
    var equity = AddEquity("SPY");
    var forex = AddForex("EURUSD");
    
    // In OnData
    var tradeBar = slice.Bars["SPY"];
    var collapsed = slice.QuoteBars["EURUSD"].Collapse();   // Collapses QuoteBar into TradeBar object
    
    Plot("<chartName1>", "<seriesName>", tradeBar)
    Plot("<chartName2>", "<seriesName>", collapsed)
    # In Initialize
    equity = self.add_equity("SPY")
    forex = self.add_forex("EURUSD")
    
    # In OnData
    trade_bar = slice.bars["SPY"];
    collapsed = slice.quote_bars["EURUSD"].collapse()   # Collapses QuoteBar into TradeBar object
    self.plot("<chartName>", "<seriesName>", trade_bar)
    self.plot("<chartName>", "<seriesName>", collapsed)

    To plot consolidated bars, call the Plot plot method with a TradeBar argument in the consolidation handler.

    // In Initialize
    var equity = AddEquity("SPY");
    Consolidate(equity.Symbol, TimeSpan.FromMinutes(10), ConsolidationHandler);
    
    // Define the consolidation handler
    void ConsolidationHandler(TradeBar consolidatedBar)
    {
        Plot("<chartName>", "<seriesName>", consolidatedBar)
    }
    # In Initialize
    equity = self.add_equity("SPY")
    self.consolidate(equity.symbol, timedelta(minutes=10), self._consolidation_handler)
    
    # Define the consolidation handler
    def _consolidation_handler(self, consolidated_bar: TradeBar) -> None:
        self.plot("<chartName>", "<seriesName>", consolidated_bar)

    Plot Asset Data

    Asset plots display the trade prices of an asset and the following order events you have for the asset:

    Order Event Icon
    Submissions Gray circle
    Updates Blue circle
    Cancellations Gray square
    Fills and partial fills Green (buys) or red (sells) arrows

    The following image shows an example asset plot for AAPL:

    AAPL stock price with order events overlaid

    The order submission icons aren't visible by default.

    For more information about these charts, including how to view them in QC Cloud, see Asset Plots for backtests or live trading .

    Examples

    The following example shows how to plot the daily closing price of SPY with a scatter plot:

    public class ChartingDemoAlgorithm : QCAlgorithm
    {
        private ExponentialMovingAverage _emaFast;
        private ExponentialMovingAverage _emaSlow;
        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2022, 1, 1);
            EnableAutomaticIndicatorWarmUp = true;
            var symbol = AddEquity("MSFT", Resolution.Daily).Symbol;
            _emaFast = EMA(symbol, 10);
            _emaSlow = EMA(symbol, 50);
            var chart = new Chart("Price");
            AddChart(chart);
            chart.AddSeries(new Series("CROSS UP", SeriesType.Scatter, "$", Color.Green, ScatterMarkerSymbol.Triangle));
            chart.AddSeries(new Series("CROSS DOWN", SeriesType.Scatter, "$", Color.Red, ScatterMarkerSymbol.TriangleDown));
            chart.AddSeries(new Series("EMA FAST", SeriesType.Line, "$", Color.Orange));
            chart.AddSeries(new Series("EMA SLOW", SeriesType.Line, "$", Color.Blue));
            chart = new Chart("Candlestick");
            AddChart(chart);
            chart.AddSeries(new CandlestickSeries("MSFT", "$"));
        }
    
        public override void OnEndOfDay(Symbol symbol)
        {
            Plot("Candlestick", "MSFT", (TradeBar)Securities[symbol].GetLastData());
            Plot("Price", "EMA FAST", _emaFast);
            Plot("Price", "EMA SLOW", _emaSlow);
            if (_emaFast > _emaSlow && _emaFast[1] < _emaSlow[1])
                Plot("Price", "CROSS UP", Securities[symbol].Price);
            else if (_emaFast < _emaSlow && _emaFast[1] > _emaSlow[1])
                Plot("Price", "CROSS DOWN", Securities[symbol].Price);
        }
    }
    class ChartingDemoAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.set_start_date(2021, 1, 1)
            self.set_end_date(2022, 1, 1)
            self.enable_automatic_indicator_warm_up = True
            symbol = self.add_equity("MSFT", Resolution.DAILY).symbol
            self.ema_fast = self.ema(symbol, 10)
            self.ema_slow = self.ema(symbol, 50)
            chart = Chart("Price")
            self.add_chart(chart)
            chart.add_series(Series("CROSS UP", SeriesType.SCATTER, "$", Color.green, ScatterMarkerSymbol.TRIANGLE))
            chart.add_series(Series("CROSS DOWN", SeriesType.SCATTER, "$", Color.red, ScatterMarkerSymbol.TRIANGLE_DOWN))
            chart.add_series(Series("EMA FAST", SeriesType.LINE, "$", Color.orange))
            chart.add_series(Series("EMA SLOW", SeriesType.LINE, "$", Color.blue))
            chart = Chart("Candlestick")
            self.add_chart(chart)
            chart.add_series(CandlestickSeries("MSFT", "$"))
                
        def on_end_of_day(self, symbol: Symbol) -> None:
            self.plot("Candlestick", "MSFT", self.securities[symbol].get_last_data())
            self.plot("Price", "EMA FAST", self.ema_fast.current.value)
            self.plot("Price", "EMA SLOW", self.ema_slow.current.value)
            if (self.ema_fast > self.ema_slow and self.ema_fast[1] < self.ema_slow[1]):
                self.plot("Price", "CROSS UP", self.securities[symbol].price)
            elif (self.ema_fast < self.ema_slow and self.ema_fast[1] > self.ema_slow[1]):
                self.plot("Price", "CROSS DOWN", self.securities[symbol].price)
    Time series of SPY closing price during 2021. Time series of SPY candlesticks price during 2021.

    To see a full example, run the CustomChartingAlgorithm CustomChartingAlgorithm .

    View Charts

    The following table describes where you can access your charts, depending on how to deploy your algorithms:

    Location Algorithm Lab Algorithms CLI Cloud Algorithms CLI Local Algorithms
    Backtest results page green check green check
    Live results page green check green check
    /backtests/read endpoint green check green check
    /live/read endpoint green check green check
    ReadBacktest method green check green check
    ReadLiveAlgorithm method green check green check
    Local JSON file in your <projectName> / backtests / <timestamp> or <projectName> / live / <timestamp> directory green check green check

    Quotas

    When you run backtests, you must stay within the plotting quotas to avoid errors.

    Cloud Quotas

    Intensive charting requires hundreds of megabytes of data, which is too much to stream online or display in a web browser. The number of series and the number of data points per series you can plot depends on your organization tier . The following table shows the quotas:

    Tier Max Series Max Data Points per Series
    Free 10 4,000
    Quant Researcher 10 8,000
    Team 25 16,000
    Trading Firm 25 32,000
    Institution 100 96,000

    If you exceed the series quota, your algorithm stops executing and the following message displays:

    Exceeded maximum chart series count, new series will be ignored. Limit is currently set at <quota>.

    If you exceed the data points per series quota, the following message displays:

    Exceeded maximum points per chart, data skipped

    If your plotting needs exceed the preceding quotas, create the plots in the Research Environment instead .

    Local Quotas

    If you execute local backtests, the charting quotas are set by the maximum-chart-series and maximum-data-points-per-chart-series configuration settings .

     

    Logging

    Introduction

    Algorithms can record string messages ('log statements') to a file for analysis after a backtest is complete, or as a live algorithm is running. These records can assist in debugging logical flow errors in the project code. Consider adding them in the code block of an if statement to signify an error has been caught.

    It's good practice to add logging statements to live algorithms so you can understand its behavior and keep records to compare against backtest results. If you don't add logging statements to a live algorithm and the algorithm doesn't trade as you expect, it's difficult to evaluate the underlying problem.

    Log Messages

    Log statements are added to the log file while your algorithm continues executing. Logging dataset information is not permitted. Use Log log method statements to debug your backtests and live trading algorithms.

    If you execute algorithms in QuantConnect Cloud, log length is capped by organization tier . If your organization hits the daily limit, contact us .

    If you log the same content multiple times, only the first instance is added to the log file. To bypass this rate-limit, add a timestamp to your log messages.

    For live trading, the log files of each cloud project can store up to 100,000 lines for up to one year. If you log more than 100,000 lines or some lines become older than one year, we remove the oldest lines in the files so your project stays within the quota.

    To record the algorithm state when the algorithm stops executing, add log statements to the OnEndOfAlgorithm on_end_of_algorithm event handler.

    Log("My log message");
    self.log("My log message")

    Debug Messages

    Debug statements are the same as log statements, but Debug debug method statements are orange in the Cloud Terminal. Use these statements when you want to give more attention to a message in the Cloud Terminal. Debug messages can be up to 200 characters in length. If you send multiple debug statements within 1 second, your messages are rate-limited to avoid crashing your browser.

    Debug("My debug message");
    self.debug("My debug message")

    Error Messages

    Error statements are the same as log statements, but Error error method statements are displayed in red text in the Cloud Terminal. Use these statements when you want to give the most attention to a message in the Cloud Terminal. Error statements are rate-limited like debug statements.

    Error("My error message");
    self.error("My error message")

    Quit Messages

    Quit statements cause your project to stop running and may log some data to the log file and Cloud Terminal. These statements are orange in the Cloud Terminal. When you call the Quit quit method method, the program continues executing until the end of the method definition. If you want to quit execution immediately, return after you call Quit quit method.

    Quit("My quit message");
    self.quit("My quit message")

    Get Logs

    The following tables describe how to access the logs of your backtests and live algorithms:

    Deployment Target Execution Mode Access Tools
    QuantConnect Cloud Backtest
    QuantConnect Cloud Live Trading
    Local Backtest
    Local Live Trading

     

    Statistics

    LEAN automatically monitors a set of statistics as your algorithms execute. You can even create custom statistics for further analysis.

    See Also

    Cloud Backtest Results

     

    Statistics

    Algorithm Statistics

    Introduction

    The StatisticsResults object tracks all the statistics of your algorithm. You can access the statistics anywhere in your algorithm where you have a reference to the algorithm class. Some of these statistics are a function of the risk free interest rate and the number of trading days per year .

    Properties

    The StatisticsResults object has the following properties:

    Add Statistics

    To add custom statistics to the StatisticsResults object, call the SetSummaryStatistic set_summary_statistic method with the statistic name and value.

    SetSummaryStatistic("name", value);
    self.set_summary_statistic("name", value)

    Get Values

    To get the StatisticsResults , use the Statistics statistics member of the algorithm class.

    var sharpe = Statistics.TotalPerformance.PortfolioStatistics.SharpeRatio;
    sharpe = self.statistics.total_performance.portfolio_statistics.sharpe_ratio

    To get the value of a custom statistic while your algorithm runs, index the Summary summary member with the statistic name. The values in the Summary summary dictionary are strings, so you may need to cast the value that returns to a different data type.

    var value = Statistics.Summary["name"];
    value = self.statistics.summary["name"]

    The following table describe other ways to get the statistics after your backtest completes:

    Deployment Target Access Tools
    QuantConnect Cloud
    Local

    Examples

    Demonstration Algorithms
    StatisticsResultsAlgorithm.py Python StatisticsResultsAlgorithm.cs C#

     

    Statistics

    Runtime Statistics

    Introduction

    Runtime statistics show the performace of your algorithm at a single moment in time. Some of these statistics are a function of the risk free interest rate and the number of trading days per year .

    Default Statistics

    The following table describes the default runtime statistics:

    Statistic Description
    Equity The total portfolio value if all of the holdings were sold at current market rates.
    Fees The total quantity of fees paid for all the transactions.
    Holdings The absolute sum of the items in the portfolio.
    Net Profit The dollar-value return across the entire trading period.
    PSR The probability that the estimated Sharpe ratio of an algorithm is greater than a benchmark (1).
    Return The rate of return across the entire trading period.
    Unrealized The amount of profit a portfolio would capture if it liquidated all open positions and paid the fees for transacting and crossing the spread.
    Volume The total value of assets traded for all of an algorithm's transactions.

    Add Statistics

    To add a custom runtime statistic, call the SetRuntimeStatistic set_runtime_statistic method with a name and value . The value argument can be a string or a number.

    SetRuntimeStatistic(name, value);
    self.set_runtime_statistic(name, value)

    Don't try to set a value for any of the preceding default runtime statistics. LEAN overwrites the value that you try to set.

    Get Values

    To get the value of a runtime statistic in an algorithm, index the RuntimeStatistics runtime_statistics member of the algorithm class with the statistic name. The values of the RuntimeStatistics runtime_statistics dictionary are strings, so you may need to cast the result to a different data type.

    var value = RuntimeStatistics[name];
    value = self.runtime_statistic[name]

    The following table describe other ways to get the runtime statistics of your backtests and live algorithms:

    Deployment Target Execution Mode Access Tools
    QuantConnect Cloud Backtest
    QuantConnect Cloud Live Trading
    Local Backtest
    Local Live Trading

     

    Live Trading

    QuantConnect enables you to run your algorithms in live mode with real-time market data. You can use the same algorithm for backtesting and live trading with different brokerages and data providers.

    See Also

    QuantConnect Live Trading
    Supported Brokerages

     

    Live Trading

    Key Concepts

    Introduction

    Algorithms should generally work seamlessly shifting from backtesting to live trading with no changes required. In backtesting algorithm events are triggered as fast as possible, whereas in live trading events are triggered in realtime.

    Algorithm Portfolio

    The live trading algorithm portfolio is loaded from the brokerage holdings, including open orders. When there are unsupported asset types in the portfolio the live trading strategy is stopped as we cannot be sure how to model the asset.

    In paper trading the algorithm starts from no portfolio, and attempts to remember the previous portfolio state from the last time the portfolio was deployed.

    Your algorithm should not assume it starts from an empty portfolio as you may have holdings from previous deployments.

    Stateful Strategies

    There is no automatic state management of live strategies in QuantConnect. We recommend algorithms reconstruct state or indicator needs using the WarmUp and History methods.

    Once the algorithm has warmed up some objects you can use the Object Store to save the data for the next algorithm restart.

    In the event the algorithm is terminated unexpectedly, you should review the live algorithm portfolio at the brokerage to confirm it will behave as expected.

    Data Delivery Times

    Most data is available at the same time as in backtesting, with the exception of daily data which is often delayed by 4-8 hours (4am - 8am).

    US Equities universe selection data is processed at 7-8am ET.

    Latency

    Live data takes time to travel from the source to your algorithm. The QuantConnect latencies vary depending on the data provider, but for US Equities, we have a latency of 5-40 milliseconds. A much more significant source of latency is the round trip order times from brokers, which can vary from 100ms to 5 seconds. QuantConnect is not intended for high-frequency trading, but we have integrations to high-speed brokers if you need.

    Other Brokerages

    If we do not support your brokerage reach out to let us and we can attempt to add them to the roadmap. With enough community requests we can build and open-source the brokerage integration.

     

    Live Trading

    Brokerages

    Introduction

    Brokerages provide you with a connection to the market so you can fill trades. To avoid placing invalid orders for execution in live trading, LEAN validates your orders before sending them to the real brokerage. To view all of the integrated brokerages, see Brokerages .

    Portfolio

    In live trading, LEAN populates the Portfolio portfolio object with your account holdings and the Transactions transactions object with your open positions. If you don't manually subscribe to the assets in your account, LEAN subscribes to them with the lowest resolution of the subscriptions in your algorithm. For example, say you hold AAPL shares in your account and create the following subscriptions in your algorithm:

    AddEquity("SPY", Resolution.Hour);
    AddEquity("MSFT", Resolution.Second);
    self.add_equity("SPY", Resolution.HOUR)
    self.add_equity("MSFT", Resolution.SECOND)

    In this case, LEAN subscribes to second-resolution data for AAPL since the lowest resolution in your algorithm is

    Resolution.Second Resolution.SECOND .

    Deposits and Withdraws

    You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account. We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time (ET).

    Monitor the Brokerage Connection

    We notify your algorithm when your brokerage connection disconnects and reconnects.

    Lost Connections

    If the brokerage connection breaks, we notify your algorithm through the OnBrokerageDisconnect on_brokerage_disconnect event handler.

    public override void OnBrokerageDisconnect() 
    {
        Debug("Brokerage connection lost");
    }
    def on_brokerage_disconnect(self) -> None:
        self.debug("Brokerage connection lost")

    Restored Connections

    When the brokerage connection restores after it disconnects, we notify your algorithm through the OnBrokerageReconnect on_brokerage_reconnect event handler.

    public override void OnBrokerageReconnect() 
    {
        Debug("Brokerage connection restored");
    }
    def on_brokerage_reconnect(self) -> None:
        self.debug("Brokerage connection restored")

    When LEAN reconnects with your brokerage, it synchronizes the state of your live orders. For example, say the brokerage fills your limit order during the period of disconnection. When the connection restores, LEAN updates the state of your portfolio and orders to reflect the filled order, but you won't receive an order event .

    Example Algorithm

    For a full example algorithm that implements the OnBrokerageDisconnect on_brokerage_disconnect and OnBrokerageReconnect on_brokerage_reconnect methods, see the BrokerageActivityEventHandlingAlgorithm BrokerageActivityEventHandlingAlgorithm in the LEAN GitHub repository.

    Monitor Brokerage Messages

    When your brokerage sends you a message, we notify your algorithm through the OnBrokerageMessage on_brokerage_message event handler.

    public override void OnBrokerageMessage(BrokerageMessageEvent messageEvent) 
    {
        Debug(f"Brokerage message received: {messageEvent.Message}");
    }
    def on_brokerage_message(self, message_event: BrokerageMessageEvent) -> None:
        self.debug(f"Brokerage message received: {message_event.message}")

    BrokerageMessageEvent objects have the following attributes:

    For a full example algorithm that implements the OnBrokerageMessage on_brokerage_message method, see the BrokerageActivityEventHandlingAlgorithm BrokerageActivityEventHandlingAlgorithm in the LEAN GitHub repository.

    To handle brokerage messages outside of your algorithm class, create and set a BrokerageMessageHandler . For a more information example, see the Reality Modeling > Brokerage Message Handler .

     

    Live Trading

    Data Providers

    Introduction

    Data providers provide a stream of asset prices and quotes delivered to your trading algorithm during live execution. You need live data provider to inject data into your algorithm so that you can make real-time trading decisions and so that the values of the securities in your portfolio update in real-time. You can source data from QuantConnect, brokerage, or a third-party source. To view the available data providers you can use in QuantConnect cloud, see Datasets . To view the available data providers you can use with local algorithms, see the Data Providers .

    Bar Building

    We aggregate ticks to build bars.

    In live trading, bars are built using the exchange timestamps with microsecond accuracy. This microsecond-by-microsecond processing of the ticks can mean that the individual bars between live trading and backtesting can have slightly different ticks. As a result, it's possible for a tick to be counted in different bars between backtesting and live trading, which can lead to bars having slightly different open, high, low, close, and volume values.

    Latency

    Live data takes time to travel from the source to your algorithm. The QuantConnect latencies vary depending on the data provider, but for US Equities, we have a latency of 5-40 milliseconds. A much more significant source of latency is the round trip order times from brokers, which can vary from 100ms to 5 seconds. QuantConnect is not intended for high-frequency trading, but we have integrations to high-speed brokers if you need.

    History Requests

    In live trading, if you make a history request for minute data at noon and the history period covers the start of the previous day to the present moment, the data from the previous day will be backtest data. The data of the current day will be live data that we collected throughout the morning. If you make this history request in a backtest, you might get slightly different data for the current day because of post-processing from the data vendor.

    Warm Up Periods

    LEAN supports an automated fast-forward system called "Warm Up". It simulates winding back the clock from the time you deploy the algorithm. In a backest, this is the StartDate start_date of your algorithm. In live trading, it's the current date. Warm Up is a great way to prepare your algorithm and its indicators for trading.

     

    Live Trading

    Trading and Orders

    Introduction

    LEAN has dozens of methods to create, update, and cancel orders. You can place orders automatically with helper methods or manually through methods on the algorithm API. You can fetch, update, and cancel manual orders with order tickets . As the state of your orders change, LEAN creates events that notify your algorithm.

    In backtesting, LEAN simulates order fills with historical data, but you can create your own fill, fee, slippage, and margin models via plugin points. You control how optimistic or pessimistic order fills are with transaction model classes. For more information about these types of models, see Reality Modeling .

    In live trading, orders fill asynchronously. We send your order to the API of your brokerage and wait for their response to update the state of your algorithm and portfolio. The timing of live order fills doesn't depend on the resolution of your security subscriptions. When your order fills, the fill price and fee is set by your brokerage. You can add event handlers to your algorithm to monitor the brokerage connection and brokerage messages .

    In backtesting, the trade fill timing depends on the resolution of your security subscription. For example, if you subscribe to a security with minute resolution data, the algorithm only receives data in one-minute time slices . As a result, the fill model can only evaluate if the order should fill on a minute-by-minute frequency.

    Order Life Cycle

    When you call one of the order methods to place an order, LEAN performs pre-order checks to ensure that the order meets some requirements and uses the last known price to check you have enough capital . To see the requirements of each order, see the Requirements section of the documentation for the order types and the Orders section of your brokerage model . If you can place the order, LEAN creates Order and OrderTicket objects. The order ticket is sent to your brokerage. As the brokerage processes your order, it returns another order ticket and it's compared against the order to see if the order is satisfied. Orders are asynchronous in live trading, so if you want to change an order, you must request it with the order ticket. Order changes are not guaranteed since your order may fill by the time brokerage receives the request.

    Flow of ordering and filling between algorithm and brokerage

    When you create an order ticket, LEAN validates it to avoid sending orders that will be rejected by your brokerage. If the order is invalid, it's status is set to OrderStatus.Invalid . Otherwise, LEAN sets the order status to OrderStatus.New , sends the order to your brokerage, and waits for the brokerage message. If your brokerage accepts the order, the order status becomes OrderStatus.Submitted . Otherwise, it becomes OrderStatus.Canceled .

    You can update orders until they fill or the brokerage prevents modifications. If you place an order update request, LEAN validates it to avoid sending orders that will be rejected by you brokerage. If the order update is valid, LEAN sends the update request and waits for the brokerage message. If your brokerage accepts the update, the order status becomes OrderStatus.UpdateSubmitted . Otherwise, it becomes OrderStatus.Canceled .

    The brokerage notifies LEAN when you order fills ( OrderStatus.Filled OrderStatus.FILLED ), partially fills ( OrderStatus.PartiallyFilled ) or is canceled ( OrderStatus.Canceled ). The brokerage can cancel your order before it completely fills. For example, if you place a market on open and the asset price moves before the market open to where you can't afford the quantity of the order, the brokerage rejects your order. The brokerage can also cancel your market on open order after partial fills if there is no shares left to trade.

    Disable Buying Power

    You can disable order margin checks and opt to let your brokerage decide to accept or reject the trades. This is helpful in live trading if you have a more permissive brokerage margin allowance that what LEAN models. The default position group buying power models are helpful for Option trading strategies. However, it can be counterproductive if it's not a supported Option strategy . To disable the validations of the default position group buying power model, use the NullSecurityPositionGroupModel . To set the NullSecurityPositionGroupModel for the portfolio, during initialization , call the SetPositions set_positions method with the SecurityPositionGroupModel. Null NULL argument.

    Portfolio.SetPositions(SecurityPositionGroupModel.Null);
    self.portfolio.set_positions(SecurityPositionGroupModel.NULL)

    To disable the validations of the default buying power model , use the NullBuyingPowerModel . To set the NullBuyingPowerModel for a security subscription, call the SetBuyingPowerModel set_buying_power_model method with the BuyingPowerModel. Null NULL argument.

    var equity = AddEquity("SPY");
    equity.SetBuyingPowerModel(BuyingPowerModel.Null);
    // Alias: 
    // equity.SetMarginModel(SecurityMarginModel.Null);
    equity = self.add_equity("SPY")
    equity.set_buying_power_model(BuyingPowerModel.NULL)
    # Alias:
    # equity.set_margin_model(SecurityMarginModel.NULL)

    You can also set the NullBuyingPowerModel in a security initializer . If your algorithm has a universe, use the security initializer technique. To set the buying power of securities in the security initializer, set the brokerage model , set the security initializer , and then create security subscriptions.

    // In Initialize
    SetSecurityInitializer(new MySecurityInitializer(BrokerageModel, new FuncSecuritySeeder(GetLastKnownPrices)));
    
    // Outside of the algorithm class
    class MySecurityInitializer : BrokerageModelSecurityInitializer
    {
        public MySecurityInitializer(IBrokerageModel brokerageModel, ISecuritySeeder securitySeeder)
            : base(brokerageModel, securitySeeder) {}    
        
        public override void Initialize(Security security)
        {
            // First, call the superclass definition
            // This method sets the reality models of each security using the default reality models of the brokerage model
            base.Initialize(security);
    
            // Next, overwrite the security buying power        
            security.SetBuyingPowerModel(BuyingPowerModel.Null);    
        }
    }
    # In Initialize
    self.set_security_initializer(MySecurityInitializer(self.brokerage_model, FuncSecuritySeeder(self.get_last_known_prices)))
    
    # Outside of the algorithm class
    class MySecurityInitializer(BrokerageModelSecurityInitializer):
    
        def __init__(self, brokerage_model: IBrokerageModel, security_seeder: ISecuritySeeder) -> None:
            super().__init__(brokerage_model, security_seeder)
        
        def initialize(self, security: Security) -> None:
            # First, call the superclass definition
            # This method sets the reality models of each security using the default reality models of the brokerage model
            super().initialize(security)
    
            # Next, overwrite the security buying power        
            security.set_buying_power_model(BuyingPowerModel.NULL)

     

    Trading and Orders

    Financial Advisors

    Introduction

    Financial Advisor accounts enable certified professionals to use a single trading algorithm to manage several client accounts. Our Interactive Brokers integration enables you to place FA group orders if your IB account code starts with F, FA, or I.

    Group Routing

    To place trades using a subset of client accounts, create Account Groups in Trader Workstation and then define the InteractiveBrokersOrderProperties when you create orders.

    DefaultOrderProperties = new InteractiveBrokersOrderProperties
    {
        FaGroup = "TestGroupEQ",
        FaMethod = "EqualQuantity",
        Account = "DU123456"
    };
    self.default_order_properties = InteractiveBrokersOrderProperties()
    self.default_order_properties.fa_group = "TestGroupEQ"
    self.default_order_properties.fa_method = "EqualQuantity"
    self.default_order_properties.account = "DU123456"

    SecurityHolding objects aggregate your positions across all the account groups. If you have two groups where group A has 10 shares of SPY and group B has -10 shares of SPY, then self.portfolio["SPY"].quantity Portfolio["SPY"].Quantity is zero.

    Allocation Methods

    LEAN supports several allocation methods for FA group orders. If you intend to use the same group allocation method for every order, set the DefaultOrderProperties default_order_properties of your algorithm, which sets the order properties for all of your orders.

    public override void Initialize()
    {
        // Set the default order properties
        DefaultOrderProperties = new InteractiveBrokersOrderProperties()
        {
            FaGroup = "TestGroupEQ",
            FaMethod = "EqualQuantity",
            Account = "DU123456"
        };
    }
    
    public override void OnData(Slice slice)
    {
        // Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);  
    }
    def initialize(self) -> None:
        # Set the default order properties
        self.default_order_properties = InteractiveBrokersOrderProperties()
        self.default_order_properties.fa_group = "TestGroupEQ"
        self.default_order_properties.fa_method = "EqualQuantity"
        self.default_order_properties.account = "DU123456"
    
    def on_data(self, slice: Slice) -> None:
        # Use default order order properties
        LimitOrder(_symbol, quantity, limitPrice);

    To adjust the order properties of an order, change the DefaultOrderProperties default_order_properties or pass an order properties object to the order method . The following sections explain the FA group allocation methods.

    Equal Quantity

    This group allocation method distributes shares equally between all accounts in the group. When you use this method, you need to specify an order quantity.

    For example, say your Account Group includes four accounts and you place an order to buy 400 shares of a stock. In this case, each account receives 100 shares. If your Account Group includes six accounts, each account receives 66 shares, and then 1 share is allocated to each account until all are distributed. After you submit the order, your algorithm receives order events to track the order progress. When all the shares are bought, the order status is OrderStatus.Filled OrderStatus.FILLED . If one of the accounts in the group can't afford 10 of the shares it needs to buy, 10 shares are cancelled and you'll only end up buying 390 shares in total.

    LimitOrder(
        _symbol, quantity, limitPrice, 
        orderProperties: new InteractiveBrokersOrderProperties
        { 
            FaMethod = "EqualQuantity" 
        }
    );
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.fa_method = "EqualQuantity"
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Net Liquidation Value

    This group allocation method distributes shares based on the net liquidation value of each account. The system calculates ratios based on the net liquidation value in each account and allocates shares based on these ratios. When you use this method, you need to specify an order quantity.

    For example, say your account group includes three accounts, A, B and C with Net Liquidation values of $25,000, $50,000 and $100,000, respectively. In this case, the system calculates a ratio of 1:2:4. If you place an order for 700 shares of a stock, it allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.

    LimitOrder(_symbol, quantity, limitPrice, 
        orderProperties: new InteractiveBrokersOrderProperties
        { 
            FaMethod = "NetLiq" 
        }
    );
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.fa_method = "NetLiq"
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Available Equity

    This group allocation method distributes shares based on the amount of available equity in each account. The system calculates ratios based on the available equity in each account and allocates shares based on these ratios. When you use this method, you need to specify an order quantity.

    For example, say your account group includes three accounts, A, B and C with available equity of $25,000, $50,000 and $100,000, respectively. In this case, the system calculates a ratio of 1:2:4. If you place an order for 700 shares of a stock, it allocates 100 shares to Client A, 200 shares to Client B, and 400 shares to Client C.

    LimitOrder(_symbol, quantity, limitPrice, 
        orderProperties: new InteractiveBrokersOrderProperties
        { 
            FaMethod = "AvailableEquity" 
        }
    );
    order_properties = InteractiveBrokersOrderProperties()
    order_properties.fa_method = "AvailableEquity"
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    Subscription Requirements

    To use FA group orders through our Interactive Brokers integration, you need to connect as a member of a Trading Firm and Institution organization. If you aren't currently on either of these tiers, upgrade your organization .

     

    Live Trading

    Reconciliation

    Introduction

    Algorithms usually perform differently between backtesting and live trading over the same time period. Backtests are simulations where we model reality as close as possible, but the modeling isn't always perfect. To measure the performance differences, we run an out-of-sample (OSS) backtest in parallel to all of your live trading deployments. The live results page displays the live equity curve and the OOS backtest equity curve of your algorithms.

    The live and OSS backtest equity curves of an Alpha

    If your algorithm is perfectly reconciled, it has an exact overlap between its live and OOS backtest equity curves. Deviations mean that the performance of your algorithm has differed between the two execution modes. Several factors can contribute to the deviations.

    Differences From Data

    The data that your algorithm uses can cause differences between backtesting and live trading performance.

    Look-Ahead Bias

    The Time Frontier minimizes the risk of look-ahead bias in backtests, but it does not completely eliminate the risk of look-ahead bias. For instance, if you use a custom dataset that contains look-ahead bias, your algorithm's live and backtest equity curves may deviate. To avoid look-ahead bias with custom datasets, set a Period period on your custom data points so that your algorithm receives the data points after the Time + Period time + period .

    Discrete Time Steps

    In backtests, we inject data into your algorithm at predictable times, according to the data resolution. In live trading, we inject data into your algorithm when new data is available. Therefore, if your algorithm has a condition with a specific time (i.e. time is 9:30:15), the condition may work in backtests but it will always fail in live trading since live data has microsecond precision. To avoid issues, either use a time range in your condition (i.e. 9:30:10 < time < 9:30:20), use a rounded time, or use a Scheduled Event.

    Custom Data Emission Times

    Custom data is often timestamped to midnight, but the data point may not be available in reality until several days after that point. If your custom dataset is prone to this delay, your backtest may not fetch the same data at the same time or frequency that your live trading algorithm receives the data, leading to deviations between backtesting and live trading. To avoid issues, ensure the timestamps of your custom dataset are the times when the data points would be available in reality.

    In backtesting, LEAN and custom data are perfectly synchonized. In live trading, daily and hourly data from a custom data source are not because of the frequency that LEAN checks the data source depends on the resolution argument. The following table shows the polling frequency of each resolution:

    Resolution Update Frequency
    Daily Every 30 minutes
    Hour Every 30 minutes
    Minute Every minute
    Second Every second
    Tick Constantly checks for new data

    Split Adjustment of Indicators

    Backtests use adjusted price data by default. Therefore, if you don't change the data normalization mode , the indicators in your backtests are updated with adjusted price data. In contrast, if a split or dividend occurs in live trading, your indicators will temporarily contain price data from before the corporate event and price data from after the corporate event. If this occurs, your indicators will produce different signals in your backtests compared to your live trading deployment. To avoid issues, reset and warm up your indicators when your algorithm receives a corporate event.

    Tick Slice Sizes

    In backtesting, we collect ticks into slices that span 1 millisecond before injecting them into your algorithm. In live trading, we collect ticks into slices that span up to 70 milliseconds before injecting them into your algorithm. This difference in slice sizes can cause deviations between your algorithm's live and OOS backtest equity curves. To avoid issues, ensure your strategy logic is compatible with both slice sizes.

    Differences From Modeling

    The modeling that your algorithm uses can cause differences between backtesting and live trading performance.

    Reality Modeling Error

    We provide brokerage models to model fees, slippage, and order fills in backtests. However, these model predictions may not always match the fees that your live algorithm incurs, leading to deviations between backtesting and live trading. You can adjust the reality models that your algorithm uses to more accurately reflect the specific assets that you're trading. For more information about reality models, see Reality Modeling .

    Market Impact

    We don't currently model market impact. So, if you are trading large orders, your fill prices can be better during backtesting than live trading, causing deviations between backtesting and live trading. To avoid issues, implement a custom fill model in your backtests that incorporates market impact.

    Fills

    In backtests, orders fill immediately. In live trading, they are sent to your brokerage and take about half a second to execute. If you fill an order in a backtest with stale data, deviations between backtesting and live trading can occur because the order is filled at a price that is likely different from the real market price. Stale order fills commonly occur in backtests when you create a Scheduled Event with an incompatible data resolution. For instance, if you subscribe to hourly data, place a Scheduled Event for 11:15 AM, and fill an order during the Scheduled Event, the order will fill at a stale price because the data between 11:00 AM and 11:15 AM is missing. To avoid stale fills, only place orders when your algorithm receives price data.

    In live trading, your brokerage provides the fill price of your orders. Since the backtesting brokerage models do not know the price at which live orders are filled, the fill price of backtest orders is based on the best price available in the current backtesting data. Similarly, limit orders can fill at different prices between backtesting and live trading. In backtesting, limit orders fill as soon as the limit price is hit. In live trading, your brokerage may fill the same limit order at a different price or fail to fill the order, depending on the position of your order in their order book.

    Borrowing Costs

    We do not currently simulate the cost of borrowing shorts in backtests. Therefore, if your algorithm takes short positions, deviations can occur between backtesting and live trading. We are working on adding the functionality to model borrowing fees. Subscribe to GitHub Issue #4563 to track the feature progress.

    Differences From Brokerage

    The brokerage that your algorithm uses can cause differences between backtesting and live trading performance.

    Portfolio Allocations on Small Accounts

    If you trade a small portfolio, it's difficult to achieve accurate portfolio allocations because shares are usually sold in whole numbers. For instance, you likely can't allocate exactly 10% of your portfolio to a security. You can use fractional shares to achieve accurate portfolio allocations, but not all brokerages support fractional shares. To get the closest results when backtesting and live trading over the same period, ensure both algorithms have the same starting cash balance.

    Different Backtest Parameters

    If you don't start your backtest and live deployment on the same date with the same holdings, deviations can occur between backtesting and live trading. To avoid issues, ensure your backtest parameters are the same as your live deployment.

    Non-deterministic State From Algorithm Restarts

    If you stop and redeploy your live trading algorithm, it needs to restart in a stateful way or else deviations can occur between backtesting and live trading. To avoid issues, redeploy your algorithm in a stateful way using the SetWarmUp set_warm_up and History history methods. Furthermore, use the Object Store to save state information between your live trading deployments.

    Existing Portfolio Securities

    If you deploy your algorithm to live trading with a brokerage account that has existing holdings, your live trading equity curve reflects your existing positions, but the backtesting curve won't. Therefore, if you have existing positions in your brokerage account when you deploy your algorithm to live trading, deviations will occur between backtesting and live trading. To avoid issues, deploy your algorithm to live trading using a separate brokerage account or subaccount that does not have existing positions.

    Brokerage Limitations

    We provide brokerage models that support specific order types and model your buying power. In backtesting, we simulate your orders  with the brokerage model you select. In live trading, we send your orders to your brokerage for execution. If the brokerage model that you use in backtesting is not the same brokerage that you use in live trading, deviations may occur between backtesting and live trading. The deviations can occur if your live brokerage doesn't support the order types that you use or if the backtesting brokerage models your buying power with a different methodology than the real brokerage. To avoid brokerage model issues, set the brokerage model in your backtest to the same brokerage that you use in live trading.

    Differences From Third-Party Indicators

    The values of our indicators can sometimes produce different results than the indicators on other platforms. There can be several reasons for these discrepancies.

    Price Differences

    If you find differences in indicator values, compare the prices that are fed into the indicator on each platform. If the input data is slightly different, the indicator values will be different. To test if it's a difference in price data, feed in the data from the third-party platform into our indicators. We validate the indicators against third-party sources and when the values are the same, the indicator values are similar too.

    Timestamp Differences

    We timestamp our data to the time when the period ends. Many other platforms timestamp to the beginning of the candle.

    Implementation Differences

    Some indicators can have slightly different default arguments for their implementation. A common difference across platforms is to use a different MovingAverageType for the indicators. To view the default arguments for all our indicators, see Supported Indicators . To view the full implementation of our indicators, see the LEAN GitHub repository .

    Warm Up Period Differences

    Some platforms use all of the historical data to warm up their indicators while LEAN indicators have a fixed number of bars they need to warm up. As a result, indicators with long memory like the Exponential Moving Average can have slightly different values across platforms.

    Risk Free Interest Rate Differences

    Some indicators, like Sharpe ratios and Sortino ratios , are a function of the risk free interest rate . LEAN provides several different ways to define the interest rate, which can lead to different indicator values compared to other platforms.

    Differences From Real-time Scheduled Events

    In live trading, Scheduled Events execute in a parallel thread based on a real-time clock. If you set a Scheduled Event to fire at 10:00 AM, it executes at exactly 10:00 AM. In backtesting, Scheduled Events are part of the main algorithm manager loop, so they may not execute exactly when you set them. For example, if your algorithm subscribes to minute resolution US Equity data with regular trading hours and you set a Scheduled Event to occur at 2:00 AM, your Scheduled Event will execute at 9:31 AM when the next bar is fed into your algorithm.

    The difference between live trading and backtesting is important to note because it can affect your algorithm's behavior. There are two common scenarios to consider.

    Execution Timing and Backtest Timeouts

    Take the following scenario:

    In this scenario, the Scheduled Events each fire at the correct time and execute without error in live trading. In backtesting, all of the Scheduled Events execute at 9:31 AM when your algorithm receives the first bar of the trading day. Since all the Scheduled Events take eight minutes to execute, the algorithm tries to execute all the Scheduled Events but reaches the 10-minute timeout and the backtest stops execution.

    Live Data Delays

    In backtests, your algorithm receives data at perfect timing. If you request minute resolution data, your algorithm receives the bars at the top of each minute. In live trading, bars have a slight delay, so you may receive them milliseconds after the top of each minute. Take the following scenario:

    In live trading, the Scheduled Event executes at exactly 10:00 AM but your algorithm may receive the 9:59-10:00 AM bar at 10:00:00.01 AM. Therefore, when you check the price in the Scheduled Event, the price from the 9:58-9:59 AM bar is the latest price. In backtesting, the Scheduled Event gets the price from the 9:59-10:00 AM bar since your algorithm receives the bar at perfect timing.

     

    Live Trading

    Notifications

    Introduction

    Set up some live trading notifications so that you are notified of market events and your algorithm's performance. QuantConnect Cloud supports email, SMS, webhooks, and Telegram notifications for live trading algorithms. If you run local algorithm with LEAN or the LEAN CLI, the notification services aren't available. To view the number of notification you can send for free in QuantConnect Cloud, see the Live Trading Notification Quotas .

    Email

    Email notifications can include up to 10KB of text content in the message body. These notifications can be slow since they go through your email provider. If you don't receive an email notification that you're expecting, check your junk folders.

    To send email notifications in your code files, run:

    Notify.Email(emailAddress, subject, body);
    self.notify.email(email_address, subject, body)

    You can include an attachment and set its name.

    var attachment = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511";
    var headers = new Dictionary<string, string> { { "filename", "trades.csv" } };
    Notify.Email(emailAddress, subject, body, attachment, headers);
    attachment = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511"
    headers = { "filename": "trades.csv" }
    self.notify.email(email_address, subject, body, attachment, headers)

    If you don't provide headers, the attachment name is attachment.txt .

    SMS

    SMS notifications are the only type of notification that you don't need an internet connection to receive.

    To send SMS notifications in your code files, run:

    Notify.Sms(phoneNumber, message);
    self.notify.sms(phone_number, message)

    Webhooks

    Webhook notifications are an HTTP-POST request to a URL you provide. The request is sent with a timeout of 300s. You can process these notifications on your web server however you want. For instance, you can inject the content of the notifications into your server's database or use it to create other notifications on your own server.

    To send webhook notifications in your code files, run:

    Notify.Web(url, data, headers);
    self.notify.web(url, data, headers)

    Telegram

    Telegram notifications are automated messages to a Telegram group.

    To send Telegram notifications in your code files, run:

    Notify.Telegram(id, message, token);
    self.notify.telegram(id, message, token)

    The id argument is your Telegram group Id. Your group Id is in the URL when you open your group chat in the Telegram web interface. For example, the group Id of web.telegram.org/z/#-503016366 is -503016366.

    The token optional argument is a token of a bot you must add to your Telegram group. To create a bot, chat with @BotFather and follow its instructions. If you want to use our bot, the username is @quantconnect_notifications_bot.

    To add emoticons to your message , convert the emoticon character to UTF-32 with the Unicode Converter on the Branah website. For example, the rocket emoji is 0001f680 in UTF-32 format, so use \U001f680 in your message.

    Terms of Use

    The notification system can't be used for data distribution.

    Examples

    Demonstration Algorithm
    LiveFeaturesAlgorithm.py Python LiveFeaturesAlgorithm.cs C#

     

    Live Trading

    Charting and Logging

    Introduction

    The live results page shows your algorithm's live trading performance. You can add custom charts and logs to the results page.

    Charting

    Charts are sampled every one and ten minutes. If you create 1-minute resolution custom charts, the IDE charting will downgrade the granularity and display the 10-minutes sampling after a certain amount of samples. There are not quotas in live trading.

    Logging

    Algorithms can record string messages ('log statements') to a file for analysis after a backtest is complete, or as a live algorithm is running. These records can assist in debugging logical flow errors in the project code. Consider adding them in the code block of an if statement to signify an error has been caught.

    It's good practice to add logging statements to live algorithms so you can understand its behavior and keep records to compare against backtest results. If you don't add logging statements to a live algorithm and the algorithm doesn't trade as you expect, it's difficult to evaluate the underlying problem.

    If you run algorithms on QuantConnect, you must stay within the log quota . To only log when your algorithm is live, use the LiveMode live_mode property.

    if (LiveMode)
    {
        Log("My log message");
    }
    if self.live_mode:
        self.log("My log message")

    Runtime Statistics

    Runtime statistics show the performace of your algorithm at a single moment in time.

    The following table describes the default runtime statistics:

    Statistic Description
    Equity The total portfolio value if all of the holdings were sold at current market rates.
    Fees The total quantity of fees paid for all the transactions.
    Holdings The absolute sum of the items in the portfolio.
    Net Profit The dollar-value return across the entire trading period.
    PSR The probability that the estimated Sharpe ratio of an algorithm is greater than a benchmark (1).
    Return The rate of return across the entire trading period.
    Unrealized The amount of profit a portfolio would capture if it liquidated all open positions and paid the fees for transacting and crossing the spread.
    Volume The total value of assets traded for all of an algorithm's transactions.

    For more information about runtime statistics, see Runtime Statistics .

     

    Live Trading

    Signal Exports

    Our Signal Export integrations let you send live trading signals to third-party services.

    See Also

    Datasets

     

    Signal Exports

    Collective2

    Introduction

    Collective2 is a service that connects strategy developers and capital allocators. With our Collective2 integration, you can send trading signals from your live algorithms to Collective2 .

    Add Providers

    To export signals to Collective2 from your algorithm, during initialization , add a Collective2 signal export provider.

    SignalExport.AddSignalExportProviders(new Collective2SignalExport(apiKey, systemId, platformId));
    
    self.signal_export.add_signal_export_providers(Collective2SignalExport(apiKey, systemId, platformId))
    

    The Collective2SignalExport constructor accepts the following arguments:

    Argument: apiKey api_key

    Your Collective2 API key. To get your API key, see Where can I find my API key? on the Collective2 website.

    Data Type: string str | Default Value: None

    Argument: systemId system_id

    Your Collective2 strategy Id. To get your strategy Id, see How do I find my strategy ID? on the Collective2 website.

    Data Type: int | Default Value: None

    Argument: platformId platform_id

    Your Platform Id from Collective2. You only need to provide this in the Private Platform Context. For more information on the World and Private Platform contexts, see Which context: "World" or "Private Platform?" in the Collective2 API Documentation . For instructions on using the Private Platform API, see the Using the API section in their documentation.

    Data Type: string str | Default Value: ""

    You can add multiple signal export providers to a single algorithm.

    Asset Classes

    Our Collective2 integration supports signals for the following asset classes:

    Send Portfolio Targets

    To send targets to Collective2, pass a PortfolioTarget object or an array a list of PortfolioTarget objects to the SetTargetPortfolio set_target_portfolio method. The method returns a boolean that represents if the targets were successfully sent to Collective2. In this situation, the number you pass to the PortfolioTarget constructor represents the portfolio weight. Don't use the PortfolioTarget.Percent PortfolioTarget.percent method.

    var target = new PortfolioTarget(_symbol, weight);
    var success = SignalExport.SetTargetPortfolio(target);
    target = PortfolioTarget(self._symbol, weight)
    success = self.signal_export.set_target_portfolio(target)

    If you use a margin account, you can send your current portfolio holdings by calling the SetTargetPortfolioFromPortfolio set_target_portfolio_from_portfolio method.

    var success = SignalExport.SetTargetPortfolioFromPortfolio();
    success = self.signal_export.set_target_portfolio_from_portfolio()

    Examples

    Demonstration Algorithms
    Collective2SignalExportDemonstrationAlgorithm.py Python Collective2PortfolioSignalExportDemonstrationAlgorithm.py Python Collective2SignalExportDemonstrationAlgorithm.cs C# Collective2PortfolioSignalExportDemonstrationAlgorithm.cs C#

     

    Signal Exports

    Numerai

    Introduction

    Numerai is a platform where you can earn rewards by uploading unique live trading signals for a universe of US Equities. The regular Numerai Tournament is built around a free dataset they provide , but with Numerai Signals , you can now use any dataset to generate your trading signals. Through our Numerai integration, you can use our rich library of alternative datasets or your own custom datasets to create and automate your Numerai Signal submissions.

    Add Providers

    To export signals to Numerai from your algorithm, during initialization , add a Numerai signal export provider.

    SignalExport.AddSignalExportProviders(new NumeraiSignalExport(publicId, secretId, modelId, fileName));
    
    self.signal_export.add_signal_export_providers(NumeraiSignalExport(publicId, secretId, modelId, fileName))
    

    The NumeraiSignalExport constructor accepts the following arguments:

    Argument: publicId public_id

    Your Numerai API key. To create and view your API keys, see the Automation section of your Account page on the Numerai website.

    Data Type: string str | Default Value: None

    Argument: secretId secret_id

    Your Numerai API secret. You get your API secret when you create a new API key.

    Data Type: string str | Default Value: None

    Argument: modelId model_id

    The Id of the Numerai model. Follow these steps to get the model Id:

    1. Open the Models page on the Numerai website.
    2. In the Models section, click the three dots next to a model.
    3. Click Copy Model ID .

    Data Type: string str | Default Value: ""

    Argument: fileName file_name

    The name for the signal file. If you use a file name that already exists, the new file overwrites the old one.

    Data Type: string str | Default Value: "predictions.csv"

    You can add multiple signal export providers to a single algorithm.

    Asset Classes

    Our Numerai integration supports signals for US Equities .

    Universe Selection

    The Numerai Signals stock market universe covers roughly the top 5,000 largest stocks in the world. The universe available on QuantConnect that's the closest match to the Numerai Signals universe is the CRSP US Total Market Index, which represents approximately 100% of the investable US Equity market regularly traded on the New York Stock Exchange and Nasdaq. This Index doesn't contain all of the stocks in the Numerai Signals universe, but you don't need to submit signals for all the stocks in the Numerai Signals universe.

    To get the constituents of the CRSP US Total Market Index, add an ETF constituents universe for the Vanguard Total Stock Market ETF, VTI.

    UniverseSettings.Asynchronous = true;
    _etfSymbol = AddEquity("VTI").Symbol;
    AddUniverse(Universe.ETF(_etfSymbol));
    self.universe_settings.asynchronous = True
    self.etf_symbol = self.add_equity("VTI").symbol 
    self.add_universe(self.universe.etf(self.etf_symbol))

    Schedule Submissions

    Every Tuesday, Wednesday, Thursday, Friday, and Saturday of the week, a new round is open for you to submit signals. Saturday rounds open at 18:00 UTC, and the submission window is open until Monday 14:30 UTC. Weekday rounds open at 13:00 UTC, and the submission window is open for 1 hour. For more information about the competition rounds, see Rounds in the Numerai documentation.

    To schedule your submissions, you can set a Scheduled Event during initialization.

    Schedule.On(
        DateRules.EveryDay(_etfSymbol),
        TimeRules.At(13, 0, TimeZones.Utc), 
        SubmitSignals);
    self.schedule.on(
        self.date_rules.every_day(self.etf_symbol),
        self.time_rules.at(13, 0, TimeZones.UTC), 
        self.submit_signals)

    Send Portfolio Targets

    To send targets, pass a list of PortfolioTarget objects to the SetTargetPortfolio set_target_portfolio method. The method returns a boolean that represents if the targets were successfully sent to Numerai Signals. In this situation, the number you pass to the PortfolioTarget constructor represents the portfolio weight. Don't use the PortfolioTarget.Percent PortfolioTarget.percent method.

    var success = SignalExport.SetTargetPortfolio(targets);
    success = self.signal_export.set_target_portfolio(targets)

    Signal Requirements

    When you submit signals to Numerai, abide by the following rules:

    Examples

    Demonstration Algorithms
    NumeraiSignalExportDemonstrationAlgorithm.py Python NumeraiSignalExportDemonstrationAlgorithm.cs C#

     

    Strategy Library

    Introduction

    The Strategy Library is a collection of tutorials written by the QuantConnect team and community members. Review these tutorials to learn about trading strategies found in the academic literature and how to implement them with QuantConnect/LEAN.

    Tutorials


    Strategy Name
    CAPM Alpha Ranking Strategy on Dow 30 Companies

    Applies CAPM model to rank Dow Jones 30 companies.

    Combining Mean Reversion and Momentum in Forex Market

    Combines momentum and mean reversion techniques in the forex markets.

    Pairs Trading-Copula vs Cointegration

    Applies Copula and Cointergration method to pairs trading.

    The Dynamic Breakout II Strategy

    A demonstration of dynamic breakout II strategy.

    Dual Thrust Trading Algorithm

    A demontration of Dual Thrust Intraday strategy.

    Can Crude Oil Predict Equity Returns

    Applies regression method to predict the return from the stock market and compare it to the short-term U.S. T-bill rate.

    Intraday Dynamic Pairs Trading using Correlation and Cointegration Approach

    A high frequency pairs trading algorithm based on cointegration.

    The Momentum Strategy Based on the Low Frequency Component of Forex Market

    Applies high frequency filter to the momentum strategy.

    Stock Selection Strategy Based on Fundamental Factors

    MorningStar Fundamental factors universe selection algorithm.

    Short-Term Reversal Strategy in Stocks

    A short term reversal algorithm which gives the opposite signal by analyzing recent period price action.

    Fundamental Factor Long Short Strategy

    A basic monthly rebalance long short algorithm based on fundamental factors.

    Asset Class Trend Following

    Selects ETFs over ten-month moving average and assigns an equally weighted allocation.

    Source: Quantpedia

    Asset Class Momentum

    Selects ETFs in different asset classes with the highest momentum and assigns an equally weighted allocation.

    Source: Quantpedia

    Residual Momentum

    Constructs a long/short portfolio based on trailing residual momentum normalized by its standard deviation

    Source: Quantpedia

    Sector Momentum

    Selects ETFs in different sectors with the highest momentum and assigns an equally weighted allocation.

    Source: Quantpedia

    Overnight Anomaly

    Buy SPY ETF at its closing price and sell it at the opening each day.

    Source: Quantpedia

    Forex Carry Trade

    Goes long the currency with the highest central bank interest rate and goes short the currency with the lowest interest rate.

    Source: Quantpedia

    Volatility Effect in Stocks

    Constructs equally weighted portfolios by selecting stocks with the lowest volatility in the past one year.

    Source: Quantpedia

    Forex Momentum

    Goes long currencies with strongest 12 month momentum against USD and goes short currencies with the lowest 12 month momentum against USD.

    Source: Quantpedia

    Pairs Trading with Stocks

    Looks for the security that minimizes the sum of squared deviations and long-short position is opened when pair prices have diverged by multiple of standard deviations.

    Source: Quantpedia

    Short Term Reversal

    Goes long stocks with the lowest return in the previous month and goes short stocks with the greatest return from the previous month.

    Source: Quantpedia

    Momentum Effect in Stocks

    Goes long stocks with the best 12-month momentum in the large-cap universe.

    Source: Quantpedia

    Momentum Effect in Country Equity Indexes

    Goes long stocks with the best 12-month momentum in the country equity indexes ETFs.

    Source: Quantpedia

    Mean Reversion Effect in Country Equity Indexes

    Goes long country equity indexes ETFs with the worst 36-month return and short ETFs with the best 36-month return.

    Source: Quantpedia

    Liquidity Effect in Stocks

    Goes long stocks with the lowest turnover and short on stocks with the highest turnover from the lowest market-cap quartile.

    Source: Quantpedia

    Volatility Risk Premium Effect

    Sells at-the-money straddle with one month until maturity and buys an offsetting 15% out-of-the-money puts each month.

    Source: Quantpedia

    Momentum Effect in Commodities Futures

    Goes long commodity futures with the highest momentum and short on futures with the lowest momentum.

    Source: Quantpedia

    Small Capitalization Stocks Premium Anomaly

    Goes long stocks with the lowest market capitalization and rebalances the portfolio once a year.

    Source: Quantpedia

    Paired Switching

    Goes long asset with better performance over the last period and rebalances portfolio every quarter.

    Source: Quantpedia

    Term Structure Effect in Commodities

    Buys each month the 20% of commodities with the highest roll-returns and shorts the 20% of commodities with the lowest roll-returns and holds the long-short positions for one month.

    Source: Quantpedia

    Momentum Effect Combined with Term Structure in Commodities

    Portfolios are formed based on roll returns and the algorithm goes long and short contracts with the highest and lowest one-month performance.

    Source: Quantpedia

    Book-to-Market Value Anomaly

    Quintile portfolios are formed based on the Book-to-Market ratio and the highest quintile is held for one year.

    Source: Quantpedia

    Gold Market Timing

    Goes long gold when the Fed model shows that the market is undervalued (the earnings yield is higher than the bond yield and their ratio is at least 2).

    Source: Quantpedia

    Turn of the Month in Equity Indexes

    Buys SPY the day before the end of the month and liquidates position on 3rd trading day of new month.

    Source: Quantpedia

    Momentum - Short Term Reversal Strategy

    Goes long stocks with the decreasing return from the winner group and short stocks with the increasing return from the loser group.

    Source: Quantpedia

    Pairs Trading with Country ETFs

    Identifies the price divergence from two highly correlated country ETFs and takes a market neutral position.

    Source: Quantpedia

    Sentiment and Style Rotation Effect in Stocks

    Creates long-short positions of growth and value stocks based on the investment sentiment.

    Source: Quantpedia

    Asset Growth Effect

    Creates long-short positions of stocks based on the annual change of their total assets.

    Source: Quantpedia

    Momentum and State of Market Filters

    Goes long and short stocks with the highest and lowest six-month momentum respectively if the previous 12 months return on the broad market index was positive.

    Source: Quantpedia

    Accrual Anomaly

    Decile portfolios are formed based on balance sheet based accruals and highest decile is shorted while lowest decile is bought for a year.

    Source: Quantpedia

    Momentum in Mutual Fund Returns

    Forms a long-short portfolio of asset management firms based on trailing rate of change and nearness to trailing high.

    Source: Quantpedia

    Momentum and Style Rotation Effect

    Goes long style index ETF with the highest 12-month momentum and short ETF with the lowest 12-month momentum.

    Source: Quantpedia

    Trading with WTI BRENT Spread

    Goes long the spread if the spread is below 20-day moving average and short if the spread is above 20-day moving average.

    Source: Quantpedia

    Momentum Effect in REITs

    Tercile portfolios are formed based on momentum and the best performing portfolio is held.

    Source: Quantpedia

    Option Expiration Week Effect

    Goes long S&P 100 index ETF during option expiration week and stays in cash during other days.

    Source: Quantpedia

    Earnings Quality Factor

    Goes long stocks with high earnings quality and short stocks with low earnings quality based on composite factor score.

    Source: Quantpedia

    January Effect in Stocks

    Invests into small cap stocks at the beginning of each January and stays invested in large cap stocks for rest of the year.

    Source: Quantpedia

    Momentum and Reversal Combined with Volatility Effect in Stocks

    Goes long on stocks from the highest performing quintile from the highest volatility group and short on stocks from the lowest performing quintile from the highest volatility group.

    Source: Quantpedia

    ROA Effect within Stocks

    Goes long on stocks with highest ROA and short stocks with the lowest ROA from each market capitalization group.

    Source: Quantpedia

    January Barometer

    Invested in equity market with ETF only if January return is positive otherwise switch investments to T-Bills.

    Source: Quantpedia

    Lunar Cycle in Equity Market

    Goes long in emerging market index ETF 7 days before the new moon and switch to a short position on emerging market index ETF 7 days before the full moon.

    Source: Quantpedia

    VIX Predicts Stock Index Returns

    Goes long on equity index ETF if the VIX is in the highest percentile short if VIX is in the lowest percentile in the last two-year history.

    Source: Quantpedia

    Combining Momentum Effect with Volume

    Goes long stocks with the highest volume from the top momentum decile and short stocks with the highest volume from the bottom momentum decile.

    Source: Quantpedia

    Short Term Reversal with Futures

    Goes long (short) on futures from the high-volume, low-open interest group with the lowest (greatest) returns in the previous week.

    Source: Quantpedia

    Pre-holiday Effect

    Invests in equity market 2 days preceding holiday days and stays in cash during the other trading days.

    Source: Quantpedia

    Beta Factors in Stocks

    Goes long stocks with the bottom beta and short stocks with the top beta, securities are weighted by the ranked betas.

    Source: Quantpedia

    Exploiting Term Structure of VIX Futures

    Buys or sells the nearest VIX futures based on the daily roll and hedge against the open positions with E-mini S&P500 futures.

    Source: Quantpedia

    12 Month Cycle in Cross-Section of Stocks Returns

    Reviews the returns from last January, going long on the top 10% winners and short the bottom 10%.

    Source: Quantpedia

    Momentum Effect in Stocks in Small Portfolios

    Goes long in the 10 stocks with the highest performance and goes short in the 10 stocks with the lowest performance in the previous one year.

    Source: Quantpedia

    Value Effect within Countries

    Invests in the cheapest 33% of country ETFs according to CAPE ratios.

    Source: Quantpedia

    Beta Factor in Country Equity Indexes

    Goes long on the low-beta portfolio and short on the high-beta portfolio in country indexes ETFs.

    Source: Quantpedia

    Price to Earnings Anomaly

    Invests in stocks with low P/E ratio.

    Fama French Five Factors

    Stock selecting strategy based on Fama-French Five Factors Model.

    Source: NYU

    Mean-Reversion Statistical Arbitrage Strategy in Stocks

    Apply statistical arbitrage to take advantage of pricing inefficiencies in stocks.

    Source: NYU

    Expected Idiosyncratic Skewness

    Stock selection strategy that calculates expected idiosyncratic skewness using Fama-French three-factor model, sorts stocks based on the calculated skewness, and longs the bottom 5%.

    Source: NYU

    Risk Premia in Forex Markets

    A strategy based on asymmetric tail risks and excess returns in forex markets.

    Source: NYU

    Seasonality Effect based on Same-Calendar Month Returns

    A strategy that takes long and short positions based on historical same-calendar month returns

    Source: NYU

    Standardized Unexpected Earnings

    Stock selection strategy that calculates the unexpected earnings, standardizes the unexpected earnings, goes long on the top 5%, and rebalances the portfolio monthly.

    Source: NYU

    Price and Earnings Momentum

    A momentum strategy based on quarterly returns and earnings growth

    Source: NYU

    Improved Momentum Strategy on Commodities Futures

    An advanced momentum strategy that modifies the basic momentum strategies by introducing Baltas and Kosowski weights and rebalances the portfolio monthly. The new weighing scheme incorporates trend strength into the trading signal, uses an efficient volatility estimator, and adds a dynamic leverage mechanism.

    Source: NYU

    Commodities Futures Trend Following

    A simple trend following strategy on commodities futures.

    Source: NYU

    Forecasting Stock Prices using a Temporal CNN Model

    Applying a Temporal Convolutional Neural Network to forecasting future stock prices.

    Source: Tampere University

    Leveraged ETFs with Systematic Risk Management

    We apply Simple Moving Averages to manage the risk of holding leveraged ETFs in an attempt to beat the S&P500

    Source: The Lead-Lag Report

    Ichimoku Clouds in the Energy Sector

    A techincal indicator crossover strategy trading the largest energy companies.

    Source: SSRN

    Intraday ETF Momentum

    A momentum strategy based on returns of the market open

    Source: NYU

    Intraday Arbitrage Between Index ETFs

    A strategy that tracks the price paths of two correlated ETFs and takes advantage of mis-pricings that arise when the price paths diverge

    Source: SSRN

    Optimal Pairs Trading

    Mathematically Deriving the Optimal Entry and Liquidation Values of a Pairs Trading Process

    Source: arXiv

    G-Score Investing

    Applying G-Score Investing to Invest in a Portfolio of Technology Stocks

    Source: SSRN

    SVM Wavelet Forecasting

    Forecasting EURJPY prices with an SVM Wavelet model

    Source: Academia

    Gradient Boosting Model

    Forecasts future intraday returns with a gradient boosting model trained on technical indicators

    Source: arXiv

    Using News Sentiment to Predict Price Direction of Drug Manufacturers

    Analyzes the news releases of drug manufacturers and places intraday trades for the stocks with positive news.

    Source: arXiv

    Gaussian Naive Bayes Model

    Forecasts the next day's return of technology stocks by fitting a gaussian naive bayes model to the historical returns of the technology sector constituents.

    Source: Academia

     

    API Reference

    Introduction

    QCAlgorithm

    class QuantConnect.Algorithm.QCAlgorithm [source]

    QC Algorithm Base Class - Handle the basic requirements of a trading algorithm, allowing user to focus on event methods. The QCAlgorithm class implements Portfolio, Securities, Transactions and Data Subscription Management.

    QCAlgorithm

    class QuantConnect.Algorithm.QCAlgorithm [source]

    QC Algorithm Base Class - Handle the basic requirements of a trading algorithm, allowing user to focus on event methods. The QCAlgorithm class implements Portfolio, Securities, Transactions and Data Subscription Management.

    Adding Data

    Adding Data

    add_cfd( ticker, resolution=None, market=None, fill_forward=True, leverage=0.0 ) [source]

    Creates and adds a new Cfd security to the algorithm

    Parameters:
    Returns:

    The new Cfd security

    Return type:

    Cfd

    AddCfd( ticker, resolution=None, market=None, fillForward=True, leverage=0.0 ) [source]

    Creates and adds a new Cfd security to the algorithm

    Parameters:
    Returns:

    The new Cfd security

    Return type:

    Cfd

    add_crypto( ticker, resolution=None, market=None, fill_forward=True, leverage=0.0 ) [source]

    Creates and adds a new Crypto security to the algorithm

    Parameters:
    Returns:

    The new Crypto security

    Return type:

    Crypto

    AddCrypto( ticker, resolution=None, market=None, fillForward=True, leverage=0.0 ) [source]

    Creates and adds a new Crypto security to the algorithm

    Parameters:
    Returns:

    The new Crypto security

    Return type:

    Crypto

    add_crypto_future( ticker, resolution=None, market=None, fill_forward=True, leverage=0.0 ) [source]

    Creates and adds a new CryptoFuture security to the algorithm

    Parameters:
    Returns:

    The new CryptoFuture security

    Return type:

    CryptoFuture

    AddCryptoFuture( ticker, resolution=None, market=None, fillForward=True, leverage=0.0 ) [source]

    Creates and adds a new CryptoFuture security to the algorithm

    Parameters:
    Returns:

    The new CryptoFuture security

    Return type:

    CryptoFuture

    add_data( type, ticker, properties, exchange_hours, resolution, fill_forward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    add_data( type, ticker, resolution, time_zone, fill_forward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    add_data( type, underlying, resolution, time_zone, fill_forward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    add_data( data_type, ticker, resolution, time_zone, fill_forward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    add_data( data_type, underlying, resolution, time_zone, fill_forward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    AddData( type, ticker, properties, exchangeHours, resolution, fillForward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    AddData( type, ticker, resolution, timeZone, fillForward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    AddData( type, underlying, resolution, timeZone, fillForward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    AddData( dataType, ticker, resolution, timeZone, fillForward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    AddData( dataType, underlying, resolution, timeZone, fillForward, leverage=1.0 ) [source]

    AddData T a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

    Parameters:
    Returns:

    The new Security

    Return type:

    Security

    add_equity( ticker, resolution=None, market=None, fill_forward=True, leverage=0.0, extended_market_hours=False, data_normalization_mode=None ) [source]

    Creates and adds a new Equity security to the algorithm

    Parameters:
    Returns:

    The new Equity security

    Return type:

    Equity

    AddEquity( ticker, resolution=None, market=None, fillForward=True, leverage=0.0, extendedMarketHours=False, dataNormalizationMode=None ) [source]

    Creates and adds a new Equity security to the algorithm

    Parameters:
    Returns:

    The new Equity security

    Return type:

    Equity

    add_forex( ticker, resolution=None, market=None, fill_forward=True, leverage=0.0 ) [source]

    Creates and adds a new Forex security to the algorithm

    Parameters:
    Returns:

    The new Forex security

    Return type:

    Forex

    AddForex( ticker, resolution=None, market=None, fillForward=True, leverage=0.0 ) [source]

    Creates and adds a new Forex security to the algorithm

    Parameters:
    Returns:

    The new Forex security

    Return type:

    Forex

    add_future( ticker, resolution=None, market=None, fill_forward=True, leverage=0.0, extended_market_hours=False, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=0 ) [source]

    Creates and adds a new Future security to the algorithm

    Parameters:
    Returns:

    The new Future security

    Return type:

    Future

    AddFuture( ticker, resolution=None, market=None, fillForward=True, leverage=0.0, extendedMarketHours=False, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=0 ) [source]

    Creates and adds a new Future security to the algorithm

    Parameters:
    Returns:

    The new Future security

    Return type:

    Future

    add_future_contract( symbol, resolution=None, fill_forward=True, leverage=0.0, extended_market_hours=False ) [source]

    Creates and adds a new single Future contract to the algorithm

    Parameters:
    Returns:

    The new Future security

    Return type:

    Future

    AddFutureContract( symbol, resolution=None, fillForward=True, leverage=0.0, extendedMarketHours=False ) [source]

    Creates and adds a new single Future contract to the algorithm

    Parameters:
    Returns:

    The new Future security

    Return type:

    Future

    add_future_option( future_symbol, option_filter ) [source]

    Creates and adds a new Future Option contract to the algorithm.

    Parameters:
    add_future_option( symbol, option_filter=None ) [source]

    Creates and adds a new Future Option contract to the algorithm.

    Parameters:
    AddFutureOption( futureSymbol, optionFilter ) [source]

    Creates and adds a new Future Option contract to the algorithm.

    Parameters:
    AddFutureOption( symbol, optionFilter=None ) [source]

    Creates and adds a new Future Option contract to the algorithm.

    Parameters:
    add_future_option_contract( symbol, resolution=None, fill_forward=True, leverage=0.0, extended_market_hours=False ) [source]

    Adds a future option contract to the algorithm.

    Parameters:
    Returns:

    Option security

    Return type:

    Option

    AddFutureOptionContract( symbol, resolution=None, fillForward=True, leverage=0.0, extendedMarketHours=False ) [source]

    Adds a future option contract to the algorithm.

    Parameters:
    Returns:

    Option security

    Return type:

    Option

    add_index( ticker, resolution=None, market=None, fill_forward=True ) [source]

    Creates and adds index options to the algorithm.

    Parameters:
    Returns:

    The new Index security

    Return type:

    Index

    AddIndex( ticker, resolution=None, market=None, fillForward=True ) [source]

    Creates and adds index options to the algorithm.

    Parameters:
    Returns:

    The new Index security

    Return type:

    Index

    add_index_option( ticker, resolution=None, market=usa, fill_forward=True ) [source]

    Creates and adds index options to the algorithm.

    Parameters:
    Returns:

    Canonical Option security

    Return type:

    Option

    add_index_option( symbol, target_option, resolution=None, fill_forward=True ) [source]

    Creates and adds index options to the algorithm.

    Parameters:
    Returns:

    Canonical Option security

    Return type:

    Option

    AddIndexOption( ticker, resolution=None, market=usa, fillForward=True ) [source]

    Creates and adds index options to the algorithm.

    Parameters:
    Returns:

    Canonical Option security

    Return type:

    Option

    AddIndexOption( symbol, targetOption, resolution=None, fillForward=True ) [source]

    Creates and adds index options to the algorithm.

    Parameters:
    Returns:

    Canonical Option security

    Return type:

    Option

    add_index_option_contract( symbol, resolution=None, fill_forward=True ) [source]

    Adds an index option contract to the algorithm.

    Parameters:
    Returns:

    Index Option Contract

    Return type:

    Option

    AddIndexOptionContract( symbol, resolution=None, fillForward=True ) [source]

    Adds an index option contract to the algorithm.

    Parameters:
    Returns:

    Index Option Contract

    Return type:

    Option

    add_option( underlying, target_option, resolution=None, market=None, fill_forward=True, leverage=0.0 ) [source]

    Creates and adds a new equity Option security to the algorithm

    Parameters:
    Returns:

    The new option security instance

    Return type:

    Option

    AddOption( underlying, targetOption, resolution=None, market=None, fillForward=True, leverage=0.0 ) [source]

    Creates and adds a new equity Option security to the algorithm

    Parameters:
    Returns:

    The new option security instance

    Return type:

    Option

    add_option_contract( symbol, resolution=None, fill_forward=True, leverage=0.0, extended_market_hours=False ) [source]

    Creates and adds a new single Option contract to the algorithm

    Parameters:
    Returns:

    The new Option security

    Return type:

    Option

    AddOptionContract( symbol, resolution=None, fillForward=True, leverage=0.0, extendedMarketHours=False ) [source]

    Creates and adds a new single Option contract to the algorithm

    Parameters:
    Returns:

    The new Option security

    Return type:

    Option

    add_security( security_type, ticker, resolution, market, fill_forward, leverage, extended_market_hours, data_mapping_mode=None, data_normalization_mode=None ) [source]

    Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine.

    Parameters:
    Return type:

    Security

    add_security( symbol, resolution=None, fill_forward=True, leverage=0.0, extended_market_hours=False, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=0 ) [source]

    Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine.

    Parameters:
    Returns:

    The new Security that was added to the algorithm

    Return type:

    Security

    AddSecurity( securityType, ticker, resolution, market, fillForward, leverage, extendedMarketHours, dataMappingMode=None, dataNormalizationMode=None ) [source]

    Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine.

    Parameters:
    Return type:

    Security

    AddSecurity( symbol, resolution=None, fillForward=True, leverage=0.0, extendedMarketHours=False, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=0 ) [source]

    Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine.

    Parameters:
    Returns:

    The new Security that was added to the algorithm

    Return type:

    Security

    download( address, headers, user_name, password ) [source]

    Downloads the requested resource as a String . The resource to download is specified as a String containing the URI.

    Parameters:
    Returns:

    The requested resource as a string

    Return type:

    str

    Download( address, headers, userName, password ) [source]

    Downloads the requested resource as a String . The resource to download is specified as a String containing the URI.

    Parameters:
    Returns:

    The requested resource as a string

    Return type:

    String

    get_last_known_prices( security ) [source]

    Yields data to warmup a security for all it's subscribed data types

    Parameters:
    Returns:

    Securities historical data

    Return type:

    List[BaseData]

    get_last_known_prices( symbol ) [source]

    Yields data to warmup a security for all it's subscribed data types

    Parameters:
    Returns:

    Securities historical data

    Return type:

    List[BaseData]

    GetLastKnownPrices( security ) [source]

    Yields data to warmup a security for all it's subscribed data types

    Parameters:
    Returns:

    Securities historical data

    Return type:

    IEnumerable[BaseData]

    GetLastKnownPrices( symbol ) [source]

    Yields data to warmup a security for all it's subscribed data types

    Parameters:
    Returns:

    Securities historical data

    Return type:

    IEnumerable[BaseData]

    on_securities_changed( changes ) [source]

    Event fired each time the we add/remove securities from the data feed

    Parameters:
    OnSecuritiesChanged( changes ) [source]

    Event fired each time the we add/remove securities from the data feed

    Parameters:
    remove_option_contract( symbol ) [source]

    Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

    Parameters:
    Return type:

    bool

    RemoveOptionContract( symbol ) [source]

    Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

    Parameters:
    Return type:

    Boolean

    remove_security( symbol ) [source]

    Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

    Parameters:
    Return type:

    bool

    RemoveSecurity( symbol ) [source]

    Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

    Parameters:
    Return type:

    Boolean

    set_future_chain_provider( future_chain_provider ) [source]

    Sets the future chain provider, used to get the list of future contracts for an underlying symbol

    Parameters:
    SetFutureChainProvider( futureChainProvider ) [source]

    Sets the future chain provider, used to get the list of future contracts for an underlying symbol

    Parameters:
    set_option_chain_provider( option_chain_provider ) [source]

    Sets the option chain provider, used to get the list of option contracts for an underlying symbol

    Parameters:
    SetOptionChainProvider( optionChainProvider ) [source]

    Sets the option chain provider, used to get the list of option contracts for an underlying symbol

    Parameters:
    set_security_initializer( security_initializer ) [source]

    Sets the security initializer, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities.

    Parameters:
    SetSecurityInitializer( securityInitializer ) [source]

    Sets the security initializer, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities.

    Parameters:
    symbol( ticker ) [source]

    Converts the string 'ticker' symbol into a full String) object This requires that the string 'ticker' has been added to the algorithm

    Parameters:
    Returns:

    The symbol object mapped to the specified ticker

    Return type:

    Symbol

    Symbol( ticker ) [source]

    Converts the string 'ticker' symbol into a full String) object This requires that the string 'ticker' has been added to the algorithm

    Parameters:
    Returns:

    The symbol object mapped to the specified ticker

    Return type:

    Symbol

    ticker( symbol ) [source]

    For the given symbol will resolve the ticker it used at the current algorithm date

    Parameters:
    Returns:

    The mapped ticker for a symbol

    Return type:

    str

    Ticker( symbol ) [source]

    For the given symbol will resolve the ticker it used at the current algorithm date

    Parameters:
    Returns:

    The mapped ticker for a symbol

    Return type:

    String

    property future_chain_provider [source]

    Gets the future chain provider, used to get the list of future contracts for an underlying symbol

    Returns:

    Gets the future chain provider, used to get the list of future contracts for an underlying symbol

    Return type:

    IFutureChainProvider

    property FutureChainProvider [source]

    Gets the future chain provider, used to get the list of future contracts for an underlying symbol

    Returns:

    Gets the future chain provider, used to get the list of future contracts for an underlying symbol

    Return type:

    IFutureChainProvider

    property option_chain_provider [source]

    Gets the option chain provider, used to get the list of option contracts for an underlying symbol

    Returns:

    Gets the option chain provider, used to get the list of option contracts for an underlying symbol

    Return type:

    IOptionChainProvider

    property OptionChainProvider [source]

    Gets the option chain provider, used to get the list of option contracts for an underlying symbol

    Returns:

    Gets the option chain provider, used to get the list of option contracts for an underlying symbol

    Return type:

    IOptionChainProvider

    property security_initializer [source]

    Gets an instance that is to be used to initialize newly created securities.

    Returns:

    Gets an instance that is to be used to initialize newly created securities.

    Return type:

    ISecurityInitializer

    property SecurityInitializer [source]

    Gets an instance that is to be used to initialize newly created securities.

    Returns:

    Gets an instance that is to be used to initialize newly created securities.

    Return type:

    ISecurityInitializer

    Algorithm Framework

    Algorithm Framework

    add_alpha( alpha ) [source]

    Adds a new alpha model

    Parameters:
    AddAlpha( alpha ) [source]

    Adds a new alpha model

    Parameters:
    add_risk_management( risk_management ) [source]

    Adds a new risk management model

    Parameters:
    AddRiskManagement( riskManagement ) [source]

    Adds a new risk management model

    Parameters:
    add_universe_selection( universe_selection ) [source]

    Adds a new universe selection model

    Parameters:
    AddUniverseSelection( universeSelection ) [source]

    Adds a new universe selection model

    Parameters:
    emit_insights( insights ) [source]

    Manually emit insights from an algorithm. This is typically invoked before calls to submit orders in algorithms written against QCAlgorithm that have been ported into the algorithm framework.

    Parameters:
    emit_insights( insight ) [source]

    Manually emit insights from an algorithm. This is typically invoked before calls to submit orders in algorithms written against QCAlgorithm that have been ported into the algorithm framework.

    Parameters:
    EmitInsights( insights ) [source]

    Manually emit insights from an algorithm. This is typically invoked before calls to submit orders in algorithms written against QCAlgorithm that have been ported into the algorithm framework.

    Parameters:
    EmitInsights( insight ) [source]

    Manually emit insights from an algorithm. This is typically invoked before calls to submit orders in algorithms written against QCAlgorithm that have been ported into the algorithm framework.

    Parameters:
    framework_post_initialize() [source]

    Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method

    FrameworkPostInitialize() [source]

    Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method

    get_locked() [source]

    Gets whether or not this algorithm has been locked and fully initialized

    Return type:

    bool

    GetLocked() [source]

    Gets whether or not this algorithm has been locked and fully initialized

    Return type:

    Boolean

    initialize() [source]

    Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.

    Initialize() [source]

    Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.

    on_framework_data( slice ) [source]

    Used to send data updates to algorithm framework models

    Parameters:
    OnFrameworkData( slice ) [source]

    Used to send data updates to algorithm framework models

    Parameters:
    on_framework_securities_changed( changes ) [source]

    Used to send security changes to algorithm framework models

    Parameters:
    OnFrameworkSecuritiesChanged( changes ) [source]

    Used to send security changes to algorithm framework models

    Parameters:
    post_initialize() [source]

    Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method

    PostInitialize() [source]

    Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method

    set_alpha( alpha ) [source]

    Sets the alpha model

    Parameters:
    SetAlpha( alpha ) [source]

    Sets the alpha model

    Parameters:
    set_execution( execution ) [source]

    Sets the execution model

    Parameters:
    SetExecution( execution ) [source]

    Sets the execution model

    Parameters:
    set_locked() [source]

    Lock the algorithm initialization to avoid user modifiying cash and data stream subscriptions

    SetLocked() [source]

    Lock the algorithm initialization to avoid user modifiying cash and data stream subscriptions

    set_portfolio_construction( portfolio_construction ) [source]

    Sets the portfolio construction model

    Parameters:
    SetPortfolioConstruction( portfolioConstruction ) [source]

    Sets the portfolio construction model

    Parameters:
    set_risk_management( risk_management ) [source]

    Sets the risk management model

    Parameters:
    SetRiskManagement( riskManagement ) [source]

    Sets the risk management model

    Parameters:
    set_universe_selection( universe_selection ) [source]

    Sets the universe selection model

    Parameters:
    SetUniverseSelection( universeSelection ) [source]

    Sets the universe selection model

    Parameters:
    property alpha [source]

    Gets or sets the alpha model

    Returns:

    Gets or sets the alpha model

    Return type:

    IAlphaModel

    property Alpha [source]

    Gets or sets the alpha model

    Returns:

    Gets or sets the alpha model

    Return type:

    IAlphaModel

    property execution [source]

    Gets or sets the execution model

    Returns:

    Gets or sets the execution model

    Return type:

    IExecutionModel

    property Execution [source]

    Gets or sets the execution model

    Returns:

    Gets or sets the execution model

    Return type:

    IExecutionModel

    property insights [source]

    Gets the insight manager

    Returns:

    Gets the insight manager

    Return type:

    InsightManager

    property Insights [source]

    Gets the insight manager

    Returns:

    Gets the insight manager

    Return type:

    InsightManager

    property portfolio_construction [source]

    Gets or sets the portfolio construction model

    Returns:

    Gets or sets the portfolio construction model

    Return type:

    IPortfolioConstructionModel

    property PortfolioConstruction [source]

    Gets or sets the portfolio construction model

    Returns:

    Gets or sets the portfolio construction model

    Return type:

    IPortfolioConstructionModel

    property risk_management [source]

    Gets or sets the risk management model

    Returns:

    Gets or sets the risk management model

    Return type:

    IRiskManagementModel

    property RiskManagement [source]

    Gets or sets the risk management model

    Returns:

    Gets or sets the risk management model

    Return type:

    IRiskManagementModel

    property universe_selection [source]

    Gets or sets the universe selection model.

    Returns:

    Gets or sets the universe selection model.

    Return type:

    IUniverseSelectionModel

    property UniverseSelection [source]

    Gets or sets the universe selection model.

    Returns:

    Gets or sets the universe selection model.

    Return type:

    IUniverseSelectionModel

    Charting

    Charting

    add_chart( chart ) [source]

    Add a Chart object to algorithm collection

    Parameters:
    AddChart( chart ) [source]

    Add a Chart object to algorithm collection

    Parameters:
    add_series( chart, series, series_type, unit=$ ) [source]

    Add a series object for charting. This is useful when initializing charts with series other than type = line. If a series exists in the chart with the same name, then it is replaced.

    Parameters:
    AddSeries( chart, series, seriesType, unit=$ ) [source]

    Add a series object for charting. This is useful when initializing charts with series other than type = line. If a series exists in the chart with the same name, then it is replaced.

    Parameters:
    get_chart_updates( clear_chart_data=False ) [source]

    Get the chart updates by fetch the recent points added and return for dynamic Charting.

    Parameters:
    Returns:

    List of chart updates since the last request

    Return type:

    List[Chart]

    GetChartUpdates( clearChartData=False ) [source]

    Get the chart updates by fetch the recent points added and return for dynamic Charting.

    Parameters:
    Returns:

    List of chart updates since the last request

    Return type:

    IEnumerable[Chart]

    plot( chart, series, open, high, low, close ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    plot( chart, first, second=None, third=None, fourth=None ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    plot( chart, series, value ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    plot( chart, series, bar ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    plot( series, py_object ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    plot( chart, indicators ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    Plot( chart, series, open, high, low, close ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    Plot( chart, first, second=None, third=None, fourth=None ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    Plot( chart, series, value ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    Plot( chart, series, bar ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    Plot( series, pyObject ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    Plot( chart, indicators ) [source]

    Plot a chart using string series name, with value.

    Parameters:
    plot_indicator( chart, wait_for_ready, first, second=None, third=None, fourth=None ) [source]

    Automatically plots each indicator when a new value is available

    Parameters:
    plot_indicator( chart, wait_for_ready, indicators ) [source]

    Automatically plots each indicator when a new value is available

    Parameters:
    PlotIndicator( chart, waitForReady, first, second=None, third=None, fourth=None ) [source]

    Automatically plots each indicator when a new value is available

    Parameters:
    PlotIndicator( chart, waitForReady, indicators ) [source]

    Automatically plots each indicator when a new value is available

    Parameters:
    record( series, value ) [source]

    Plot a chart using string series name, with int value. Alias of Plot();

    Parameters:
    Record( series, value ) [source]

    Plot a chart using string series name, with int value. Alias of Plot();

    Parameters:
    set_runtime_statistic( name, value ) [source]

    Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI.

    Parameters:
    SetRuntimeStatistic( name, value ) [source]

    Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI.

    Parameters:
    property runtime_statistics [source]

    Access to the runtime statistics property. User provided statistics.

    Returns:

    Access to the runtime statistics property. User provided statistics.

    Return type:

    Dict[str, str]

    property RuntimeStatistics [source]

    Access to the runtime statistics property. User provided statistics.

    Returns:

    Access to the runtime statistics property. User provided statistics.

    Return type:

    ConcurrentDictionary<String, String>

    Consolidating Data

    Consolidating Data

    consolidate( symbol, period, tick_type, handler ) [source]

    Registers the handler to receive consolidated data for the specified symbol

    Parameters:
    Returns:

    A new consolidator matching the requested parameters with the handler already registered

    Return type:

    IDataConsolidator

    consolidate( symbol, calendar, tick_type, handler ) [source]

    Registers the handler to receive consolidated data for the specified symbol

    Parameters:
    Returns:

    A new consolidator matching the requested parameters with the handler already registered

    Return type:

    IDataConsolidator

    Consolidate( symbol, period, tickType, handler ) [source]

    Registers the handler to receive consolidated data for the specified symbol

    Parameters:
    Returns:

    A new consolidator matching the requested parameters with the handler already registered

    Return type:

    IDataConsolidator

    Consolidate( symbol, calendar, tickType, handler ) [source]

    Registers the handler to receive consolidated data for the specified symbol

    Parameters:
    Returns:

    A new consolidator matching the requested parameters with the handler already registered

    Return type:

    IDataConsolidator

    deregister_indicator( indicator ) [source]

    Will deregister an indicator and it's associated consolidator instance so they stop receiving data updates

    Parameters:
    DeregisterIndicator( indicator ) [source]

    Will deregister an indicator and it's associated consolidator instance so they stop receiving data updates

    Parameters:
    resolve_consolidator( symbol, resolution, data_type=None ) [source]

    Gets the default consolidator for the specified symbol and resolution

    Parameters:
    Returns:

    The new default consolidator

    Return type:

    IDataConsolidator

    resolve_consolidator( symbol, time_span, data_type=None ) [source]

    Gets the default consolidator for the specified symbol and resolution

    Parameters:
    Returns:

    The new default consolidator

    Return type:

    IDataConsolidator

    ResolveConsolidator( symbol, resolution, dataType=None ) [source]

    Gets the default consolidator for the specified symbol and resolution

    Parameters:
    Returns:

    The new default consolidator

    Return type:

    IDataConsolidator

    ResolveConsolidator( symbol, timeSpan, dataType=None ) [source]

    Gets the default consolidator for the specified symbol and resolution

    Parameters:
    Returns:

    The new default consolidator

    Return type:

    IDataConsolidator

    unregister_indicator( indicator ) [source]

    Will unregister an indicator and it's associated consolidator instance so they stop receiving data updates

    Parameters:
    UnregisterIndicator( indicator ) [source]

    Will unregister an indicator and it's associated consolidator instance so they stop receiving data updates

    Parameters:

    Handling Data

    Handling Data

    cik( symbol ) [source]

    Converts a CIK identifier into String) array

    Parameters:
    Returns:

    CIK corresponding to the Symbol. If no matching CIK is found, returns null.

    Return type:

    Optional[int]

    cik( cik, trading_date=None ) [source]

    Converts a CIK identifier into String) array

    Parameters:
    Returns:

    Symbols corresponding to the CIK. If no Symbol with a matching CIK was found, returns empty array.

    Return type:

    Symbol[]

    CIK( symbol ) [source]

    Converts a CIK identifier into String) array

    Parameters:
    Returns:

    CIK corresponding to the Symbol. If no matching CIK is found, returns null.

    Return type:

    Nullable[Int32]

    CIK( cik, tradingDate=None ) [source]

    Converts a CIK identifier into String) array

    Parameters:
    Returns:

    Symbols corresponding to the CIK. If no Symbol with a matching CIK was found, returns empty array.

    Return type:

    Symbol[]

    composite_figi( composite_figi, trading_date=None ) [source]

    Converts a composite FIGI identifier into a String)

    Parameters:
    Returns:

    Symbol corresponding to the composite FIGI. If no Symbol with a matching composite FIGI was found, returns null.

    Return type:

    Symbol

    composite_figi( symbol ) [source]

    Converts a composite FIGI identifier into a String)

    Parameters:
    Returns:

    Composite FIGI corresponding to the Symbol. If no matching composite FIGI is found, returns null.

    Return type:

    str

    cusip( cusip, trading_date=None ) [source]

    Converts a CUSIP identifier into a String)

    Parameters:
    Returns:

    Symbol corresponding to the CUSIP. If no Symbol with a matching CUSIP was found, returns null.

    Return type:

    Symbol

    cusip( symbol ) [source]

    Converts a CUSIP identifier into a String)

    Parameters:
    Returns:

    CUSIP corresponding to the Symbol. If no matching CUSIP is found, returns null.

    Return type:

    str

    CUSIP( cusip, tradingDate=None ) [source]

    Converts a CUSIP identifier into a String)

    Parameters:
    Returns:

    Symbol corresponding to the CUSIP. If no Symbol with a matching CUSIP was found, returns null.

    Return type:

    Symbol

    CUSIP( symbol ) [source]

    Converts a CUSIP identifier into a String)

    Parameters:
    Returns:

    CUSIP corresponding to the Symbol. If no matching CUSIP is found, returns null.

    Return type:

    String

    fundamentals( symbol ) [source]

    Get the fundamental data for the requested symbol at the current time

    Parameters:
    Returns:

    The fundamental data for the Symbol

    Return type:

    Fundamental

    fundamentals( symbols ) [source]

    Get the fundamental data for the requested symbol at the current time

    Parameters:
    Returns:

    The fundamental data for the symbols

    Return type:

    List[Fundamental]

    Fundamentals( symbol ) [source]

    Get the fundamental data for the requested symbol at the current time

    Parameters:
    Returns:

    The fundamental data for the Symbol

    Return type:

    Fundamental

    Fundamentals( symbols ) [source]

    Get the fundamental data for the requested symbol at the current time

    Parameters:
    Returns:

    The fundamental data for the symbols

    Return type:

    List[Fundamental]

    isin( isin, trading_date=None ) [source]

    Converts an ISIN identifier into a String)

    Parameters:
    Returns:

    Symbol corresponding to the ISIN. If no Symbol with a matching ISIN was found, returns null.

    Return type:

    Symbol

    isin( symbol ) [source]

    Converts an ISIN identifier into a String)

    Parameters:
    Returns:

    ISIN corresponding to the Symbol. If no matching ISIN is found, returns null.

    Return type:

    str

    ISIN( isin, tradingDate=None ) [source]

    Converts an ISIN identifier into a String)

    Parameters:
    Returns:

    Symbol corresponding to the ISIN. If no Symbol with a matching ISIN was found, returns null.

    Return type:

    Symbol

    ISIN( symbol ) [source]

    Converts an ISIN identifier into a String)

    Parameters:
    Returns:

    ISIN corresponding to the Symbol. If no matching ISIN is found, returns null.

    Return type:

    String

    on_data( slice ) [source]

    Event - v3.0 DATA EVENT HANDLER: (Pattern) Basic template for user to override for receiving all subscription data in a single event

    Parameters:
    OnData( slice ) [source]

    Event - v3.0 DATA EVENT HANDLER: (Pattern) Basic template for user to override for receiving all subscription data in a single event

    Parameters:
    on_delistings( delistings ) [source]

    Event handler to be called when there's been a delistings event

    Parameters:
    OnDelistings( delistings ) [source]

    Event handler to be called when there's been a delistings event

    Parameters:
    on_dividends( dividends ) [source]

    Event handler to be called when there's been a dividend event

    Parameters:
    OnDividends( dividends ) [source]

    Event handler to be called when there's been a dividend event

    Parameters:
    on_end_of_algorithm() [source]

    End of algorithm run event handler. This method is called at the end of a backtest or live trading operation. Intended for closing out logs.

    OnEndOfAlgorithm() [source]

    End of algorithm run event handler. This method is called at the end of a backtest or live trading operation. Intended for closing out logs.

    on_end_of_day( symbol ) [source]

    End of a trading day event handler. This method is called at the end of the algorithm day (or multiple times if trading multiple assets).

    Parameters:
    OnEndOfDay( symbol ) [source]

    End of a trading day event handler. This method is called at the end of the algorithm day (or multiple times if trading multiple assets).

    Parameters:
    on_end_of_time_step() [source]

    Invoked at the end of every time step. This allows the algorithm to process events before advancing to the next time step.

    OnEndOfTimeStep() [source]

    Invoked at the end of every time step. This allows the algorithm to process events before advancing to the next time step.

    on_splits( splits ) [source]

    Event handler to be called when there's been a split event

    Parameters:
    OnSplits( splits ) [source]

    Event handler to be called when there's been a split event

    Parameters:
    on_symbol_changed_events( symbols_changed ) [source]

    Event handler to be called when there's been a symbol changed event

    Parameters:
    OnSymbolChangedEvents( symbolsChanged ) [source]

    Event handler to be called when there's been a symbol changed event

    Parameters:
    on_warmup_finished() [source]

    Called when the algorithm has completed initialization and warm up.

    OnWarmupFinished() [source]

    Called when the algorithm has completed initialization and warm up.

    sedol( sedol, trading_date=None ) [source]

    Converts a SEDOL identifier into a String)

    Parameters:
    Returns:

    Symbol corresponding to the SEDOL. If no Symbol with a matching SEDOL was found, returns null.

    Return type:

    Symbol

    sedol( symbol ) [source]

    Converts a SEDOL identifier into a String)

    Parameters:
    Returns:

    SEDOL corresponding to the Symbol. If no matching SEDOL is found, returns null.

    Return type:

    str

    SEDOL( sedol, tradingDate=None ) [source]

    Converts a SEDOL identifier into a String)

    Parameters:
    Returns:

    Symbol corresponding to the SEDOL. If no Symbol with a matching SEDOL was found, returns null.

    Return type:

    Symbol

    SEDOL( symbol ) [source]

    Converts a SEDOL identifier into a String)

    Parameters:
    Returns:

    SEDOL corresponding to the Symbol. If no matching SEDOL is found, returns null.

    Return type:

    String

    set_algorithm_id( algorithm_id ) [source]

    Set the algorithm id (backtestId or live deployId for the algorithm).

    Parameters:
    SetAlgorithmId( algorithmId ) [source]

    Set the algorithm id (backtestId or live deployId for the algorithm).

    Parameters:
    set_api( api ) [source]

    Provide the API for the algorithm.

    Parameters:
    SetApi( api ) [source]

    Provide the API for the algorithm.

    Parameters:
    set_available_data_types( available_data_types ) [source]

    Set the available data feeds in the SecurityManager

    Parameters:
    SetAvailableDataTypes( availableDataTypes ) [source]

    Set the available data feeds in the SecurityManager

    Parameters:
    set_current_slice( slice ) [source]

    Sets the current slice

    Parameters:
    SetCurrentSlice( slice ) [source]

    Sets the current slice

    Parameters:
    set_date_time( frontier ) [source]

    Update the internal algorithm time frontier.

    Parameters:
    SetDateTime( frontier ) [source]

    Update the internal algorithm time frontier.

    Parameters:
    set_end_date( year, month, day ) [source]

    Set the end date for a backtest run

    Parameters:
    set_end_date( end ) [source]

    Set the end date for a backtest run

    Parameters:
    SetEndDate( year, month, day ) [source]

    Set the end date for a backtest run

    Parameters:
    SetEndDate( end ) [source]

    Set the end date for a backtest run

    Parameters:
    set_object_store( object_store ) [source]

    Sets the object store

    Parameters:
    SetObjectStore( objectStore ) [source]

    Sets the object store

    Parameters:
    set_run_time_error( exception ) [source]

    Set the runtime error

    Parameters:
    SetRunTimeError( exception ) [source]

    Set the runtime error

    Parameters:
    set_start_date( year, month, day ) [source]

    Set the start date for backtest.

    Parameters:
    set_start_date( start ) [source]

    Set the start date for backtest.

    Parameters:
    SetStartDate( year, month, day ) [source]

    Set the start date for backtest.

    Parameters:
    SetStartDate( start ) [source]

    Set the start date for backtest.

    Parameters:
    set_time_zone( time_zone ) [source]

    Sets the time zone of the Time property in the algorithm

    Parameters:
    SetTimeZone( timeZone ) [source]

    Sets the time zone of the Time property in the algorithm

    Parameters:
    property algorithm_id [source]

    Algorithm Id for this backtest or live algorithm.

    Returns:

    Algorithm Id for this backtest or live algorithm.

    Return type:

    str

    property AlgorithmId [source]

    Algorithm Id for this backtest or live algorithm.

    Returns:

    Algorithm Id for this backtest or live algorithm.

    Return type:

    string

    property current_slice [source]

    Returns the current Slice object

    Returns:

    Returns the current Slice object

    Return type:

    Slice

    property CurrentSlice [source]

    Returns the current Slice object

    Returns:

    Returns the current Slice object

    Return type:

    Slice

    property end_date [source]

    Value of the user set start-date from the backtest. Controls the period of the backtest.

    Returns:

    Value of the user set start-date from the backtest. Controls the period of the backtest.

    Return type:

    datetime

    property EndDate [source]

    Value of the user set start-date from the backtest. Controls the period of the backtest.

    Returns:

    Value of the user set start-date from the backtest. Controls the period of the backtest.

    Return type:

    DateTime

    property name [source]

    Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.

    Returns:

    Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.

    Return type:

    str

    property Name [source]

    Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.

    Returns:

    Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.

    Return type:

    string

    property object_store [source]

    Gets the object store, used for persistence

    Returns:

    Gets the object store, used for persistence

    Return type:

    ObjectStore

    property ObjectStore [source]

    Gets the object store, used for persistence

    Returns:

    Gets the object store, used for persistence

    Return type:

    ObjectStore

    property settings [source]

    Gets the user settings for the algorithm

    Returns:

    Gets the user settings for the algorithm

    Return type:

    IAlgorithmSettings

    property Settings [source]

    Gets the user settings for the algorithm

    Returns:

    Gets the user settings for the algorithm

    Return type:

    IAlgorithmSettings

    property start_date [source]

    Value of the user set start-date from the backtest.

    Returns:

    Value of the user set start-date from the backtest.

    Return type:

    datetime

    property StartDate [source]

    Value of the user set start-date from the backtest.

    Returns:

    Value of the user set start-date from the backtest.

    Return type:

    DateTime

    property status [source]

    Gets or sets the current status of the algorithm

    Returns:

    Gets or sets the current status of the algorithm

    Return type:

    AlgorithmStatus

    property Status [source]

    Gets or sets the current status of the algorithm

    Returns:

    Gets or sets the current status of the algorithm

    Return type:

    AlgorithmStatus

    property subscription_manager [source]

    Generic Data Manager - Required for compiling all data feeds in order, and passing them into algorithm event methods. The subscription manager contains a list of the data feed's we're subscribed to and properties of each data feed.

    Returns:

    Generic Data Manager - Required for compiling all data feeds in order, and passing them into algorithm event methods. The subscription manager contains a list of the data feed's we're subscribed to and properties of each data feed.

    Return type:

    SubscriptionManager

    property SubscriptionManager [source]

    Generic Data Manager - Required for compiling all data feeds in order, and passing them into algorithm event methods. The subscription manager contains a list of the data feed's we're subscribed to and properties of each data feed.

    Returns:

    Generic Data Manager - Required for compiling all data feeds in order, and passing them into algorithm event methods. The subscription manager contains a list of the data feed's we're subscribed to and properties of each data feed.

    Return type:

    SubscriptionManager

    property tags [source]

    A list of tags associated with the algorithm or the backtest, useful for categorization

    Returns:

    A list of tags associated with the algorithm or the backtest, useful for categorization

    Return type:

    HashSet[str]

    property Tags [source]

    A list of tags associated with the algorithm or the backtest, useful for categorization

    Returns:

    A list of tags associated with the algorithm or the backtest, useful for categorization

    Return type:

    HashSet<String>

    property time [source]

    Read-only value for current time frontier of the algorithm in terms of the TimeZone

    Returns:

    Read-only value for current time frontier of the algorithm in terms of the TimeZone

    Return type:

    datetime

    property Time [source]

    Read-only value for current time frontier of the algorithm in terms of the TimeZone

    Returns:

    Read-only value for current time frontier of the algorithm in terms of the TimeZone

    Return type:

    DateTime

    property time_zone [source]

    Gets the time zone used for the Time property. The default value is NewYork

    Returns:

    Gets the time zone used for the Time property. The default value is NewYork

    Return type:

    datetimeZone

    property TimeZone [source]

    Gets the time zone used for the Time property. The default value is NewYork

    Returns:

    Gets the time zone used for the Time property. The default value is NewYork

    Return type:

    DateTimeZone

    property utc_time [source]

    Current date/time in UTC.

    Returns:

    Current date/time in UTC.

    Return type:

    datetime

    property UtcTime [source]

    Current date/time in UTC.

    Returns:

    Current date/time in UTC.

    Return type:

    DateTime

    CompositeFIGI( compositeFigi, tradingDate=None ) [source]

    Converts a composite FIGI identifier into a String)

    Parameters:
    Returns:

    Symbol corresponding to the composite FIGI. If no Symbol with a matching composite FIGI was found, returns null.

    Return type:

    Symbol

    CompositeFIGI( symbol ) [source]

    Converts a composite FIGI identifier into a String)

    Parameters:
    Returns:

    Composite FIGI corresponding to the Symbol. If no matching composite FIGI is found, returns null.

    Return type:

    String

    Historical Data

    Historical Data

    history( universe, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    List[BaseDataCollection]

    history( universe, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing data over the most recent span for all configured securities

    Return type:

    List[BaseDataCollection]

    history( universe, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    List[BaseDataCollection]

    history( symbols, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    history( symbols, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    history( symbols, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    history( symbols, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    List[Slice]

    history( symbols, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    List[Slice]

    history( symbols, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    List[Slice]

    history( request ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice satisfying the specified history request

    Return type:

    List[Slice]

    history( requests ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice satisfying the specified history request

    Return type:

    List[Slice]

    history( symbol, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    history( symbol, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    history( symbol, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    history( symbol, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    List[TradeBar]

    history( symbol, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    List[TradeBar]

    history( symbol, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    List[TradeBar]

    history( type, tickers, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    history( type, symbol, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    history( type, tickers, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    history( type, tickers, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    history( type, symbol, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    history( type, symbol, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    History( universe, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    IEnumerable[BaseDataCollection]

    History( universe, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing data over the most recent span for all configured securities

    Return type:

    IEnumerable[BaseDataCollection]

    History( universe, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    IEnumerable[BaseDataCollection]

    History( symbols, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    History( symbols, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    History( symbols, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    History( symbols, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    IEnumerable[Slice]

    History( symbols, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    IEnumerable[Slice]

    History( symbols, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    IEnumerable[Slice]

    History( request ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice satisfying the specified history request

    Return type:

    IEnumerable[Slice]

    History( requests ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice satisfying the specified history request

    Return type:

    IEnumerable[Slice]

    History( symbol, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    History( symbol, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    History( symbol, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    History( symbol, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    IEnumerable[TradeBar]

    History( symbol, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    IEnumerable[TradeBar]

    History( symbol, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    An enumerable of slice containing the requested historical data

    Return type:

    IEnumerable[TradeBar]

    History( type, tickers, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    History( type, symbol, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    History( type, tickers, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    History( type, tickers, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    History( type, symbol, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    History( type, symbol, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None ) [source]

    Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

    Parameters:
    Returns:

    pandas.DataFrame containing the requested historical data

    Return type:

    PyObject

    set_finished_warming_up() [source]

    Sets IsWarmingUp to false to indicate this algorithm has finished its warm up

    SetFinishedWarmingUp() [source]

    Sets IsWarmingUp to false to indicate this algorithm has finished its warm up

    set_history_provider( history_provider ) [source]

    Set the historical data provider

    Parameters:
    SetHistoryProvider( historyProvider ) [source]

    Set the historical data provider

    Parameters:
    set_warm_up( time_span, resolution ) [source]

    Sets the warm up period to the specified value

    Parameters:
    set_warm_up( bar_count, resolution ) [source]

    Sets the warm up period to the specified value

    Parameters:
    SetWarmUp( timeSpan, resolution ) [source]

    Sets the warm up period to the specified value

    Parameters:
    SetWarmUp( barCount, resolution ) [source]

    Sets the warm up period to the specified value

    Parameters:
    set_warmup( time_span, resolution ) [source]

    Sets the warm up period to the specified value

    Parameters:
    set_warmup( bar_count, resolution ) [source]

    Sets the warm up period to the specified value

    Parameters:
    SetWarmup( timeSpan, resolution ) [source]

    Sets the warm up period to the specified value

    Parameters:
    SetWarmup( barCount, resolution ) [source]

    Sets the warm up period to the specified value

    Parameters:
    property is_warming_up [source]

    Gets whether or not this algorithm is still warming up

    Returns:

    Gets whether or not this algorithm is still warming up

    Return type:

    bool

    property IsWarmingUp [source]

    Gets whether or not this algorithm is still warming up

    Returns:

    Gets whether or not this algorithm is still warming up

    Return type:

    bool

    Indicators

    Indicators

    a( target, reference, alpha_period=1, beta_period=252, resolution=None, risk_free_rate=None, selector=None ) [source]

    Adds a tag to the algorithm

    Parameters:
    Returns:

    The Alpha indicator for the given parameters

    Return type:

    Alpha

    A( target, reference, alphaPeriod=1, betaPeriod=252, resolution=None, riskFreeRate=None, selector=None ) [source]

    Adds a tag to the algorithm

    Parameters:
    Returns:

    The Alpha indicator for the given parameters

    Return type:

    Alpha

    abands( symbol, period, width=4.0, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new Acceleration Bands indicator.

    Parameters:
    Return type:

    AccelerationBands

    ABANDS( symbol, period, width=4.0, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new Acceleration Bands indicator.

    Parameters:
    Return type:

    AccelerationBands

    ad( symbol, resolution=None, selector=None ) [source]

    Creates a new AccumulationDistribution indicator.

    Parameters:
    Returns:

    The AccumulationDistribution indicator for the requested symbol over the specified period

    Return type:

    AccumulationDistribution

    AD( symbol, resolution=None, selector=None ) [source]

    Creates a new AccumulationDistribution indicator.

    Parameters:
    Returns:

    The AccumulationDistribution indicator for the requested symbol over the specified period

    Return type:

    AccumulationDistribution

    addiff( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Difference indicator

    Parameters:
    Returns:

    The AdvanceDecline Difference indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineDifference

    ADDIFF( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Difference indicator

    Parameters:
    Returns:

    The AdvanceDecline Difference indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineDifference

    adosc( symbol, fast_period, slow_period, resolution=None, selector=None ) [source]

    Creates a new AccumulationDistributionOscillator indicator.

    Parameters:
    Returns:

    The AccumulationDistributionOscillator indicator for the requested symbol over the specified period

    Return type:

    AccumulationDistributionOscillator

    ADOSC( symbol, fastPeriod, slowPeriod, resolution=None, selector=None ) [source]

    Creates a new AccumulationDistributionOscillator indicator.

    Parameters:
    Returns:

    The AccumulationDistributionOscillator indicator for the requested symbol over the specified period

    Return type:

    AccumulationDistributionOscillator

    adr( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Ratio indicator

    Parameters:
    Returns:

    The AdvanceDecline Ratio indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineRatio

    ADR( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Ratio indicator

    Parameters:
    Returns:

    The AdvanceDecline Ratio indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineRatio

    advr( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Volume Ratio indicator

    Parameters:
    Returns:

    The AdvanceDecline Volume Ratio indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineVolumeRatio

    ADVR( symbols, resolution=None, selector=None ) [source]

    Creates a new Advance/Decline Volume Ratio indicator

    Parameters:
    Returns:

    The AdvanceDecline Volume Ratio indicator for the requested symbol over the specified period

    Return type:

    AdvanceDeclineVolumeRatio

    adx( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Average Directional Index indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Average Directional Index indicator for the requested symbol.

    Return type:

    AverageDirectionalIndex

    ADX( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Average Directional Index indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Average Directional Index indicator for the requested symbol.

    Return type:

    AverageDirectionalIndex

    adxr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new AverageDirectionalMovementIndexRating indicator.

    Parameters:
    Returns:

    The AverageDirectionalMovementIndexRating indicator for the requested symbol over the specified period

    Return type:

    AverageDirectionalMovementIndexRating

    ADXR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new AverageDirectionalMovementIndexRating indicator.

    Parameters:
    Returns:

    The AverageDirectionalMovementIndexRating indicator for the requested symbol over the specified period

    Return type:

    AverageDirectionalMovementIndexRating

    alma( symbol, period, sigma=6, offset=0.85, resolution=None, selector=None ) [source]

    Creates a new ArnaudLegouxMovingAverage indicator.

    Parameters:
    Returns:

    The ArnaudLegouxMovingAverage indicator for the requested symbol over the specified period

    Return type:

    ArnaudLegouxMovingAverage

    ALMA( symbol, period, sigma=6, offset=0.85, resolution=None, selector=None ) [source]

    Creates a new ArnaudLegouxMovingAverage indicator.

    Parameters:
    Returns:

    The ArnaudLegouxMovingAverage indicator for the requested symbol over the specified period

    Return type:

    ArnaudLegouxMovingAverage

    ao( symbol, slow_period, fast_period, type, resolution=None, selector=None ) [source]

    Creates a new Awesome Oscillator from the specified periods.

    Parameters:
    Return type:

    AwesomeOscillator

    AO( symbol, slowPeriod, fastPeriod, type, resolution=None, selector=None ) [source]

    Creates a new Awesome Oscillator from the specified periods.

    Parameters:
    Return type:

    AwesomeOscillator

    apo( symbol, fast_period, slow_period, moving_average_type, resolution=None, selector=None ) [source]

    Creates a new AbsolutePriceOscillator indicator.

    Parameters:
    Returns:

    The AbsolutePriceOscillator indicator for the requested symbol over the specified period

    Return type:

    AbsolutePriceOscillator

    APO( symbol, fastPeriod, slowPeriod, movingAverageType, resolution=None, selector=None ) [source]

    Creates a new AbsolutePriceOscillator indicator.

    Parameters:
    Returns:

    The AbsolutePriceOscillator indicator for the requested symbol over the specified period

    Return type:

    AbsolutePriceOscillator

    aps( symbol, period=3, resolution=None, selector=None ) [source]

    Creates an AugenPriceSpike indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The AugenPriceSpike indicator for the given parameters

    Return type:

    AugenPriceSpike

    APS( symbol, period=3, resolution=None, selector=None ) [source]

    Creates an AugenPriceSpike indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The AugenPriceSpike indicator for the given parameters

    Return type:

    AugenPriceSpike

    arima( symbol, ar_order, diff_order, ma_order, period, resolution=None, selector=None ) [source]

    Creates a new ARIMA indicator.

    Parameters:
    Returns:

    The ARIMA indicator for the requested symbol over the specified period

    Return type:

    AutoRegressiveIntegratedMovingAverage

    ARIMA( symbol, arOrder, diffOrder, maOrder, period, resolution=None, selector=None ) [source]

    Creates a new ARIMA indicator.

    Parameters:
    Returns:

    The ARIMA indicator for the requested symbol over the specified period

    Return type:

    AutoRegressiveIntegratedMovingAverage

    aroon( symbol, up_period, down_period, resolution=None, selector=None ) [source]

    Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

    Parameters:
    Returns:

    An AroonOscillator configured with the specified periods

    Return type:

    AroonOscillator

    aroon( symbol, period, resolution=None, selector=None ) [source]

    Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

    Parameters:
    Returns:

    An AroonOscillator configured with the specified periods

    Return type:

    AroonOscillator

    AROON( symbol, upPeriod, downPeriod, resolution=None, selector=None ) [source]

    Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

    Parameters:
    Returns:

    An AroonOscillator configured with the specified periods

    Return type:

    AroonOscillator

    AROON( symbol, period, resolution=None, selector=None ) [source]

    Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

    Parameters:
    Returns:

    An AroonOscillator configured with the specified periods

    Return type:

    AroonOscillator

    asi( symbol, limit_move, resolution=4, selector=None ) [source]

    Creates a Wilder Accumulative Swing Index (ASI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderAccumulativeSwingIndex for the given parameters

    Return type:

    WilderAccumulativeSwingIndex

    ASI( symbol, limitMove, resolution=4, selector=None ) [source]

    Creates a Wilder Accumulative Swing Index (ASI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderAccumulativeSwingIndex for the given parameters

    Return type:

    WilderAccumulativeSwingIndex

    atr( symbol, period, type=0, resolution=None, selector=None ) [source]

    Creates a new AverageTrueRange indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new AverageTrueRange indicator with the specified smoothing type and period

    Return type:

    AverageTrueRange

    ATR( symbol, period, type=0, resolution=None, selector=None ) [source]

    Creates a new AverageTrueRange indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new AverageTrueRange indicator with the specified smoothing type and period

    Return type:

    AverageTrueRange

    b( target, reference, period, resolution=None, selector=None ) [source]

    Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

    Parameters:
    Returns:

    The Beta indicator for the given parameters

    Return type:

    Beta

    B( target, reference, period, resolution=None, selector=None ) [source]

    Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

    Parameters:
    Returns:

    The Beta indicator for the given parameters

    Return type:

    Beta

    bb( symbol, period, k, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

    Parameters:
    Returns:

    A BollingerBands configured with the specified period

    Return type:

    BollingerBands

    BB( symbol, period, k, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

    Parameters:
    Returns:

    A BollingerBands configured with the specified period

    Return type:

    BollingerBands

    bop( symbol, resolution=None, selector=None ) [source]

    Creates a new Balance Of Power indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Balance Of Power indicator for the requested symbol.

    Return type:

    BalanceOfPower

    BOP( symbol, resolution=None, selector=None ) [source]

    Creates a new Balance Of Power indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Balance Of Power indicator for the requested symbol.

    Return type:

    BalanceOfPower

    c( target, reference, period, correlation_type=0, resolution=None, selector=None ) [source]

    Converts a composite FIGI identifier into a String)

    Parameters:
    Returns:

    The Correlation indicator for the given parameters

    Return type:

    Correlation

    C( target, reference, period, correlationType=0, resolution=None, selector=None ) [source]

    Converts a composite FIGI identifier into a String)

    Parameters:
    Returns:

    The Correlation indicator for the given parameters

    Return type:

    Correlation

    cc( symbol, short_roc_period=11, long_roc_period=14, lwma_period=10, resolution=None, selector=None ) [source]

    Initializes a new instance of the CoppockCurve indicator

    Parameters:
    Returns:

    The Coppock Curve indicator for the requested symbol over the specified period

    Return type:

    CoppockCurve

    CC( symbol, shortRocPeriod=11, longRocPeriod=14, lwmaPeriod=10, resolution=None, selector=None ) [source]

    Initializes a new instance of the CoppockCurve indicator

    Parameters:
    Returns:

    The Coppock Curve indicator for the requested symbol over the specified period

    Return type:

    CoppockCurve

    cci( symbol, period, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new CommodityChannelIndex indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The CommodityChannelIndex indicator for the requested symbol over the specified period

    Return type:

    CommodityChannelIndex

    CCI( symbol, period, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new CommodityChannelIndex indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The CommodityChannelIndex indicator for the requested symbol over the specified period

    Return type:

    CommodityChannelIndex

    cmf( symbol, period, resolution=None, selector=None ) [source]

    Creates a new ChaikinMoneyFlow indicator.

    Parameters:
    Returns:

    The ChaikinMoneyFlow indicator for the requested symbol over the specified period

    Return type:

    ChaikinMoneyFlow

    CMF( symbol, period, resolution=None, selector=None ) [source]

    Creates a new ChaikinMoneyFlow indicator.

    Parameters:
    Returns:

    The ChaikinMoneyFlow indicator for the requested symbol over the specified period

    Return type:

    ChaikinMoneyFlow

    cmo( symbol, period, resolution=None, selector=None ) [source]

    Creates a new ChandeMomentumOscillator indicator.

    Parameters:
    Returns:

    The ChandeMomentumOscillator indicator for the requested symbol over the specified period

    Return type:

    ChandeMomentumOscillator

    CMO( symbol, period, resolution=None, selector=None ) [source]

    Creates a new ChandeMomentumOscillator indicator.

    Parameters:
    Returns:

    The ChandeMomentumOscillator indicator for the requested symbol over the specified period

    Return type:

    ChandeMomentumOscillator

    create_indicator_name( symbol, type, resolution ) [source]

    Creates a new name for an indicator created with the convenience functions (SMA, EMA, ect...)

    Parameters:
    Returns:

    A unique for the given parameters

    Return type:

    str

    CreateIndicatorName( symbol, type, resolution ) [source]

    Creates a new name for an indicator created with the convenience functions (SMA, EMA, ect...)

    Parameters:
    Returns:

    A unique for the given parameters

    Return type:

    String

    d( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    Send a debug message to the web console:

    Parameters:
    Returns:

    A new Delta indicator for the specified symbol

    Return type:

    Delta

    D( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    Send a debug message to the web console:

    Parameters:
    Returns:

    A new Delta indicator for the specified symbol

    Return type:

    Delta

    dch( symbol, upper_period, lower_period, resolution=None, selector=None ) [source]

    Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Donchian Channel indicator for the requested symbol.

    Return type:

    DonchianChannel

    dch( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Donchian Channel indicator for the requested symbol.

    Return type:

    DonchianChannel

    DCH( symbol, upperPeriod, lowerPeriod, resolution=None, selector=None ) [source]

    Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Donchian Channel indicator for the requested symbol.

    Return type:

    DonchianChannel

    DCH( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Donchian Channel indicator for the requested symbol.

    Return type:

    DonchianChannel

    dem( symbol, period, type, resolution=None, selector=None ) [source]

    Creates a new DeMarker Indicator (DEM), an oscillator-type indicator measuring changes in terms of an asset's High and Low tradebar values.

    Parameters:
    Returns:

    The DeMarker indicator for the requested symbol.

    Return type:

    DeMarkerIndicator

    DEM( symbol, period, type, resolution=None, selector=None ) [source]

    Creates a new DeMarker Indicator (DEM), an oscillator-type indicator measuring changes in terms of an asset's High and Low tradebar values.

    Parameters:
    Returns:

    The DeMarker indicator for the requested symbol.

    Return type:

    DeMarkerIndicator

    dema( symbol, period, resolution=None, selector=None ) [source]

    Creates a new DoubleExponentialMovingAverage indicator.

    Parameters:
    Returns:

    The DoubleExponentialMovingAverage indicator for the requested symbol over the specified period

    Return type:

    floatExponentialMovingAverage

    DEMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new DoubleExponentialMovingAverage indicator.

    Parameters:
    Returns:

    The DoubleExponentialMovingAverage indicator for the requested symbol over the specified period

    Return type:

    DoubleExponentialMovingAverage

    do( symbol, rsi_period, smoothing_rsi_period, double_smoothing_rsi_period, signal_line_period, resolution=None, selector=None ) [source]

    Creates a new DerivativeOscillator indicator.

    Parameters:
    Returns:

    The DerivativeOscillator indicator for the requested symbol over the specified period

    Return type:

    DerivativeOscillator

    DO( symbol, rsiPeriod, smoothingRsiPeriod, doubleSmoothingRsiPeriod, signalLinePeriod, resolution=None, selector=None ) [source]

    Creates a new DerivativeOscillator indicator.

    Parameters:
    Returns:

    The DerivativeOscillator indicator for the requested symbol over the specified period

    Return type:

    DerivativeOscillator

    dpo( symbol, period, resolution=None, selector=None ) [source]

    Creates a new DetrendedPriceOscillator indicator.

    Parameters:
    Returns:

    A new registered DetrendedPriceOscillator indicator for the requested symbol over the specified period

    Return type:

    DetrendedPriceOscillator

    DPO( symbol, period, resolution=None, selector=None ) [source]

    Creates a new DetrendedPriceOscillator indicator.

    Parameters:
    Returns:

    A new registered DetrendedPriceOscillator indicator for the requested symbol over the specified period

    Return type:

    DetrendedPriceOscillator

    ema( symbol, period, smoothing_factor, resolution=None, selector=None ) [source]

    Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The ExponentialMovingAverage for the given parameters

    Return type:

    ExponentialMovingAverage

    EMA( symbol, period, smoothingFactor, resolution=None, selector=None ) [source]

    Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The ExponentialMovingAverage for the given parameters

    Return type:

    ExponentialMovingAverage

    emv( symbol, period=1, scale=10000, resolution=None, selector=None ) [source]

    Creates an EaseOfMovementValue indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The EaseOfMovementValue indicator for the given parameters

    Return type:

    EaseOfMovementValue

    EMV( symbol, period=1, scale=10000, resolution=None, selector=None ) [source]

    Creates an EaseOfMovementValue indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The EaseOfMovementValue indicator for the given parameters

    Return type:

    EaseOfMovementValue

    filtered_identity( symbol, resolution, selector=None, filter=None, field_name=None ) [source]

    Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new FilteredIdentity indicator for the specified symbol and selector

    Return type:

    FilteredIdentity

    FilteredIdentity( symbol, resolution, selector=None, filter=None, fieldName=None ) [source]

    Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new FilteredIdentity indicator for the specified symbol and selector

    Return type:

    FilteredIdentity

    fish( symbol, period, resolution=None, selector=None ) [source]

    Creates an FisherTransform indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The FisherTransform for the given parameters

    Return type:

    FisherTransform

    FISH( symbol, period, resolution=None, selector=None ) [source]

    Creates an FisherTransform indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The FisherTransform for the given parameters

    Return type:

    FisherTransform

    frama( symbol, period, long_period=198, resolution=None, selector=None ) [source]

    Creates an FractalAdaptiveMovingAverage (FRAMA) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The FRAMA for the given parameters

    Return type:

    FractalAdaptiveMovingAverage

    FRAMA( symbol, period, longPeriod=198, resolution=None, selector=None ) [source]

    Creates an FractalAdaptiveMovingAverage (FRAMA) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The FRAMA for the given parameters

    Return type:

    FractalAdaptiveMovingAverage

    g( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    A new Gamma indicator for the specified symbol

    Return type:

    Gamma

    G( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    A new Gamma indicator for the specified symbol

    Return type:

    Gamma

    heikin_ashi( symbol, resolution=None, selector=None ) [source]

    Creates a new Heikin-Ashi indicator.

    Parameters:
    Returns:

    The Heikin-Ashi indicator for the requested symbol over the specified period

    Return type:

    HeikinAshi

    HeikinAshi( symbol, resolution=None, selector=None ) [source]

    Creates a new Heikin-Ashi indicator.

    Parameters:
    Returns:

    The Heikin-Ashi indicator for the requested symbol over the specified period

    Return type:

    HeikinAshi

    hma( symbol, period, resolution=None, selector=None ) [source]

    Creates a new HullMovingAverage indicator. The Hull moving average is a series of nested weighted moving averages, is fast and smooth.

    Parameters:
    Return type:

    HullMovingAverage

    HMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new HullMovingAverage indicator. The Hull moving average is a series of nested weighted moving averages, is fast and smooth.

    Parameters:
    Return type:

    HullMovingAverage

    ht( symbol, length, in_phase_multiplication_factor, quadrature_multiplication_factor, resolution=None, selector=None ) [source]

    Creates a new Hilbert Transform indicator

    Parameters:
    Return type:

    HilbertTransform

    HT( symbol, length, inPhaseMultiplicationFactor, quadratureMultiplicationFactor, resolution=None, selector=None ) [source]

    Creates a new Hilbert Transform indicator

    Parameters:
    Return type:

    HilbertTransform

    ichimoku( symbol, tenkan_period, kijun_period, senkou_a_period, senkou_b_period, senkou_a_delay_period, senkou_b_delay_period, resolution=None, selector=None ) [source]

    Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new IchimokuKinkoHyo indicator with the specified periods and delays

    Return type:

    IchimokuKinkoHyo

    ICHIMOKU( symbol, tenkanPeriod, kijunPeriod, senkouAPeriod, senkouBPeriod, senkouADelayPeriod, senkouBDelayPeriod, resolution=None, selector=None ) [source]

    Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new IchimokuKinkoHyo indicator with the specified periods and delays

    Return type:

    IchimokuKinkoHyo

    identity( symbol, resolution, selector=None, field_name=None ) [source]

    Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new Identity indicator for the specified symbol and selector

    Return type:

    Identity

    Identity( symbol, resolution, selector=None, fieldName=None ) [source]

    Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new Identity indicator for the specified symbol and selector

    Return type:

    Identity

    iv( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, period=252, resolution=None ) [source]

    Creates a new ImpliedVolatility indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new ImpliedVolatility indicator for the specified symbol

    Return type:

    ImpliedVolatility

    IV( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, period=252, resolution=None ) [source]

    Creates a new ImpliedVolatility indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

    Parameters:
    Returns:

    A new ImpliedVolatility indicator for the specified symbol

    Return type:

    ImpliedVolatility

    kama( symbol, period, fast_ema_period, slow_ema_period, resolution=None, selector=None ) [source]

    Creates a new KaufmanAdaptiveMovingAverage indicator.

    Parameters:
    Returns:

    The KaufmanAdaptiveMovingAverage indicator for the requested symbol over the specified period

    Return type:

    KaufmanAdaptiveMovingAverage

    KAMA( symbol, period, fastEmaPeriod, slowEmaPeriod, resolution=None, selector=None ) [source]

    Creates a new KaufmanAdaptiveMovingAverage indicator.

    Parameters:
    Returns:

    The KaufmanAdaptiveMovingAverage indicator for the requested symbol over the specified period

    Return type:

    KaufmanAdaptiveMovingAverage

    kch( symbol, period, k, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new Keltner Channels indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Keltner Channel indicator for the requested symbol.

    Return type:

    KeltnerChannels

    KCH( symbol, period, k, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new Keltner Channels indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Keltner Channel indicator for the requested symbol.

    Return type:

    KeltnerChannels

    ker( symbol, period=2, resolution=None, selector=None ) [source]

    Creates an KaufmanEfficiencyRatio indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The KaufmanEfficiencyRatio indicator for the given parameters

    Return type:

    KaufmanEfficiencyRatio

    KER( symbol, period=2, resolution=None, selector=None ) [source]

    Creates an KaufmanEfficiencyRatio indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The KaufmanEfficiencyRatio indicator for the given parameters

    Return type:

    KaufmanEfficiencyRatio

    logr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new LogReturn indicator.

    Parameters:
    Returns:

    log return indicator for the requested symbol.

    Return type:

    LogReturn

    LOGR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new LogReturn indicator.

    Parameters:
    Returns:

    log return indicator for the requested symbol.

    Return type:

    LogReturn

    lsma( symbol, period, resolution=None, selector=None ) [source]

    Creates and registers a new Least Squares Moving Average instance.

    Parameters:
    Returns:

    A LeastSquaredMovingAverage configured with the specified period

    Return type:

    LeastSquaresMovingAverage

    LSMA( symbol, period, resolution=None, selector=None ) [source]

    Creates and registers a new Least Squares Moving Average instance.

    Parameters:
    Returns:

    A LeastSquaredMovingAverage configured with the specified period

    Return type:

    LeastSquaresMovingAverage

    lwma( symbol, period, resolution=None, selector=None ) [source]

    Creates a new LinearWeightedMovingAverage indicator. This indicator will linearly distribute the weights across the periods.

    Parameters:
    Return type:

    LinearWeightedMovingAverage

    LWMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new LinearWeightedMovingAverage indicator. This indicator will linearly distribute the weights across the periods.

    Parameters:
    Return type:

    LinearWeightedMovingAverage

    macd( symbol, fast_period, slow_period, signal_period, type=1, resolution=None, selector=None ) [source]

    Creates a MACD indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The moving average convergence divergence between the fast and slow averages

    Return type:

    MovingAverageConvergenceDivergence

    MACD( symbol, fastPeriod, slowPeriod, signalPeriod, type=1, resolution=None, selector=None ) [source]

    Creates a MACD indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The moving average convergence divergence between the fast and slow averages

    Return type:

    MovingAverageConvergenceDivergence

    mad( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MeanAbsoluteDeviation indicator.

    Parameters:
    Returns:

    The MeanAbsoluteDeviation indicator for the requested symbol over the specified period

    Return type:

    MeanAbsoluteDeviation

    MAD( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MeanAbsoluteDeviation indicator.

    Parameters:
    Returns:

    The MeanAbsoluteDeviation indicator for the requested symbol over the specified period

    Return type:

    MeanAbsoluteDeviation

    mass( symbol, ema_period=9, sum_period=25, resolution=None, selector=None ) [source]

    Creates a new Mass Index indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Mass Index indicator for the requested symbol over the specified period

    Return type:

    MassIndex

    MASS( symbol, emaPeriod=9, sumPeriod=25, resolution=None, selector=None ) [source]

    Creates a new Mass Index indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Mass Index indicator for the requested symbol over the specified period

    Return type:

    MassIndex

    max( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Maximum indicator to compute the maximum value

    Parameters:
    Returns:

    A Maximum indicator that compute the max value and the periods since the max value

    Return type:

    Maximum

    MAX( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Maximum indicator to compute the maximum value

    Parameters:
    Returns:

    A Maximum indicator that compute the max value and the periods since the max value

    Return type:

    Maximum

    mfi( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MoneyFlowIndex indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The MoneyFlowIndex indicator for the requested symbol over the specified period

    Return type:

    MoneyFlowIndex

    MFI( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MoneyFlowIndex indicator. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The MoneyFlowIndex indicator for the requested symbol over the specified period

    Return type:

    MoneyFlowIndex

    midpoint( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MidPoint indicator.

    Parameters:
    Returns:

    The MidPoint indicator for the requested symbol over the specified period

    Return type:

    MidPoint

    MIDPOINT( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MidPoint indicator.

    Parameters:
    Returns:

    The MidPoint indicator for the requested symbol over the specified period

    Return type:

    MidPoint

    midprice( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MidPrice indicator.

    Parameters:
    Returns:

    The MidPrice indicator for the requested symbol over the specified period

    Return type:

    MidPrice

    MIDPRICE( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MidPrice indicator.

    Parameters:
    Returns:

    The MidPrice indicator for the requested symbol over the specified period

    Return type:

    MidPrice

    min( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Minimum indicator to compute the minimum value

    Parameters:
    Returns:

    A Minimum indicator that compute the in value and the periods since the min value

    Return type:

    Minimum

    MIN( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Minimum indicator to compute the minimum value

    Parameters:
    Returns:

    A Minimum indicator that compute the in value and the periods since the min value

    Return type:

    Minimum

    mom( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Momentum indicator. This will compute the absolute n-period change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The momentum indicator for the requested symbol over the specified period

    Return type:

    Momentum

    MOM( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Momentum indicator. This will compute the absolute n-period change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The momentum indicator for the requested symbol over the specified period

    Return type:

    Momentum

    momersion( symbol, min_period, full_period, resolution=None, selector=None ) [source]

    Creates a new Momersion indicator.

    Parameters:
    Returns:

    The Momersion indicator for the requested symbol over the specified period

    Return type:

    MomersionIndicator

    MOMERSION( symbol, minPeriod, fullPeriod, resolution=None, selector=None ) [source]

    Creates a new Momersion indicator.

    Parameters:
    Returns:

    The Momersion indicator for the requested symbol over the specified period

    Return type:

    MomersionIndicator

    momp( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MomentumPercent indicator. This will compute the n-period percent change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The momentum indicator for the requested symbol over the specified period

    Return type:

    MomentumPercent

    MOMP( symbol, period, resolution=None, selector=None ) [source]

    Creates a new MomentumPercent indicator. This will compute the n-period percent change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The momentum indicator for the requested symbol over the specified period

    Return type:

    MomentumPercent

    mosc( symbols, fast_period=19, slow_period=39, resolution=None, selector=None ) [source]

    Creates a new McClellan Oscillator indicator

    Parameters:
    Returns:

    The McClellan Oscillator indicator for the requested symbol over the specified period

    Return type:

    McClellanOscillator

    MOSC( symbols, fastPeriod=19, slowPeriod=39, resolution=None, selector=None ) [source]

    Creates a new McClellan Oscillator indicator

    Parameters:
    Returns:

    The McClellan Oscillator indicator for the requested symbol over the specified period

    Return type:

    McClellanOscillator

    msi( symbols, fast_period=19, slow_period=39, resolution=None, selector=None ) [source]

    Creates a new McClellan Summation Index indicator

    Parameters:
    Returns:

    The McClellan Summation Index indicator for the requested symbol over the specified period

    Return type:

    McClellanSummationIndex

    MSI( symbols, fastPeriod=19, slowPeriod=39, resolution=None, selector=None ) [source]

    Creates a new McClellan Summation Index indicator

    Parameters:
    Returns:

    The McClellan Summation Index indicator for the requested symbol over the specified period

    Return type:

    McClellanSummationIndex

    natr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new NormalizedAverageTrueRange indicator.

    Parameters:
    Returns:

    The NormalizedAverageTrueRange indicator for the requested symbol over the specified period

    Return type:

    NormalizedAverageTrueRange

    NATR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new NormalizedAverageTrueRange indicator.

    Parameters:
    Returns:

    The NormalizedAverageTrueRange indicator for the requested symbol over the specified period

    Return type:

    NormalizedAverageTrueRange

    obv( symbol, resolution=None, selector=None ) [source]

    Creates a new On Balance Volume indicator. This will compute the cumulative total volume based on whether the close price being higher or lower than the previous period. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The On Balance Volume indicator for the requested symbol.

    Return type:

    OnBalanceVolume

    OBV( symbol, resolution=None, selector=None ) [source]

    Creates a new On Balance Volume indicator. This will compute the cumulative total volume based on whether the close price being higher or lower than the previous period. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The On Balance Volume indicator for the requested symbol.

    Return type:

    OnBalanceVolume

    pphl( symbol, length_high, length_low, last_stored_values=100, resolution=None, selector=None ) [source]

    Creates a new PivotPointsHighLow indicator

    Parameters:
    Returns:

    The PivotPointsHighLow indicator for the requested symbol.

    Return type:

    PivotPointsHighLow

    PPHL( symbol, lengthHigh, lengthLow, lastStoredValues=100, resolution=None, selector=None ) [source]

    Creates a new PivotPointsHighLow indicator

    Parameters:
    Returns:

    The PivotPointsHighLow indicator for the requested symbol.

    Return type:

    PivotPointsHighLow

    ppo( symbol, fast_period, slow_period, moving_average_type, resolution=None, selector=None ) [source]

    Creates a new PercentagePriceOscillator indicator.

    Parameters:
    Returns:

    The PercentagePriceOscillator indicator for the requested symbol over the specified period

    Return type:

    PercentagePriceOscillator

    PPO( symbol, fastPeriod, slowPeriod, movingAverageType, resolution=None, selector=None ) [source]

    Creates a new PercentagePriceOscillator indicator.

    Parameters:
    Returns:

    The PercentagePriceOscillator indicator for the requested symbol over the specified period

    Return type:

    PercentagePriceOscillator

    psar( symbol, af_start=0.02, af_increment=0.02, af_max=0.2, resolution=None, selector=None ) [source]

    Creates a new Parabolic SAR indicator

    Parameters:
    Returns:

    A ParabolicStopAndReverse configured with the specified periods

    Return type:

    ParabolicStopAndReverse

    PSAR( symbol, afStart=0.02, afIncrement=0.02, afMax=0.2, resolution=None, selector=None ) [source]

    Creates a new Parabolic SAR indicator

    Parameters:
    Returns:

    A ParabolicStopAndReverse configured with the specified periods

    Return type:

    ParabolicStopAndReverse

    r( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

    Parameters:
    Returns:

    A new Rho indicator for the specified symbol

    Return type:

    Rho

    R( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

    Parameters:
    Returns:

    A new Rho indicator for the specified symbol

    Return type:

    Rho

    rc( symbol, period, k, resolution=None, selector=None ) [source]

    Creates a new RegressionChannel indicator which will compute the LinearRegression, UpperChannel and LowerChannel lines, the intercept and slope

    Parameters:
    Returns:

    A Regression Channel configured with the specified period and number of standard deviation

    Return type:

    RegressionChannel

    RC( symbol, period, k, resolution=None, selector=None ) [source]

    Creates a new RegressionChannel indicator which will compute the LinearRegression, UpperChannel and LowerChannel lines, the intercept and slope

    Parameters:
    Returns:

    A Regression Channel configured with the specified period and number of standard deviation

    Return type:

    RegressionChannel

    rdv( symbol, period=2, resolution=4, selector=None ) [source]

    Creates an RelativeDailyVolume indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Relative Volume indicator for the given parameters

    Return type:

    RelativeDailyVolume

    RDV( symbol, period=2, resolution=4, selector=None ) [source]

    Creates an RelativeDailyVolume indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Relative Volume indicator for the given parameters

    Return type:

    RelativeDailyVolume

    register_indicator( symbol, indicator, resolution, selector ) [source]

    Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

    Parameters:
    register_indicator( symbol, indicator, py_object, selector=None ) [source]

    Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

    Parameters:
    register_indicator( symbol, indicator, consolidator, selector=None ) [source]

    Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

    Parameters:
    RegisterIndicator( symbol, indicator, resolution, selector ) [source]

    Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

    Parameters:
    RegisterIndicator( symbol, indicator, pyObject, selector=None ) [source]

    Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

    Parameters:
    RegisterIndicator( symbol, indicator, consolidator, selector=None ) [source]

    Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

    Parameters:
    rma( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Relative Moving Average indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A relative moving average configured with the specified period and number of standard deviation

    Return type:

    RelativeMovingAverage

    RMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Relative Moving Average indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A relative moving average configured with the specified period and number of standard deviation

    Return type:

    RelativeMovingAverage

    roc( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChange indicator. This will compute the n-period rate of change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The RateOfChange indicator for the requested symbol over the specified period

    Return type:

    RateOfChange

    ROC( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChange indicator. This will compute the n-period rate of change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The RateOfChange indicator for the requested symbol over the specified period

    Return type:

    RateOfChange

    rocp( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChangePercent indicator. This will compute the n-period percentage rate of change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The RateOfChangePercent indicator for the requested symbol over the specified period

    Return type:

    RateOfChangePercent

    ROCP( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChangePercent indicator. This will compute the n-period percentage rate of change in the security. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The RateOfChangePercent indicator for the requested symbol over the specified period

    Return type:

    RateOfChangePercent

    rocr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChangeRatio indicator.

    Parameters:
    Returns:

    The RateOfChangeRatio indicator for the requested symbol over the specified period

    Return type:

    RateOfChangeRatio

    ROCR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new RateOfChangeRatio indicator.

    Parameters:
    Returns:

    The RateOfChangeRatio indicator for the requested symbol over the specified period

    Return type:

    RateOfChangeRatio

    rsi( symbol, period, moving_average_type=2, resolution=None, selector=None ) [source]

    Creates a new RelativeStrengthIndex indicator. This will produce an oscillator that ranges from 0 to 100 based on the ratio of average gains to average losses over the specified period.

    Parameters:
    Returns:

    The RelativeStrengthIndex indicator for the requested symbol over the specified period

    Return type:

    RelativeStrengthIndex

    RSI( symbol, period, movingAverageType=2, resolution=None, selector=None ) [source]

    Creates a new RelativeStrengthIndex indicator. This will produce an oscillator that ranges from 0 to 100 based on the ratio of average gains to average losses over the specified period.

    Parameters:
    Returns:

    The RelativeStrengthIndex indicator for the requested symbol over the specified period

    Return type:

    RelativeStrengthIndex

    rvi( symbol, period, moving_average_type=0, resolution=None, selector=None ) [source]

    Creates a new RelativeVigorIndex indicator.

    Parameters:
    Returns:

    The RelativeVigorIndex indicator for the requested symbol over the specified period

    Return type:

    RelativeVigorIndex

    RVI( symbol, period, movingAverageType=0, resolution=None, selector=None ) [source]

    Creates a new RelativeVigorIndex indicator.

    Parameters:
    Returns:

    The RelativeVigorIndex indicator for the requested symbol over the specified period

    Return type:

    RelativeVigorIndex

    si( symbol, limit_move, resolution=4, selector=None ) [source]

    Creates a Wilder Swing Index (SI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderSwingIndex for the given parameters

    Return type:

    WilderSwingIndex

    SI( symbol, limitMove, resolution=4, selector=None ) [source]

    Creates a Wilder Swing Index (SI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderSwingIndex for the given parameters

    Return type:

    WilderSwingIndex

    sma( symbol, period, resolution=None, selector=None ) [source]

    Creates an SimpleMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The SimpleMovingAverage for the given parameters

    Return type:

    SimpleMovingAverage

    SMA( symbol, period, resolution=None, selector=None ) [source]

    Creates an SimpleMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The SimpleMovingAverage for the given parameters

    Return type:

    SimpleMovingAverage

    sortino( symbol, sortino_period, minimum_acceptable_return=0.0, resolution=None, selector=None ) [source]

    Creates a new Sortino indicator.

    Parameters:
    Returns:

    The SortinoRatio indicator for the requested symbol over the specified period

    Return type:

    SortinoRatio

    SORTINO( symbol, sortinoPeriod, minimumAcceptableReturn=0.0, resolution=None, selector=None ) [source]

    Creates a new Sortino indicator.

    Parameters:
    Returns:

    The SortinoRatio indicator for the requested symbol over the specified period

    Return type:

    SortinoRatio

    sr( symbol, sharpe_period, risk_free_rate=None, resolution=None, selector=None ) [source]

    Creates a new SharpeRatio indicator.

    Parameters:
    Returns:

    The SharpeRatio indicator for the requested symbol over the specified period

    Return type:

    SharpeRatio

    SR( symbol, sharpePeriod, riskFreeRate=None, resolution=None, selector=None ) [source]

    Creates a new SharpeRatio indicator.

    Parameters:
    Returns:

    The SharpeRatio indicator for the requested symbol over the specified period

    Return type:

    SharpeRatio

    stc( symbol, cycle_period, fast_period, slow_period, moving_average_type=1, resolution=None, selector=None ) [source]

    Creates a new Schaff Trend Cycle indicator

    Parameters:
    Returns:

    The SchaffTrendCycle indicator for the requested symbol over the specified period

    Return type:

    SchaffTrendCycle

    STC( symbol, cyclePeriod, fastPeriod, slowPeriod, movingAverageType=1, resolution=None, selector=None ) [source]

    Creates a new Schaff Trend Cycle indicator

    Parameters:
    Returns:

    The SchaffTrendCycle indicator for the requested symbol over the specified period

    Return type:

    SchaffTrendCycle

    std( symbol, period, resolution=None, selector=None ) [source]

    Creates a new StandardDeviation indicator. This will return the population standard deviation of samples over the specified period.

    Parameters:
    Returns:

    The StandardDeviation indicator for the requested symbol over the specified period

    Return type:

    StandardDeviation

    STD( symbol, period, resolution=None, selector=None ) [source]

    Creates a new StandardDeviation indicator. This will return the population standard deviation of samples over the specified period.

    Parameters:
    Returns:

    The StandardDeviation indicator for the requested symbol over the specified period

    Return type:

    StandardDeviation

    sto( symbol, period, k_period, d_period, resolution=None, selector=None ) [source]

    Creates a new Stochastic indicator.

    Parameters:
    Returns:

    Stochastic indicator for the requested symbol.

    Return type:

    Stochastic

    STO( symbol, period, kPeriod, dPeriod, resolution=None, selector=None ) [source]

    Creates a new Stochastic indicator.

    Parameters:
    Returns:

    Stochastic indicator for the requested symbol.

    Return type:

    Stochastic

    str( symbol, period, multiplier, moving_average_type=2, resolution=None, selector=None ) [source]

    Creates a new SuperTrend indicator.

    Parameters:
    Return type:

    SuperTrend

    STR( symbol, period, multiplier, movingAverageType=2, resolution=None, selector=None ) [source]

    Creates a new SuperTrend indicator.

    Parameters:
    Return type:

    SuperTrend

    sum( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Sum indicator.

    Parameters:
    Returns:

    The Sum indicator for the requested symbol over the specified period

    Return type:

    Sum

    SUM( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Sum indicator.

    Parameters:
    Returns:

    The Sum indicator for the requested symbol over the specified period

    Return type:

    Sum

    swiss( symbol, period, delta, tool, resolution=None, selector=None ) [source]

    Creates Swiss Army Knife transformation for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The calculation using the given tool

    Return type:

    SwissArmyKnife

    SWISS( symbol, period, delta, tool, resolution=None, selector=None ) [source]

    Creates Swiss Army Knife transformation for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The calculation using the given tool

    Return type:

    SwissArmyKnife

    t( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    For the given symbol will resolve the ticker it used at the current algorithm date

    Parameters:
    Returns:

    A new Theta indicator for the specified symbol

    Return type:

    Theta

    T( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    For the given symbol will resolve the ticker it used at the current algorithm date

    Parameters:
    Returns:

    A new Theta indicator for the specified symbol

    Return type:

    Theta

    t_3( symbol, period, volume_factor=0.7, resolution=None, selector=None ) [source]

    Creates a new T3MovingAverage indicator.

    Parameters:
    Returns:

    The T3MovingAverage indicator for the requested symbol over the specified period

    Return type:

    T3MovingAverage

    tdd( symbol, period, minimum_acceptable_return=0.0, resolution=None, selector=None ) [source]

    Creates a new TargetDownsideDeviation indicator. The target downside deviation is defined as the root-mean-square, or RMS, of the deviations of the realized return’s underperformance from the target return where all returns above the target return are treated as underperformance of 0.

    Parameters:
    Returns:

    The TargetDownsideDeviation indicator for the requested symbol over the specified period

    Return type:

    TargetDownsideDeviation

    TDD( symbol, period, minimumAcceptableReturn=0.0, resolution=None, selector=None ) [source]

    Creates a new TargetDownsideDeviation indicator. The target downside deviation is defined as the root-mean-square, or RMS, of the deviations of the realized return’s underperformance from the target return where all returns above the target return are treated as underperformance of 0.

    Parameters:
    Returns:

    The TargetDownsideDeviation indicator for the requested symbol over the specified period

    Return type:

    TargetDownsideDeviation

    tema( symbol, period, resolution=None, selector=None ) [source]

    Creates a new TripleExponentialMovingAverage indicator.

    Parameters:
    Returns:

    The TripleExponentialMovingAverage indicator for the requested symbol over the specified period

    Return type:

    TripleExponentialMovingAverage

    TEMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new TripleExponentialMovingAverage indicator.

    Parameters:
    Returns:

    The TripleExponentialMovingAverage indicator for the requested symbol over the specified period

    Return type:

    TripleExponentialMovingAverage

    tp( symbol, period=2, value_area_volume_percentage=0.7, price_range_round_off=0.05, resolution=4, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Time Price Opportunity (TPO) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Time Profile indicator for the given parameters

    Return type:

    TimeProfile

    TP( symbol, period=2, valueAreaVolumePercentage=0.7, priceRangeRoundOff=0.05, resolution=4, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Time Price Opportunity (TPO) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Time Profile indicator for the given parameters

    Return type:

    TimeProfile

    tr( symbol, resolution=None, selector=None ) [source]

    Creates a new TrueRange indicator.

    Parameters:
    Returns:

    The TrueRange indicator for the requested symbol.

    Return type:

    TrueRange

    TR( symbol, resolution=None, selector=None ) [source]

    Creates a new TrueRange indicator.

    Parameters:
    Returns:

    The TrueRange indicator for the requested symbol.

    Return type:

    TrueRange

    trima( symbol, period, resolution=None, selector=None ) [source]

    Creates a new TriangularMovingAverage indicator.

    Parameters:
    Returns:

    The TriangularMovingAverage indicator for the requested symbol over the specified period

    Return type:

    TriangularMovingAverage

    TRIMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new TriangularMovingAverage indicator.

    Parameters:
    Returns:

    The TriangularMovingAverage indicator for the requested symbol over the specified period

    Return type:

    TriangularMovingAverage

    trin( symbols, resolution=None, selector=None ) [source]

    Creates a new Arms Index indicator

    Parameters:
    Returns:

    The Arms Index indicator for the requested symbol over the specified period

    Return type:

    ArmsIndex

    TRIN( symbols, resolution=None, selector=None ) [source]

    Creates a new Arms Index indicator

    Parameters:
    Returns:

    The Arms Index indicator for the requested symbol over the specified period

    Return type:

    ArmsIndex

    trix( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Trix indicator.

    Parameters:
    Returns:

    The Trix indicator for the requested symbol over the specified period

    Return type:

    Trix

    TRIX( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Trix indicator.

    Parameters:
    Returns:

    The Trix indicator for the requested symbol over the specified period

    Return type:

    Trix

    tsf( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Time Series Forecast indicator

    Parameters:
    Returns:

    The TimeSeriesForecast indicator for the requested symbol over the specified period

    Return type:

    TimeSeriesForecast

    TSF( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Time Series Forecast indicator

    Parameters:
    Returns:

    The TimeSeriesForecast indicator for the requested symbol over the specified period

    Return type:

    TimeSeriesForecast

    tsi( symbol, long_term_period=25, short_term_period=13, signal_period=7, signal_type=1, resolution=None, selector=None ) [source]

    Creates a TrueStrengthIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The TrueStrengthIndex indicator for the given parameters

    Return type:

    TrueStrengthIndex

    TSI( symbol, longTermPeriod=25, shortTermPeriod=13, signalPeriod=7, signalType=1, resolution=None, selector=None ) [source]

    Creates a TrueStrengthIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The TrueStrengthIndex indicator for the given parameters

    Return type:

    TrueStrengthIndex

    ultosc( symbol, period_1, period_2, period_3, resolution=None, selector=None ) [source]

    Creates a new UltimateOscillator indicator.

    Parameters:
    Returns:

    The UltimateOscillator indicator for the requested symbol over the specified period

    Return type:

    UltimateOscillator

    ULTOSC( symbol, period1, period2, period3, resolution=None, selector=None ) [source]

    Creates a new UltimateOscillator indicator.

    Parameters:
    Returns:

    The UltimateOscillator indicator for the requested symbol over the specified period

    Return type:

    UltimateOscillator

    v( symbol, period, resolution=None, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Variance indicator for the requested symbol over the specified period

    Return type:

    Variance

    v( symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new Vega indicator for the specified symbol

    Return type:

    Vega

    V( symbol, period, resolution=None, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Variance indicator for the requested symbol over the specified period

    Return type:

    Variance

    V( symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    A new Vega indicator for the specified symbol

    Return type:

    Vega

    vidya( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Chande's Variable Index Dynamic Average indicator.

    Parameters:
    Returns:

    The VariableIndexDynamicAverage indicator for the requested symbol over the specified period

    Return type:

    VariableIndexDynamicAverage

    VIDYA( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Chande's Variable Index Dynamic Average indicator.

    Parameters:
    Returns:

    The VariableIndexDynamicAverage indicator for the requested symbol over the specified period

    Return type:

    VariableIndexDynamicAverage

    vp( symbol, period=2, value_area_volume_percentage=0.7, price_range_round_off=0.05, resolution=4, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Volume Profile indicator for the given parameters

    Return type:

    VolumeProfile

    VP( symbol, period=2, valueAreaVolumePercentage=0.7, priceRangeRoundOff=0.05, resolution=4, selector=None ) [source]

    Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Volume Profile indicator for the given parameters

    Return type:

    VolumeProfile

    vwap( symbol ) [source]

    Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The IntradayVWAP for the specified symbol

    Return type:

    IntradayVwap

    vwap( symbol, period, resolution=None, selector=None ) [source]

    Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The VolumeWeightedAveragePrice for the given parameters

    Return type:

    VolumeWeightedAveragePriceIndicator

    VWAP( symbol ) [source]

    Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The IntradayVWAP for the specified symbol

    Return type:

    IntradayVwap

    VWAP( symbol, period, resolution=None, selector=None ) [source]

    Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The VolumeWeightedAveragePrice for the given parameters

    Return type:

    VolumeWeightedAveragePriceIndicator

    warm_up_indicator( symbol, indicator, resolution=None, selector=None ) [source]

    Warms up a given indicator with historical data

    Parameters:
    warm_up_indicator( symbol, indicator, period, selector=None ) [source]

    Warms up a given indicator with historical data

    Parameters:
    WarmUpIndicator( symbol, indicator, resolution=None, selector=None ) [source]

    Warms up a given indicator with historical data

    Parameters:
    WarmUpIndicator( symbol, indicator, period, selector=None ) [source]

    Warms up a given indicator with historical data

    Parameters:
    wilr( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Williams %R indicator. This will compute the percentage change of the current closing price in relation to the high and low of the past N periods. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Williams %R indicator for the requested symbol over the specified period

    Return type:

    WilliamsPercentR

    WILR( symbol, period, resolution=None, selector=None ) [source]

    Creates a new Williams %R indicator. This will compute the percentage change of the current closing price in relation to the high and low of the past N periods. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The Williams %R indicator for the requested symbol over the specified period

    Return type:

    WilliamsPercentR

    wwma( symbol, period, resolution=None, selector=None ) [source]

    Creates a WilderMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderMovingAverage for the given parameters

    Return type:

    WilderMovingAverage

    WWMA( symbol, period, resolution=None, selector=None ) [source]

    Creates a WilderMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

    Parameters:
    Returns:

    The WilderMovingAverage for the given parameters

    Return type:

    WilderMovingAverage

    Warning: include(/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-γ.html): Failed to open stream: No such file or directory in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 109 Warning: include(): Failed opening '/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-γ.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 109 Warning: include(/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-δ.html): Failed to open stream: No such file or directory in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 110 Warning: include(): Failed opening '/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-δ.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 110 Warning: include(/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-θ.html): Failed to open stream: No such file or directory in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 111 Warning: include(): Failed opening '/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-θ.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 111 Warning: include(/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-ρ.html): Failed to open stream: No such file or directory in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 112 Warning: include(): Failed opening '/tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/Resources/qcalgorithm-api/qcalgorithm-ρ.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/625910b1bbbcbf0e7c545aa5248b0bcb50526360/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 112
    property candlestick_patterns [source]

    Gets an instance to access the candlestick pattern helper methods

    Returns:

    Gets an instance to access the candlestick pattern helper methods

    Return type:

    CandlestickPatterns

    property CandlestickPatterns [source]

    Gets an instance to access the candlestick pattern helper methods

    Returns:

    Gets an instance to access the candlestick pattern helper methods

    Return type:

    CandlestickPatterns

    property enable_automatic_indicator_warm_up [source]

    Gets whether or not WarmUpIndicator is allowed to warm up indicators/>

    Returns:

    Gets whether or not WarmUpIndicator is allowed to warm up indicators/>

    Return type:

    bool

    property EnableAutomaticIndicatorWarmUp [source]

    Gets whether or not WarmUpIndicator is allowed to warm up indicators/>

    Returns:

    Gets whether or not WarmUpIndicator is allowed to warm up indicators/>

    Return type:

    bool

    T3( symbol, period, volumeFactor=0.7, resolution=None, selector=None ) [source]

    Creates a new T3MovingAverage indicator.

    Parameters:
    Returns:

    The T3MovingAverage indicator for the requested symbol over the specified period

    Return type:

    T3MovingAverage

    Live Trading

    Live Trading

    on_brokerage_disconnect() [source]

    Brokerage disconnected event handler. This method is called when the brokerage connection is lost.

    OnBrokerageDisconnect() [source]

    Brokerage disconnected event handler. This method is called when the brokerage connection is lost.

    on_brokerage_message( message_event ) [source]

    Brokerage message event handler. This method is called for all types of brokerage messages.

    Parameters:
    OnBrokerageMessage( messageEvent ) [source]

    Brokerage message event handler. This method is called for all types of brokerage messages.

    Parameters:
    on_brokerage_reconnect() [source]

    Brokerage reconnected event handler. This method is called when the brokerage connection is restored after a disconnection.

    OnBrokerageReconnect() [source]

    Brokerage reconnected event handler. This method is called when the brokerage connection is restored after a disconnection.

    set_live_mode( live ) [source]

    Set live mode state of the algorithm run: Public setter for the algorithm property LiveMode.

    Parameters:
    SetLiveMode( live ) [source]

    Set live mode state of the algorithm run: Public setter for the algorithm property LiveMode.

    Parameters:
    set_status( status ) [source]

    Set the state of a live deployment

    Parameters:
    SetStatus( status ) [source]

    Set the state of a live deployment

    Parameters:
    property live_mode [source]

    Boolean property indicating the algorithm is currently running in live mode.

    Returns:

    Boolean property indicating the algorithm is currently running in live mode.

    Return type:

    bool

    property LiveMode [source]

    Boolean property indicating the algorithm is currently running in live mode.

    Returns:

    Boolean property indicating the algorithm is currently running in live mode.

    Return type:

    bool

    property notify [source]

    Notification Manager for Sending Live Runtime Notifications to users about important events.

    Returns:

    Notification Manager for Sending Live Runtime Notifications to users about important events.

    Return type:

    NotificationManager

    property Notify [source]

    Notification Manager for Sending Live Runtime Notifications to users about important events.

    Returns:

    Notification Manager for Sending Live Runtime Notifications to users about important events.

    Return type:

    NotificationManager

    Logging

    Logging

    debug( message ) [source]

    Send a debug message to the web console:

    Parameters:
    Debug( message ) [source]

    Send a debug message to the web console:

    Parameters:
    error( message ) [source]

    Send a string error message to the Console.

    Parameters:
    error( error ) [source]

    Send a string error message to the Console.

    Parameters:
    Error( message ) [source]

    Send a string error message to the Console.

    Parameters:
    Error( error ) [source]

    Send a string error message to the Console.

    Parameters:
    log( message ) [source]

    Added another method for logging if user guessed.

    Parameters:
    Log( message ) [source]

    Added another method for logging if user guessed.

    Parameters:
    quit( message ) [source]

    Terminate the algorithm after processing the current event handler.

    Parameters:
    Quit( message ) [source]

    Terminate the algorithm after processing the current event handler.

    Parameters:
    set_quit( quit ) [source]

    Set the Quit flag property of the algorithm.

    Parameters:
    SetQuit( quit ) [source]

    Set the Quit flag property of the algorithm.

    Parameters:
    property debug_messages [source]

    Storage for debugging messages before the event handler has passed control back to the Lean Engine.

    Returns:

    Storage for debugging messages before the event handler has passed control back to the Lean Engine.

    Return type:

    List[str]

    property DebugMessages [source]

    Storage for debugging messages before the event handler has passed control back to the Lean Engine.

    Returns:

    Storage for debugging messages before the event handler has passed control back to the Lean Engine.

    Return type:

    ConcurrentQueue<String>

    property debug_mode [source]

    Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets

    Returns:

    Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets

    Return type:

    bool

    property DebugMode [source]

    Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets

    Returns:

    Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets

    Return type:

    bool

    property error_messages [source]

    List of error messages generated by the user's code calling the "Error" function.

    Returns:

    List of error messages generated by the user's code calling the "Error" function.

    Return type:

    List[str]

    property ErrorMessages [source]

    List of error messages generated by the user's code calling the "Error" function.

    Returns:

    List of error messages generated by the user's code calling the "Error" function.

    Return type:

    ConcurrentQueue<String>

    property log_messages [source]

    Storage for log messages before the event handlers have passed control back to the Lean Engine.

    Returns:

    Storage for log messages before the event handlers have passed control back to the Lean Engine.

    Return type:

    List[str]

    property LogMessages [source]

    Storage for log messages before the event handlers have passed control back to the Lean Engine.

    Returns:

    Storage for log messages before the event handlers have passed control back to the Lean Engine.

    Return type:

    ConcurrentQueue<String>

    property run_time_error [source]

    Gets the run time error from the algorithm, or null if none was encountered.

    Returns:

    Gets the run time error from the algorithm, or null if none was encountered.

    Return type:

    Exception

    property RunTimeError [source]

    Gets the run time error from the algorithm, or null if none was encountered.

    Returns:

    Gets the run time error from the algorithm, or null if none was encountered.

    Return type:

    Exception

    Machine Learning

    Machine Learning

    train( date_rule, time_rule, training_code ) [source]

    Schedules the provided training code to execute immediately

    Parameters:
    Return type:

    ScheduledEvent

    Train( dateRule, timeRule, trainingCode ) [source]

    Schedules the provided training code to execute immediately

    Parameters:
    Return type:

    ScheduledEvent

    Modeling

    Modeling

    on_margin_call( requests ) [source]

    Margin call event handler. This method is called right before the margin call orders are placed in the market.

    Parameters:
    OnMarginCall( requests ) [source]

    Margin call event handler. This method is called right before the margin call orders are placed in the market.

    Parameters:
    on_margin_call_warning() [source]

    Margin call warning event handler. This method is called when Portfolio.MarginRemaining is under 5% of your Portfolio.TotalPortfolioValue

    OnMarginCallWarning() [source]

    Margin call warning event handler. This method is called when Portfolio.MarginRemaining is under 5% of your Portfolio.TotalPortfolioValue

    set_brokerage_message_handler( handler ) [source]

    Sets the implementation used to handle messages from the brokerage. The default implementation will forward messages to debug or error and when a Error occurs, the algorithm is stopped.

    Parameters:
    SetBrokerageMessageHandler( handler ) [source]

    Sets the implementation used to handle messages from the brokerage. The default implementation will forward messages to debug or error and when a Error occurs, the algorithm is stopped.

    Parameters:
    set_brokerage_model( brokerage, account_type=0 ) [source]

    Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN

    Parameters:
    set_brokerage_model( model ) [source]

    Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN

    Parameters:
    SetBrokerageModel( brokerage, accountType=0 ) [source]

    Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN

    Parameters:
    SetBrokerageModel( model ) [source]

    Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN

    Parameters:
    set_risk_free_interest_rate_model( model ) [source]

    Sets the risk free interest rate model to be used in the algorithm

    Parameters:
    SetRiskFreeInterestRateModel( model ) [source]

    Sets the risk free interest rate model to be used in the algorithm

    Parameters:
    property brokerage_message_handler [source]

    Gets the brokerage message handler used to decide what to do with each message sent from the brokerage

    Returns:

    Gets the brokerage message handler used to decide what to do with each message sent from the brokerage

    Return type:

    IBrokerageMessageHandler

    property BrokerageMessageHandler [source]

    Gets the brokerage message handler used to decide what to do with each message sent from the brokerage

    Returns:

    Gets the brokerage message handler used to decide what to do with each message sent from the brokerage

    Return type:

    IBrokerageMessageHandler

    property brokerage_model [source]

    Gets the brokerage model - used to model interactions with specific brokerages.

    Returns:

    Gets the brokerage model - used to model interactions with specific brokerages.

    Return type:

    IBrokerageModel

    property BrokerageModel [source]

    Gets the brokerage model - used to model interactions with specific brokerages.

    Returns:

    Gets the brokerage model - used to model interactions with specific brokerages.

    Return type:

    IBrokerageModel

    property brokerage_name [source]

    Gets the brokerage name.

    Returns:

    Gets the brokerage name.

    Return type:

    BrokerageName

    property BrokerageName [source]

    Gets the brokerage name.

    Returns:

    Gets the brokerage name.

    Return type:

    BrokerageName

    property risk_free_interest_rate_model [source]

    Gets the risk free interest rate model used to get the interest rates

    Returns:

    Gets the risk free interest rate model used to get the interest rates

    Return type:

    IRiskFreeInterestRateModel

    property RiskFreeInterestRateModel [source]

    Gets the risk free interest rate model used to get the interest rates

    Returns:

    Gets the risk free interest rate model used to get the interest rates

    Return type:

    IRiskFreeInterestRateModel

    Parameter and Optimization

    Parameter and Optimization

    get_parameter( name, default_value ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    The value of the specified parameter, or defaultValue if not found or null if there's no default value

    Return type:

    float

    get_parameter( name, default_value ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    The value of the specified parameter, or defaultValue if not found or null if there's no default value

    Return type:

    int

    get_parameter( name, default_value ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    The value of the specified parameter, or defaultValue if not found or null if there's no default value

    Return type:

    float

    get_parameter( name, default_value=None ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    The value of the specified parameter, or defaultValue if not found or null if there's no default value

    Return type:

    str

    GetParameter( name, defaultValue ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    The value of the specified parameter, or defaultValue if not found or null if there's no default value

    Return type:

    Double

    GetParameter( name, defaultValue ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    The value of the specified parameter, or defaultValue if not found or null if there's no default value

    Return type:

    Int32

    GetParameter( name, defaultValue ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    The value of the specified parameter, or defaultValue if not found or null if there's no default value

    Return type:

    Decimal

    GetParameter( name, defaultValue=None ) [source]

    Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

    Parameters:
    Returns:

    The value of the specified parameter, or defaultValue if not found or null if there's no default value

    Return type:

    String

    get_parameters() [source]

    Gets a read-only dictionary with all current parameters

    Return type:

    Dict[str, str]

    GetParameters() [source]

    Gets a read-only dictionary with all current parameters

    Return type:

    IReadOnlyDictionary[String, String]

    set_parameters( parameters ) [source]

    Sets the parameters from the dictionary

    Parameters:
    SetParameters( parameters ) [source]

    Sets the parameters from the dictionary

    Parameters:

    Scheduled Events

    Scheduled Events

    property date_rules [source]

    Gets the date rules helper object to make specifying dates for events easier

    Returns:

    Gets the date rules helper object to make specifying dates for events easier

    Return type:

    DateRules

    property DateRules [source]

    Gets the date rules helper object to make specifying dates for events easier

    Returns:

    Gets the date rules helper object to make specifying dates for events easier

    Return type:

    DateRules

    property schedule [source]

    Gets schedule manager for adding/removing scheduled events

    Returns:

    Gets schedule manager for adding/removing scheduled events

    Return type:

    ScheduleManager

    property Schedule [source]

    Gets schedule manager for adding/removing scheduled events

    Returns:

    Gets schedule manager for adding/removing scheduled events

    Return type:

    ScheduleManager

    property time_rules [source]

    Gets the time rules helper object to make specifying times for events easier

    Returns:

    Gets the time rules helper object to make specifying times for events easier

    Return type:

    TimeRules

    property TimeRules [source]

    Gets the time rules helper object to make specifying times for events easier

    Returns:

    Gets the time rules helper object to make specifying times for events easier

    Return type:

    TimeRules

    property trading_calendar [source]

    Gets trading calendar populated with trading events

    Returns:

    Gets trading calendar populated with trading events

    Return type:

    TradingCalendar

    property TradingCalendar [source]

    Gets trading calendar populated with trading events

    Returns:

    Gets trading calendar populated with trading events

    Return type:

    TradingCalendar

    Securities and Portfolio

    Securities and Portfolio

    set_account_currency( account_currency, starting_cash=None ) [source]

    Sets the account currency cash symbol this algorithm is to manage, as well as the starting cash in this currency if given

    Parameters:
    SetAccountCurrency( accountCurrency, startingCash=None ) [source]

    Sets the account currency cash symbol this algorithm is to manage, as well as the starting cash in this currency if given

    Parameters:
    set_cash( symbol, starting_cash, conversion_rate=0.0 ) [source]

    Set initial cash for the strategy while backtesting. During live mode this value is ignored and replaced with the actual cash of your brokerage account.

    Parameters:
    SetCash( symbol, startingCash, conversionRate=0.0 ) [source]

    Set initial cash for the strategy while backtesting. During live mode this value is ignored and replaced with the actual cash of your brokerage account.

    Parameters:
    property account_currency [source]

    Gets the account currency

    Returns:

    Gets the account currency

    Return type:

    str

    property AccountCurrency [source]

    Gets the account currency

    Returns:

    Gets the account currency

    Return type:

    string

    property active_securities [source]

    Read-only dictionary containing all active securities. An active security is a security that is currently selected by the universe or has holdings or open orders.

    Returns:

    Read-only dictionary containing all active securities. An active security is a security that is currently selected by the universe or has holdings or open orders.

    Return type:

    Dict[Symbol, Security]

    property ActiveSecurities [source]

    Read-only dictionary containing all active securities. An active security is a security that is currently selected by the universe or has holdings or open orders.

    Returns:

    Read-only dictionary containing all active securities. An active security is a security that is currently selected by the universe or has holdings or open orders.

    Return type:

    IReadOnlyDictionary<Symbol, Security>

    property portfolio [source]

    Portfolio object provieds easy access to the underlying security-holding properties; summed together in a way to make them useful. This saves the user time by providing common portfolio requests in a single

    Returns:

    Portfolio object provieds easy access to the underlying security-holding properties; summed together in a way to make them useful. This saves the user time by providing common portfolio requests in a single

    Return type:

    SecurityPortfolioManager

    property Portfolio [source]

    Portfolio object provieds easy access to the underlying security-holding properties; summed together in a way to make them useful. This saves the user time by providing common portfolio requests in a single

    Returns:

    Portfolio object provieds easy access to the underlying security-holding properties; summed together in a way to make them useful. This saves the user time by providing common portfolio requests in a single

    Return type:

    SecurityPortfolioManager

    property securities [source]

    Security collection is an array of the security objects such as Equities and FOREX. Securities data manages the properties of tradeable assets such as price, open and close time and holdings information.

    Returns:

    Security collection is an array of the security objects such as Equities and FOREX. Securities data manages the properties of tradeable assets such as price, open and close time and holdings information.

    Return type:

    SecurityManager

    property Securities [source]

    Security collection is an array of the security objects such as Equities and FOREX. Securities data manages the properties of tradeable assets such as price, open and close time and holdings information.

    Returns:

    Security collection is an array of the security objects such as Equities and FOREX. Securities data manages the properties of tradeable assets such as price, open and close time and holdings information.

    Return type:

    SecurityManager

    property signal_export [source]

    SignalExport - Allows sending export signals to different 3rd party API's. For example, it allows to send signals to Collective2, CrunchDAO and Numerai API's

    Returns:

    SignalExport - Allows sending export signals to different 3rd party API's. For example, it allows to send signals to Collective2, CrunchDAO and Numerai API's

    Return type:

    SignalExportManager

    property SignalExport [source]

    SignalExport - Allows sending export signals to different 3rd party API's. For example, it allows to send signals to Collective2, CrunchDAO and Numerai API's

    Returns:

    SignalExport - Allows sending export signals to different 3rd party API's. For example, it allows to send signals to Collective2, CrunchDAO and Numerai API's

    Return type:

    SignalExportManager

    Statistics

    Statistics

    set_summary_statistic( name, value ) [source]

    Set a custom summary statistic for the algorithm.

    Parameters:
    SetSummaryStatistic( name, value ) [source]

    Set a custom summary statistic for the algorithm.

    Parameters:
    property statistics [source]

    The current statistics for the running algorithm.

    Returns:

    The current statistics for the running algorithm.

    Return type:

    StatisticsResults

    property Statistics [source]

    The current statistics for the running algorithm.

    Returns:

    The current statistics for the running algorithm.

    Return type:

    StatisticsResults

    Trading and Orders

    Trading and Orders

    buy( strategy, quantity, asynchronous=False, tag=, order_properties=None ) [source]

    Buy Stock (Alias of Order)

    Parameters:
    Returns:

    Sequence of order tickets

    Return type:

    List[OrderTicket]

    buy( symbol, quantity ) [source]

    Buy Stock (Alias of Order)

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    Buy( strategy, quantity, asynchronous=False, tag=, orderProperties=None ) [source]

    Buy Stock (Alias of Order)

    Parameters:
    Returns:

    Sequence of order tickets

    Return type:

    IEnumerable[OrderTicket]

    Buy( symbol, quantity ) [source]

    Buy Stock (Alias of Order)

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    calculate_order_quantity( symbol, target ) [source]

    Calculate the order quantity to achieve target-percent holdings.

    Parameters:
    Returns:

    Order quantity to achieve this percentage

    Return type:

    float

    CalculateOrderQuantity( symbol, target ) [source]

    Calculate the order quantity to achieve target-percent holdings.

    Parameters:
    Returns:

    Order quantity to achieve this percentage

    Return type:

    Decimal

    combo_leg_limit_order( legs, quantity, tag=, order_properties=None ) [source]

    Issue a combo leg limit order/trade for multiple assets, each having its own limit price.

    Parameters:
    Returns:

    Sequence of order tickets, one for each leg

    Return type:

    List[OrderTicket]

    ComboLegLimitOrder( legs, quantity, tag=, orderProperties=None ) [source]

    Issue a combo leg limit order/trade for multiple assets, each having its own limit price.

    Parameters:
    Returns:

    Sequence of order tickets, one for each leg

    Return type:

    List[OrderTicket]

    combo_limit_order( legs, quantity, limit_price, tag=, order_properties=None ) [source]

    Issue a combo limit order/trade for multiple assets. A single limit price is defined for the combo order and will fill only if the sum of the assets price compares properly to the limit price, depending on the direction.

    Parameters:
    Returns:

    Sequence of order tickets, one for each leg

    Return type:

    List[OrderTicket]

    ComboLimitOrder( legs, quantity, limitPrice, tag=, orderProperties=None ) [source]

    Issue a combo limit order/trade for multiple assets. A single limit price is defined for the combo order and will fill only if the sum of the assets price compares properly to the limit price, depending on the direction.

    Parameters:
    Returns:

    Sequence of order tickets, one for each leg

    Return type:

    List[OrderTicket]

    combo_market_order( legs, quantity, asynchronous=False, tag=, order_properties=None ) [source]

    Issue a combo market order/trade for multiple assets

    Parameters:
    Returns:

    Sequence of order tickets, one for each leg

    Return type:

    List[OrderTicket]

    ComboMarketOrder( legs, quantity, asynchronous=False, tag=, orderProperties=None ) [source]

    Issue a combo market order/trade for multiple assets

    Parameters:
    Returns:

    Sequence of order tickets, one for each leg

    Return type:

    List[OrderTicket]

    exercise_option( option_symbol, quantity, asynchronous=False, tag=, order_properties=None ) [source]

    Send an exercise order to the transaction handler

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    ExerciseOption( optionSymbol, quantity, asynchronous=False, tag=, orderProperties=None ) [source]

    Send an exercise order to the transaction handler

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    is_market_open( symbol ) [source]

    Determines if the exchange for the specified symbol is open at the current time.

    Parameters:
    Returns:

    True if the exchange is considered open at the current time, false otherwise

    Return type:

    bool

    IsMarketOpen( symbol ) [source]

    Determines if the exchange for the specified symbol is open at the current time.

    Parameters:
    Returns:

    True if the exchange is considered open at the current time, false otherwise

    Return type:

    Boolean

    limit_if_touched_order( symbol, quantity, trigger_price, limit_price, tag=, order_properties=None ) [source]

    Send a limit if touched order to the transaction handler:

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    LimitIfTouchedOrder( symbol, quantity, triggerPrice, limitPrice, tag=, orderProperties=None ) [source]

    Send a limit if touched order to the transaction handler:

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    limit_order( symbol, quantity, limit_price, tag=, order_properties=None ) [source]

    Send a limit order to the transaction handler:

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    LimitOrder( symbol, quantity, limitPrice, tag=, orderProperties=None ) [source]

    Send a limit order to the transaction handler:

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    liquidate( symbol_to_liquidate=None, tag=Liquidated ) [source]

    Liquidate all holdings and cancel open orders. Called at the end of day for tick-strategies.

    Parameters:
    Returns:

    Array of order ids for liquidated symbols

    Return type:

    List[int]

    Liquidate( symbolToLiquidate=None, tag=Liquidated ) [source]

    Liquidate all holdings and cancel open orders. Called at the end of day for tick-strategies.

    Parameters:
    Returns:

    Array of order ids for liquidated symbols

    Return type:

    List[Int32]

    market_on_close_order( symbol, quantity, tag=, order_properties=None ) [source]

    Market on close order implementation: Send a market order when the exchange closes

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    MarketOnCloseOrder( symbol, quantity, tag=, orderProperties=None ) [source]

    Market on close order implementation: Send a market order when the exchange closes

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    market_on_open_order( symbol, quantity, tag=, order_properties=None ) [source]

    Market on open order implementation: Send a market order when the exchange opens

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    MarketOnOpenOrder( symbol, quantity, tag=, orderProperties=None ) [source]

    Market on open order implementation: Send a market order when the exchange opens

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    market_order( symbol, quantity, asynchronous=False, tag=, order_properties=None ) [source]

    Market order implementation: Send a market order and wait for it to be filled.

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    market_order( security, quantity, asynchronous=False, tag=, order_properties=None ) [source]

    Market order implementation: Send a market order and wait for it to be filled.

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    MarketOrder( symbol, quantity, asynchronous=False, tag=, orderProperties=None ) [source]

    Market order implementation: Send a market order and wait for it to be filled.

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    MarketOrder( security, quantity, asynchronous=False, tag=, orderProperties=None ) [source]

    Market order implementation: Send a market order and wait for it to be filled.

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    on_assignment_order_event( assignment_event ) [source]

    Option assignment event handler. On an option assignment event for short legs the resulting information is passed to this method.

    Parameters:
    OnAssignmentOrderEvent( assignmentEvent ) [source]

    Option assignment event handler. On an option assignment event for short legs the resulting information is passed to this method.

    Parameters:
    on_order_event( order_event ) [source]

    Order fill event handler. On an order fill update the resulting information is passed to this method.

    Parameters:
    OnOrderEvent( orderEvent ) [source]

    Order fill event handler. On an order fill update the resulting information is passed to this method.

    Parameters:
    order( strategy, quantity, asynchronous=False, tag=, order_properties=None ) [source]

    Issue an order/trade for asset: Alias wrapper for Order(string, int);

    Parameters:
    Returns:

    Sequence of order tickets

    Return type:

    List[OrderTicket]

    order( symbol, quantity, asynchronous=False, tag=, order_properties=None ) [source]

    Issue an order/trade for asset: Alias wrapper for Order(string, int);

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    Order( strategy, quantity, asynchronous=False, tag=, orderProperties=None ) [source]

    Issue an order/trade for asset: Alias wrapper for Order(string, int);

    Parameters:
    Returns:

    Sequence of order tickets

    Return type:

    IEnumerable[OrderTicket]

    Order( symbol, quantity, asynchronous=False, tag=, orderProperties=None ) [source]

    Issue an order/trade for asset: Alias wrapper for Order(string, int);

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    sell( strategy, quantity, asynchronous=False, tag=, order_properties=None ) [source]

    Sell stock (alias of Order)

    Parameters:
    Returns:

    Sequence of order tickets

    Return type:

    List[OrderTicket]

    sell( symbol, quantity ) [source]

    Sell stock (alias of Order)

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    Sell( strategy, quantity, asynchronous=False, tag=, orderProperties=None ) [source]

    Sell stock (alias of Order)

    Parameters:
    Returns:

    Sequence of order tickets

    Return type:

    IEnumerable[OrderTicket]

    Sell( symbol, quantity ) [source]

    Sell stock (alias of Order)

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    set_benchmark( benchmark ) [source]

    Sets the benchmark used for computing statistics of the algorithm to the specified symbol

    Parameters:
    set_benchmark( ticker ) [source]

    Sets the benchmark used for computing statistics of the algorithm to the specified symbol

    Parameters:
    set_benchmark( symbol ) [source]

    Sets the benchmark used for computing statistics of the algorithm to the specified symbol

    Parameters:
    SetBenchmark( benchmark ) [source]

    Sets the benchmark used for computing statistics of the algorithm to the specified symbol

    Parameters:
    SetBenchmark( ticker ) [source]

    Sets the benchmark used for computing statistics of the algorithm to the specified symbol

    Parameters:
    SetBenchmark( symbol ) [source]

    Sets the benchmark used for computing statistics of the algorithm to the specified symbol

    Parameters:
    set_holdings( symbol, percentage, liquidate_existing_holdings=False, tag=, order_properties=None ) [source]

    Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin.

    Parameters:
    set_holdings( targets, liquidate_existing_holdings=False, tag=, order_properties=None ) [source]

    Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin.

    Parameters:
    SetHoldings( symbol, percentage, liquidateExistingHoldings=False, tag=, orderProperties=None ) [source]

    Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin.

    Parameters:
    SetHoldings( targets, liquidateExistingHoldings=False, tag=, orderProperties=None ) [source]

    Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin.

    Parameters:
    set_maximum_orders( max ) [source]

    Maximum number of orders for the algorithm

    Parameters:
    SetMaximumOrders( max ) [source]

    Maximum number of orders for the algorithm

    Parameters:
    set_trade_builder( trade_builder ) [source]

    Set the ITradeBuilder implementation to generate trades from executions and market price updates

    Parameters:
    SetTradeBuilder( tradeBuilder ) [source]

    Set the ITradeBuilder implementation to generate trades from executions and market price updates

    Parameters:
    shortable( symbol, short_quantity, update_order_id=None ) [source]

    Determines if the Symbol is shortable at the brokerage

    Parameters:
    Returns:

    True if the symbol can be shorted by the requested quantity

    Return type:

    bool

    Shortable( symbol, shortQuantity, updateOrderId=None ) [source]

    Determines if the Symbol is shortable at the brokerage

    Parameters:
    Returns:

    True if the symbol can be shorted by the requested quantity

    Return type:

    Boolean

    shortable_quantity( symbol ) [source]

    Gets the quantity shortable for the given asset

    Parameters:
    Returns:

    Quantity shortable for the given asset. Zero if not shortable, or a number greater than zero if shortable.

    Return type:

    int

    ShortableQuantity( symbol ) [source]

    Gets the quantity shortable for the given asset

    Parameters:
    Returns:

    Quantity shortable for the given asset. Zero if not shortable, or a number greater than zero if shortable.

    Return type:

    Int64

    stop_limit_order( symbol, quantity, stop_price, limit_price, tag=, order_properties=None ) [source]

    Send a stop limit order to the transaction handler:

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    StopLimitOrder( symbol, quantity, stopPrice, limitPrice, tag=, orderProperties=None ) [source]

    Send a stop limit order to the transaction handler:

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    stop_market_order( symbol, quantity, stop_price, tag=, order_properties=None ) [source]

    Create a stop market order and return the newly created order id; or negative if the order is invalid

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    StopMarketOrder( symbol, quantity, stopPrice, tag=, orderProperties=None ) [source]

    Create a stop market order and return the newly created order id; or negative if the order is invalid

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    submit_order_request( request ) [source]

    Will submit an order request to the algorithm

    Parameters:
    Returns:

    The order ticket

    Return type:

    OrderTicket

    SubmitOrderRequest( request ) [source]

    Will submit an order request to the algorithm

    Parameters:
    Returns:

    The order ticket

    Return type:

    OrderTicket

    trailing_stop_order( symbol, quantity, stop_price, trailing_amount, trailing_as_percentage, tag=, order_properties=None ) [source]

    Create a trailing stop order and return the newly created order id; or negative if the order is invalid. It will calculate the stop price using the trailing amount and the current market price.

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    TrailingStopOrder( symbol, quantity, stopPrice, trailingAmount, trailingAsPercentage, tag=, orderProperties=None ) [source]

    Create a trailing stop order and return the newly created order id; or negative if the order is invalid. It will calculate the stop price using the trailing amount and the current market price.

    Parameters:
    Returns:

    The order ticket instance.

    Return type:

    OrderTicket

    property benchmark [source]

    Benchmark

    Returns:

    Benchmark

    Return type:

    IBenchmark

    property Benchmark [source]

    Benchmark

    Returns:

    Benchmark

    Return type:

    IBenchmark

    property default_order_properties [source]

    Gets the default order properties

    Returns:

    Gets the default order properties

    Return type:

    IOrderProperties

    property DefaultOrderProperties [source]

    Gets the default order properties

    Returns:

    Gets the default order properties

    Return type:

    IOrderProperties

    property trade_builder [source]

    Gets the Trade Builder to generate trades from executions

    Returns:

    Gets the Trade Builder to generate trades from executions

    Return type:

    ITradeBuilder

    property TradeBuilder [source]

    Gets the Trade Builder to generate trades from executions

    Returns:

    Gets the Trade Builder to generate trades from executions

    Return type:

    ITradeBuilder

    property transactions [source]

    Transaction Manager - Process transaction fills and order management.

    Returns:

    Transaction Manager - Process transaction fills and order management.

    Return type:

    SecurityTransactionManager

    property Transactions [source]

    Transaction Manager - Process transaction fills and order management.

    Returns:

    Transaction Manager - Process transaction fills and order management.

    Return type:

    SecurityTransactionManager

    Universes

    Universes

    add_universe( t, security_type, name, resolution, market, universe_settings, selector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    add_universe( data_type, security_type, name, resolution, market, universe_settings, py_selector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    add_universe( date_rule, selector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    add_universe( coarse_selector, fine_selector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    add_universe( universe, fine_selector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    add_universe( py_object, pyfine ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    AddUniverse( T, securityType, name, resolution, market, universeSettings, selector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    AddUniverse( dataType, securityType, name, resolution, market, universeSettings, pySelector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    AddUniverse( dateRule, selector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    AddUniverse( coarseSelector, fineSelector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    AddUniverse( universe, fineSelector ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    AddUniverse( pyObject, pyfine ) [source]

    Adds a new universe selection model

    Parameters:
    Return type:

    Universe

    add_universe_options( underlying_symbol, option_filter ) [source]

    Creates a new universe selection model and adds it to the algorithm. This universe selection model will chain to the security changes of a given Universe selection output and create a new OptionChainUniverse for each of them

    Parameters:
    add_universe_options( universe, option_filter ) [source]

    Creates a new universe selection model and adds it to the algorithm. This universe selection model will chain to the security changes of a given Universe selection output and create a new OptionChainUniverse for each of them

    Parameters:
    AddUniverseOptions( underlyingSymbol, optionFilter ) [source]

    Creates a new universe selection model and adds it to the algorithm. This universe selection model will chain to the security changes of a given Universe selection output and create a new OptionChainUniverse for each of them

    Parameters:
    AddUniverseOptions( universe, optionFilter ) [source]

    Creates a new universe selection model and adds it to the algorithm. This universe selection model will chain to the security changes of a given Universe selection output and create a new OptionChainUniverse for each of them

    Parameters:
    property universe [source]

    Gets a helper that provides pre-defined universe definitions, such as top dollar volume

    Returns:

    Gets a helper that provides pre-defined universe definitions, such as top dollar volume

    Return type:

    UniverseDefinitions

    property Universe [source]

    Gets a helper that provides pre-defined universe definitions, such as top dollar volume

    Returns:

    Gets a helper that provides pre-defined universe definitions, such as top dollar volume

    Return type:

    UniverseDefinitions

    property universe_manager [source]

    Gets universe manager which holds universes keyed by their symbol

    Returns:

    Gets universe manager which holds universes keyed by their symbol

    Return type:

    UniverseManager

    property UniverseManager [source]

    Gets universe manager which holds universes keyed by their symbol

    Returns:

    Gets universe manager which holds universes keyed by their symbol

    Return type:

    UniverseManager

    property universe_settings [source]

    Gets the universe settings to be used when adding securities via universe selection

    Returns:

    Gets the universe settings to be used when adding securities via universe selection

    Return type:

    UniverseSettings

    property UniverseSettings [source]

    Gets the universe settings to be used when adding securities via universe selection

    Returns:

    Gets the universe settings to be used when adding securities via universe selection

    Return type:

    UniverseSettings

    Types

    AbandonedBaby

    class QuantConnect.Indicators.CandlestickPatterns.AbandonedBaby [source]

    Abandoned Baby candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AbandonedBaby

    class QuantConnect.Indicators.CandlestickPatterns.AbandonedBaby [source]

    Abandoned Baby candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    AccountType

    enum QuantConnect.AccountType [source]

    Account type: margin or cash

    field CASH

    Cash account type (1)

    Returns:

    Cash account type (1)

    Return type:

    AccountType

    field MARGIN

    Margin account type (0)

    Returns:

    Margin account type (0)

    Return type:

    AccountType

    AccountType

    enum QuantConnect.AccountType [source]

    Account type: margin or cash

    field Cash

    Cash account type (1)

    Returns:

    Cash account type (1)

    Return type:

    AccountType

    field Margin

    Margin account type (0)

    Returns:

    Margin account type (0)

    Return type:

    AccountType

    AdvanceBlock

    class QuantConnect.Indicators.CandlestickPatterns.AdvanceBlock [source]

    Advance Block candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    AdvanceBlock

    class QuantConnect.Indicators.CandlestickPatterns.AdvanceBlock [source]

    Advance Block candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    AlgorithmMode

    enum QuantConnect.AlgorithmMode [source]

    Represents the deployment modes of an algorithm

    field BACKTESTING

    Backtesting (2)

    Returns:

    Backtesting (2)

    Return type:

    AlgorithmMode

    field LIVE

    Live (0)

    Returns:

    Live (0)

    Return type:

    AlgorithmMode

    field OPTIMIZATION

    Optimization (1)

    Returns:

    Optimization (1)

    Return type:

    AlgorithmMode

    field RESEARCH

    Research (3)

    Returns:

    Research (3)

    Return type:

    AlgorithmMode

    AlgorithmMode

    enum QuantConnect.AlgorithmMode [source]

    Represents the deployment modes of an algorithm

    field Backtesting

    Backtesting (2)

    Returns:

    Backtesting (2)

    Return type:

    AlgorithmMode

    field Live

    Live (0)

    Returns:

    Live (0)

    Return type:

    AlgorithmMode

    field Optimization

    Optimization (1)

    Returns:

    Optimization (1)

    Return type:

    AlgorithmMode

    field Research

    Research (3)

    Returns:

    Research (3)

    Return type:

    AlgorithmMode

    AlgorithmStatus

    enum QuantConnect.AlgorithmStatus [source]

    States of a live deployment.

    field COMPLETED

    Algorithm completed running (6)

    Returns:

    Algorithm completed running (6)

    Return type:

    AlgorithmStatus

    field DELETED

    Algorithm has been deleted (5)

    Returns:

    Algorithm has been deleted (5)

    Return type:

    AlgorithmStatus

    field DEPLOY_ERROR

    Error compiling algorithm at start (0)

    Returns:

    Error compiling algorithm at start (0)

    Return type:

    AlgorithmStatus

    field HISTORY

    History status update (11)

    Returns:

    History status update (11)

    Return type:

    AlgorithmStatus

    field INITIALIZING

    The algorithm is initializing (10)

    Returns:

    The algorithm is initializing (10)

    Return type:

    AlgorithmStatus

    field INVALID

    Error in the algorithm id (not used) (8)

    Returns:

    Error in the algorithm id (not used) (8)

    Return type:

    AlgorithmStatus

    field IN_QUEUE

    Waiting for a server (1)

    Returns:

    Waiting for a server (1)

    Return type:

    AlgorithmStatus

    field LIQUIDATED

    Liquidated algorithm (4)

    Returns:

    Liquidated algorithm (4)

    Return type:

    AlgorithmStatus

    field LOGGING_IN

    The algorithm is logging into the brokerage (9)

    Returns:

    The algorithm is logging into the brokerage (9)

    Return type:

    AlgorithmStatus

    field RUNNING

    Running algorithm (2)

    Returns:

    Running algorithm (2)

    Return type:

    AlgorithmStatus

    field RUNTIME_ERROR

    Runtime Error Stoped Algorithm (7)

    Returns:

    Runtime Error Stoped Algorithm (7)

    Return type:

    AlgorithmStatus

    field STOPPED

    Stopped algorithm or exited with runtime errors (3)

    Returns:

    Stopped algorithm or exited with runtime errors (3)

    Return type:

    AlgorithmStatus

    AlgorithmStatus

    enum QuantConnect.AlgorithmStatus [source]

    States of a live deployment.

    field Completed

    Algorithm completed running (6)

    Returns:

    Algorithm completed running (6)

    Return type:

    AlgorithmStatus

    field Deleted

    Algorithm has been deleted (5)

    Returns:

    Algorithm has been deleted (5)

    Return type:

    AlgorithmStatus

    field DeployError

    Error compiling algorithm at start (0)

    Returns:

    Error compiling algorithm at start (0)

    Return type:

    AlgorithmStatus

    field History

    History status update (11)

    Returns:

    History status update (11)

    Return type:

    AlgorithmStatus

    field InQueue

    Waiting for a server (1)

    Returns:

    Waiting for a server (1)

    Return type:

    AlgorithmStatus

    field Initializing

    The algorithm is initializing (10)

    Returns:

    The algorithm is initializing (10)

    Return type:

    AlgorithmStatus

    field Invalid

    Error in the algorithm id (not used) (8)

    Returns:

    Error in the algorithm id (not used) (8)

    Return type:

    AlgorithmStatus

    field Liquidated

    Liquidated algorithm (4)

    Returns:

    Liquidated algorithm (4)

    Return type:

    AlgorithmStatus

    field LoggingIn

    The algorithm is logging into the brokerage (9)

    Returns:

    The algorithm is logging into the brokerage (9)

    Return type:

    AlgorithmStatus

    field Running

    Running algorithm (2)

    Returns:

    Running algorithm (2)

    Return type:

    AlgorithmStatus

    field RuntimeError

    Runtime Error Stoped Algorithm (7)

    Returns:

    Runtime Error Stoped Algorithm (7)

    Return type:

    AlgorithmStatus

    field Stopped

    Stopped algorithm or exited with runtime errors (3)

    Returns:

    Stopped algorithm or exited with runtime errors (3)

    Return type:

    AlgorithmStatus

    BeltHold

    class QuantConnect.Indicators.CandlestickPatterns.BeltHold [source]

    Belt-hold candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    BeltHold

    class QuantConnect.Indicators.CandlestickPatterns.BeltHold [source]

    Belt-hold candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Breakaway

    class QuantConnect.Indicators.CandlestickPatterns.Breakaway [source]

    Breakaway candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Breakaway

    class QuantConnect.Indicators.CandlestickPatterns.Breakaway [source]

    Breakaway candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    BrokerageMessageEvent

    class QuantConnect.Brokerages.BrokerageMessageEvent [source]

    Represents a message received from a brokerage

    property code

    Gets the brokerage specific code for this message, zero if no code was specified

    Returns:

    Gets the brokerage specific code for this message, zero if no code was specified

    Return type:

    str

    property message

    Gets the message text received from the brokerage

    Returns:

    Gets the message text received from the brokerage

    Return type:

    str

    property type

    Gets the type of brokerage message

    Returns:

    Gets the type of brokerage message

    Return type:

    BrokerageMessageType

    BrokerageMessageEvent

    class QuantConnect.Brokerages.BrokerageMessageEvent [source]

    Represents a message received from a brokerage

    property Code

    Gets the brokerage specific code for this message, zero if no code was specified

    Returns:

    Gets the brokerage specific code for this message, zero if no code was specified

    Return type:

    string

    property Message

    Gets the message text received from the brokerage

    Returns:

    Gets the message text received from the brokerage

    Return type:

    string

    property Type

    Gets the type of brokerage message

    Returns:

    Gets the type of brokerage message

    Return type:

    BrokerageMessageType

    BrokerageName

    enum QuantConnect.Brokerages.BrokerageName [source]

    Specifices what transaction model and submit/execution rules to use

    field ALPACA

    Transaction and submit/execution rules will use alpaca models

    Returns:

    Transaction and submit/execution rules will use alpaca models

    Return type:

    BrokerageName

    field ALPHA_STREAMS

    Transaction and submit/execution rules will use AlphaStream models

    Returns:

    Transaction and submit/execution rules will use AlphaStream models

    Return type:

    BrokerageName

    field ATREYU

    Transaction and submit/execution rules will use atreyu models

    Returns:

    Transaction and submit/execution rules will use atreyu models

    Return type:

    BrokerageName

    field AXOS

    Transaction and submit/execution rules will use Axos models

    Returns:

    Transaction and submit/execution rules will use Axos models

    Return type:

    BrokerageName

    field BINANCE

    Transaction and submit/execution rules will use binance models

    Returns:

    Transaction and submit/execution rules will use binance models

    Return type:

    BrokerageName

    field BINANCE_COIN_FUTURES

    Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.

    Returns:

    Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.

    Return type:

    BrokerageName

    field BINANCE_FUTURES

    Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD

    Returns:

    Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD

    Return type:

    BrokerageName

    field BINANCE_US

    Transaction and submit/execution rules will use Binance.US models

    Returns:

    Transaction and submit/execution rules will use Binance.US models

    Return type:

    BrokerageName

    field BITFINEX

    Transaction and submit/execution rules will use bitfinex models

    Returns:

    Transaction and submit/execution rules will use bitfinex models

    Return type:

    BrokerageName

    field BYBIT

    Transaction and submit/execution rules will use Bybit models

    Returns:

    Transaction and submit/execution rules will use Bybit models

    Return type:

    BrokerageName

    field COINBASE

    Transaction and submit/execution rules will use Coinbase broker's model

    Returns:

    Transaction and submit/execution rules will use Coinbase broker's model

    Return type:

    BrokerageName

    field DEFAULT

    Transaction and submit/execution rules will be the default as initialized

    Returns:

    Transaction and submit/execution rules will be the default as initialized

    Return type:

    BrokerageName

    field EXANTE

    Transaction and submit/execution rules will use Exante models

    Returns:

    Transaction and submit/execution rules will use Exante models

    Return type:

    BrokerageName

    field EZE

    Transaction and submit/execution rules will use Eze models

    Returns:

    Transaction and submit/execution rules will use Eze models

    Return type:

    BrokerageName

    field FTX

    Transaction and submit/execution rules will use ftx models

    Returns:

    Transaction and submit/execution rules will use ftx models

    Return type:

    BrokerageName

    field FTXUS

    Transaction and submit/execution rules will use ftx us models

    Returns:

    Transaction and submit/execution rules will use ftx us models

    Return type:

    BrokerageName

    field FXCM_BROKERAGE

    Transaction and submit/execution rules will use fxcm models

    Returns:

    Transaction and submit/execution rules will use fxcm models

    Return type:

    BrokerageName

    field INTERACTIVE_BROKERS_BROKERAGE

    Transaction and submit/execution rules will use interactive brokers models

    Returns:

    Transaction and submit/execution rules will use interactive brokers models

    Return type:

    BrokerageName

    field KRAKEN

    Transaction and submit/execution rules will use Kraken models

    Returns:

    Transaction and submit/execution rules will use Kraken models

    Return type:

    BrokerageName

    field OANDA_BROKERAGE

    Transaction and submit/execution rules will use oanda models

    Returns:

    Transaction and submit/execution rules will use oanda models

    Return type:

    BrokerageName

    field QUANT_CONNECT_BROKERAGE

    Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage

    Returns:

    Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage

    Return type:

    BrokerageName

    field RBI

    Transaction and submit/execution rules will use RBI models

    Returns:

    Transaction and submit/execution rules will use RBI models

    Return type:

    BrokerageName

    field SAMCO

    Transaction and submit/execution rules will use Samco models

    Returns:

    Transaction and submit/execution rules will use Samco models

    Return type:

    BrokerageName

    field TD_AMERITRADE

    Transaction and submit/execution rules will use TDameritrade models

    Returns:

    Transaction and submit/execution rules will use TDameritrade models

    Return type:

    BrokerageName

    field TRADE_STATION

    Transaction and submit/execution rules will use TradeStation models

    Returns:

    Transaction and submit/execution rules will use TradeStation models

    Return type:

    BrokerageName

    field TRADIER_BROKERAGE

    Transaction and submit/execution rules will use tradier models

    Returns:

    Transaction and submit/execution rules will use tradier models

    Return type:

    BrokerageName

    field TRADING_TECHNOLOGIES

    Transaction and submit/execution rules will use TradingTechnologies models

    Returns:

    Transaction and submit/execution rules will use TradingTechnologies models

    Return type:

    BrokerageName

    field WOLVERINE

    Transaction and submit/execution rules will use Wolverine models

    Returns:

    Transaction and submit/execution rules will use Wolverine models

    Return type:

    BrokerageName

    field ZERODHA

    Transaction and submit/execution rules will use Zerodha models

    Returns:

    Transaction and submit/execution rules will use Zerodha models

    Return type:

    BrokerageName

    BrokerageName

    enum QuantConnect.Brokerages.BrokerageName [source]

    Specifices what transaction model and submit/execution rules to use

    field Alpaca

    Transaction and submit/execution rules will use alpaca models

    Returns:

    Transaction and submit/execution rules will use alpaca models

    Return type:

    BrokerageName

    field AlphaStreams

    Transaction and submit/execution rules will use AlphaStream models

    Returns:

    Transaction and submit/execution rules will use AlphaStream models

    Return type:

    BrokerageName

    field Atreyu

    Transaction and submit/execution rules will use atreyu models

    Returns:

    Transaction and submit/execution rules will use atreyu models

    Return type:

    BrokerageName

    field Axos

    Transaction and submit/execution rules will use Axos models

    Returns:

    Transaction and submit/execution rules will use Axos models

    Return type:

    BrokerageName

    field Binance

    Transaction and submit/execution rules will use binance models

    Returns:

    Transaction and submit/execution rules will use binance models

    Return type:

    BrokerageName

    field BinanceCoinFutures

    Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.

    Returns:

    Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.

    Return type:

    BrokerageName

    field BinanceFutures

    Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD

    Returns:

    Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD

    Return type:

    BrokerageName

    field BinanceUS

    Transaction and submit/execution rules will use Binance.US models

    Returns:

    Transaction and submit/execution rules will use Binance.US models

    Return type:

    BrokerageName

    field Bitfinex

    Transaction and submit/execution rules will use bitfinex models

    Returns:

    Transaction and submit/execution rules will use bitfinex models

    Return type:

    BrokerageName

    field Bybit

    Transaction and submit/execution rules will use Bybit models

    Returns:

    Transaction and submit/execution rules will use Bybit models

    Return type:

    BrokerageName

    field Coinbase

    Transaction and submit/execution rules will use Coinbase broker's model

    Returns:

    Transaction and submit/execution rules will use Coinbase broker's model

    Return type:

    BrokerageName

    field Default

    Transaction and submit/execution rules will be the default as initialized

    Returns:

    Transaction and submit/execution rules will be the default as initialized

    Return type:

    BrokerageName

    field Exante

    Transaction and submit/execution rules will use Exante models

    Returns:

    Transaction and submit/execution rules will use Exante models

    Return type:

    BrokerageName

    field Eze

    Transaction and submit/execution rules will use Eze models

    Returns:

    Transaction and submit/execution rules will use Eze models

    Return type:

    BrokerageName

    field FTX

    Transaction and submit/execution rules will use ftx models

    Returns:

    Transaction and submit/execution rules will use ftx models

    Return type:

    BrokerageName

    field FTXUS

    Transaction and submit/execution rules will use ftx us models

    Returns:

    Transaction and submit/execution rules will use ftx us models

    Return type:

    BrokerageName

    field FxcmBrokerage

    Transaction and submit/execution rules will use fxcm models

    Returns:

    Transaction and submit/execution rules will use fxcm models

    Return type:

    BrokerageName

    field InteractiveBrokersBrokerage

    Transaction and submit/execution rules will use interactive brokers models

    Returns:

    Transaction and submit/execution rules will use interactive brokers models

    Return type:

    BrokerageName

    field Kraken

    Transaction and submit/execution rules will use Kraken models

    Returns:

    Transaction and submit/execution rules will use Kraken models

    Return type:

    BrokerageName

    field OandaBrokerage

    Transaction and submit/execution rules will use oanda models

    Returns:

    Transaction and submit/execution rules will use oanda models

    Return type:

    BrokerageName

    field QuantConnectBrokerage

    Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage

    Returns:

    Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage

    Return type:

    BrokerageName

    field RBI

    Transaction and submit/execution rules will use RBI models

    Returns:

    Transaction and submit/execution rules will use RBI models

    Return type:

    BrokerageName

    field Samco

    Transaction and submit/execution rules will use Samco models

    Returns:

    Transaction and submit/execution rules will use Samco models

    Return type:

    BrokerageName

    field TDAmeritrade

    Transaction and submit/execution rules will use TDameritrade models

    Returns:

    Transaction and submit/execution rules will use TDameritrade models

    Return type:

    BrokerageName

    field TradeStation

    Transaction and submit/execution rules will use TradeStation models

    Returns:

    Transaction and submit/execution rules will use TradeStation models

    Return type:

    BrokerageName

    field TradierBrokerage

    Transaction and submit/execution rules will use tradier models

    Returns:

    Transaction and submit/execution rules will use tradier models

    Return type:

    BrokerageName

    field TradingTechnologies

    Transaction and submit/execution rules will use TradingTechnologies models

    Returns:

    Transaction and submit/execution rules will use TradingTechnologies models

    Return type:

    BrokerageName

    field Wolverine

    Transaction and submit/execution rules will use Wolverine models

    Returns:

    Transaction and submit/execution rules will use Wolverine models

    Return type:

    BrokerageName

    field Zerodha

    Transaction and submit/execution rules will use Zerodha models

    Returns:

    Transaction and submit/execution rules will use Zerodha models

    Return type:

    BrokerageName

    Cfd

    class QuantConnect.Securities.Cfd.Cfd [source]

    CFD Security Object Implementation for CFD Assets

    clear()

    Removes every custom property that had been set.

    get_last_data()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    refresh_data_normalization_mode_property()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    set_buying_power_model( buying_power_model )

    Sets the buying power model

    Parameters:
    • buying_power_model ( IBuyingPowerModel )
    set_buying_power_model( py_object )

    Sets the buying power model

    Parameters:
    • py_object ( PyObject )
    set_data_filter( py_object )

    Set Security Data Filter

    Parameters:
    • py_object ( PyObject )
    set_data_filter( data_filter )

    Set Security Data Filter

    Parameters:
    • data_filter ( ISecurityDataFilter )
    set_fee_model( feel_model )

    Sets the fee model

    Parameters:
    • feel_model ( PyObject | IFeeModel )
    set_fill_model( fill_model )

    Sets the fill model

    Parameters:
    • fill_model ( PyObject | IFillModel )
    set_leverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( float )
    set_local_time_keeper( local_time_keeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    set_margin_interest_rate_model( margin_interest_rate_model )

    Sets the margin interests rate model

    Parameters:
    • margin_interest_rate_model ( IMarginInterestRateModel )
    set_margin_interest_rate_model( py_object )

    Sets the margin interests rate model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( py_object )

    Sets the margin model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( margin_model )

    Sets the margin model

    Parameters:
    • margin_model ( IBuyingPowerModel )
    set_market_price( data )

    Update any security properties based on the latest market data and time

    Parameters:
    set_settlement_model( settlement_model )

    Sets the settlement model

    Parameters:
    • settlement_model ( PyObject | ISettlementModel )
    set_shortable_provider( py_object )

    Set Python Shortable Provider for this Security

    Parameters:
    • py_object ( PyObject )
    set_shortable_provider( shortable_provider )

    Set Python Shortable Provider for this Security

    Parameters:
    set_slippage_model( slippage_model )

    Sets the slippage model

    Parameters:
    • slippage_model ( ISlippageModel | PyObject )
    set_volatility_model( volatility_model )

    Sets the volatility model

    Parameters:
    • volatility_model ( PyObject | IVolatilityModel )
    update( data, data_type, contains_fill_forward_data=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( List[BaseData] )
    • data_type ( Type )
    • contains_fill_forward_data ( bool, optional )
    property ask_price

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    float

    property ask_size

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    float

    property bid_price

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    float

    property bid_size

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    float

    property buying_power_model

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    float

    property contract_multiplier

    Gets the contract multiplier for this CFD security

    Returns:

    Gets the contract multiplier for this CFD security

    Return type:

    float

    property data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property data_filter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property fee_model

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property fill_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property has_data

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property high

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    float

    property hold_stock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property is_delisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property is_tradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property item

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    property leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    float

    property local_time

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    datetime

    property low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    float

    property margin_interest_rate_model

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property margin_model

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property minimum_price_variation

    Gets the minimum price variation for this CFD security

    Returns:

    Gets the minimum price variation for this CFD security

    Return type:

    float

    property open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    float

    property open_interest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property portfolio_model

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    float

    property price_variation_model

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property quote_currency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property settlement_model

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property shortable_provider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IintableProvider

    property slippage_model

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List[SubscriptionDataConfig]

    property symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property symbol_properties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property volatility_model

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    float

    Cfd

    class QuantConnect.Securities.Cfd.Cfd [source]

    CFD Security Object Implementation for CFD Assets

    Clear()

    Removes every custom property that had been set.

    GetLastData()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    RefreshDataNormalizationModeProperty()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    SetBuyingPowerModel( buyingPowerModel )

    Sets the buying power model

    Parameters:
    • buyingPowerModel ( IBuyingPowerModel )
    SetBuyingPowerModel( pyObject )

    Sets the buying power model

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( pyObject )

    Set Security Data Filter

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( dataFilter )

    Set Security Data Filter

    Parameters:
    • dataFilter ( ISecurityDataFilter )
    SetFeeModel( feelModel )

    Sets the fee model

    Parameters:
    • feelModel ( PyObject | IFeeModel )
    SetFillModel( fillModel )

    Sets the fill model

    Parameters:
    • fillModel ( PyObject | IFillModel )
    SetLeverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( decimal )
    SetLocalTimeKeeper( localTimeKeeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    SetMarginInterestRateModel( marginInterestRateModel )

    Sets the margin interests rate model

    Parameters:
    • marginInterestRateModel ( IMarginInterestRateModel )
    SetMarginInterestRateModel( pyObject )

    Sets the margin interests rate model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( pyObject )

    Sets the margin model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( marginModel )

    Sets the margin model

    Parameters:
    • marginModel ( IBuyingPowerModel )
    SetMarketPrice( data )

    Update any security properties based on the latest market data and time

    Parameters:
    SetSettlementModel( settlementModel )

    Sets the settlement model

    Parameters:
    • settlementModel ( PyObject | ISettlementModel )
    SetShortableProvider( pyObject )

    Set Python Shortable Provider for this Security

    Parameters:
    • pyObject ( PyObject )
    SetShortableProvider( shortableProvider )

    Set Python Shortable Provider for this Security

    Parameters:
    • shortableProvider ( IShortableProvider )
    SetSlippageModel( slippageModel )

    Sets the slippage model

    Parameters:
    • slippageModel ( ISlippageModel | PyObject )
    SetVolatilityModel( volatilityModel )

    Sets the volatility model

    Parameters:
    • volatilityModel ( PyObject | IVolatilityModel )
    Update( data, dataType, containsFillForwardData=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( IReadOnlyList<BaseData> )
    • dataType ( Type )
    • containsFillForwardData ( Boolean, optional )
    property AskPrice

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    decimal

    property AskSize

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    decimal

    property BidPrice

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    decimal

    property BidSize

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    decimal

    property BuyingPowerModel

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property Cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property Close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    decimal

    property ContractMultiplier

    Gets the contract multiplier for this CFD security

    Returns:

    Gets the contract multiplier for this CFD security

    Return type:

    decimal

    property Data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property DataFilter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property Exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property FeeModel

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property FillModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property Fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property HasData

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property High

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    decimal

    property HoldStock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property Holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property Invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property IsDelisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property IsTradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property Leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    decimal

    property LocalTime

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    DateTime

    property Low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    decimal

    property MarginInterestRateModel

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property MarginModel

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property MinimumPriceVariation

    Gets the minimum price variation for this CFD security

    Returns:

    Gets the minimum price variation for this CFD security

    Return type:

    decimal

    property Open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    decimal

    property OpenInterest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property PortfolioModel

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property Price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    decimal

    property PriceVariationModel

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property QuoteCurrency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property SettlementModel

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property ShortableProvider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IShortableProvider

    property SlippageModel

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property Subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List<SubscriptionDataConfig>

    property Symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property SymbolProperties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property Type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property VolatilityModel

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property Volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    decimal

    property [System.String]

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    Chart

    class QuantConnect.Chart [source]

    Single Parent Chart Object for Custom Charting

    add_series( series )

    Add a reference to this chart series:

    Parameters:
    clone()

    Return a new instance clone of this object

    Return type:

    Chart

    clone_empty()

    Return a new empty instance clone of this object

    Return type:

    Chart

    get_updates()

    Fetch a chart with only the updates since the last request, Underlying series will save the index position.

    Return type:

    Chart

    try_add_and_get_series( name, template_series, force_add_new=False )

    Gets Series if already present in chart, else will add a new series and return it

    Parameters:
    • name ( str )
    • template_series ( BaseSeries )
    • force_add_new ( bool, optional )
    Return type:

    BaseSeries

    try_add_and_get_series( name, type, index, unit, color, symbol, force_add_new=False )

    Gets Series if already present in chart, else will add a new series and return it

    Parameters:
    Return type:

    Series

    property legend_disabled

    True to hide this series legend from the chart

    Returns:

    True to hide this series legend from the chart

    Return type:

    bool

    property symbol

    Associated symbol if any, making this an asset plot

    Returns:

    Associated symbol if any, making this an asset plot

    Return type:

    Symbol

    field name

    Name of the Chart

    Returns:

    Name of the Chart

    Return type:

    str

    field series

    List of Series Objects for this Chart:

    Returns:

    List of Series Objects for this Chart:

    Return type:

    Dict[str, BaseSeries]

    Chart

    class QuantConnect.Chart [source]

    Single Parent Chart Object for Custom Charting

    AddSeries( series )

    Add a reference to this chart series:

    Parameters:
    Clone()

    Return a new instance clone of this object

    Return type:

    Chart

    CloneEmpty()

    Return a new empty instance clone of this object

    Return type:

    Chart

    GetUpdates()

    Fetch a chart with only the updates since the last request, Underlying series will save the index position.

    Return type:

    Chart

    TryAddAndGetSeries( name, templateSeries, forceAddNew=False )

    Gets Series if already present in chart, else will add a new series and return it

    Parameters:
    • name ( string )
    • templateSeries ( BaseSeries )
    • forceAddNew ( bool, optional )
    Return type:

    BaseSeries

    TryAddAndGetSeries( name, type, index, unit, color, symbol, forceAddNew=False )

    Gets Series if already present in chart, else will add a new series and return it

    Parameters:
    Return type:

    Series

    property LegendDisabled

    True to hide this series legend from the chart

    Returns:

    True to hide this series legend from the chart

    Return type:

    bool

    property Symbol

    Associated symbol if any, making this an asset plot

    Returns:

    Associated symbol if any, making this an asset plot

    Return type:

    Symbol

    field Name

    Name of the Chart

    Returns:

    Name of the Chart

    Return type:

    string

    field Series

    List of Series Objects for this Chart:

    Returns:

    List of Series Objects for this Chart:

    Return type:

    Dictionary<String, BaseSeries>

    ClosingMarubozu

    class QuantConnect.Indicators.CandlestickPatterns.ClosingMarubozu [source]

    Closing Marubozu candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ClosingMarubozu

    class QuantConnect.Indicators.CandlestickPatterns.ClosingMarubozu [source]

    Closing Marubozu candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ConcealedBabySwallow

    class QuantConnect.Indicators.CandlestickPatterns.ConcealedBabySwallow [source]

    Concealed Baby Swallow candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ConcealedBabySwallow

    class QuantConnect.Indicators.CandlestickPatterns.ConcealedBabySwallow [source]

    Concealed Baby Swallow candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    CorrelationType

    enum QuantConnect.Indicators.CorrelationType [source]

    Defines the different types of Correlation

    field PEARSON

    Pearson Correlation (Product-Moment Correlation): Measures the linear relationship between two datasets. The coefficient ranges from -1 to 1. A value of 1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear relationship. It assumes that both datasets are normally distributed and the relationship is linear. It is sensitive to outliers which can affect the correlation significantly.

    Returns:

    Pearson Correlation (Product-Moment Correlation): Measures the linear relationship between two datasets. The coefficient ranges from -1 to 1. A value of 1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear relationship. It assumes that both datasets are normally distributed and the relationship is linear. It is sensitive to outliers which can affect the correlation significantly.

    Return type:

    CorrelationType

    field SPEARMAN

    Spearman Correlation (Rank Correlation): Measures the strength and direction of the monotonic relationship between two datasets. Instead of calculating the coefficient using raw data, it uses the rank of the data points. This method is non-parametric and does not assume a normal distribution of the datasets. It's useful when the data is not normally distributed or when the relationship is not linear. Spearman's correlation is less sensitive to outliers than Pearson's correlation. The coefficient also ranges from -1 to 1 with similar interpretations for the values, but it reflects monotonic relationships rather than only linear ones.

    Returns:

    Spearman Correlation (Rank Correlation): Measures the strength and direction of the monotonic relationship between two datasets. Instead of calculating the coefficient using raw data, it uses the rank of the data points. This method is non-parametric and does not assume a normal distribution of the datasets. It's useful when the data is not normally distributed or when the relationship is not linear. Spearman's correlation is less sensitive to outliers than Pearson's correlation. The coefficient also ranges from -1 to 1 with similar interpretations for the values, but it reflects monotonic relationships rather than only linear ones.

    Return type:

    CorrelationType

    CorrelationType

    enum QuantConnect.Indicators.CorrelationType [source]

    Defines the different types of Correlation

    field Pearson

    Pearson Correlation (Product-Moment Correlation): Measures the linear relationship between two datasets. The coefficient ranges from -1 to 1. A value of 1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear relationship. It assumes that both datasets are normally distributed and the relationship is linear. It is sensitive to outliers which can affect the correlation significantly.

    Returns:

    Pearson Correlation (Product-Moment Correlation): Measures the linear relationship between two datasets. The coefficient ranges from -1 to 1. A value of 1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear relationship. It assumes that both datasets are normally distributed and the relationship is linear. It is sensitive to outliers which can affect the correlation significantly.

    Return type:

    CorrelationType

    field Spearman

    Spearman Correlation (Rank Correlation): Measures the strength and direction of the monotonic relationship between two datasets. Instead of calculating the coefficient using raw data, it uses the rank of the data points. This method is non-parametric and does not assume a normal distribution of the datasets. It's useful when the data is not normally distributed or when the relationship is not linear. Spearman's correlation is less sensitive to outliers than Pearson's correlation. The coefficient also ranges from -1 to 1 with similar interpretations for the values, but it reflects monotonic relationships rather than only linear ones.

    Returns:

    Spearman Correlation (Rank Correlation): Measures the strength and direction of the monotonic relationship between two datasets. Instead of calculating the coefficient using raw data, it uses the rank of the data points. This method is non-parametric and does not assume a normal distribution of the datasets. It's useful when the data is not normally distributed or when the relationship is not linear. Spearman's correlation is less sensitive to outliers than Pearson's correlation. The coefficient also ranges from -1 to 1 with similar interpretations for the values, but it reflects monotonic relationships rather than only linear ones.

    Return type:

    CorrelationType

    Counterattack

    class QuantConnect.Indicators.CandlestickPatterns.Counterattack [source]

    Counterattack candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Counterattack

    class QuantConnect.Indicators.CandlestickPatterns.Counterattack [source]

    Counterattack candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Crypto

    class QuantConnect.Securities.Crypto.Crypto [source]

    Crypto Security Object Implementation for Crypto Assets

    clear()

    Removes every custom property that had been set.

    get_last_data()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    refresh_data_normalization_mode_property()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    set_buying_power_model( buying_power_model )

    Sets the buying power model

    Parameters:
    • buying_power_model ( IBuyingPowerModel )
    set_buying_power_model( py_object )

    Sets the buying power model

    Parameters:
    • py_object ( PyObject )
    set_data_filter( py_object )

    Set Security Data Filter

    Parameters:
    • py_object ( PyObject )
    set_data_filter( data_filter )

    Set Security Data Filter

    Parameters:
    • data_filter ( ISecurityDataFilter )
    set_fee_model( feel_model )

    Sets the fee model

    Parameters:
    • feel_model ( PyObject | IFeeModel )
    set_fill_model( fill_model )

    Sets the fill model

    Parameters:
    • fill_model ( PyObject | IFillModel )
    set_leverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( float )
    set_local_time_keeper( local_time_keeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    set_margin_interest_rate_model( margin_interest_rate_model )

    Sets the margin interests rate model

    Parameters:
    • margin_interest_rate_model ( IMarginInterestRateModel )
    set_margin_interest_rate_model( py_object )

    Sets the margin interests rate model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( py_object )

    Sets the margin model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( margin_model )

    Sets the margin model

    Parameters:
    • margin_model ( IBuyingPowerModel )
    set_market_price( data )

    Update any security properties based on the latest market data and time

    Parameters:
    set_settlement_model( settlement_model )

    Sets the settlement model

    Parameters:
    • settlement_model ( PyObject | ISettlementModel )
    set_shortable_provider( py_object )

    Set Python Shortable Provider for this Security

    Parameters:
    • py_object ( PyObject )
    set_shortable_provider( shortable_provider )

    Set Python Shortable Provider for this Security

    Parameters:
    set_slippage_model( slippage_model )

    Sets the slippage model

    Parameters:
    • slippage_model ( ISlippageModel | PyObject )
    set_volatility_model( volatility_model )

    Sets the volatility model

    Parameters:
    • volatility_model ( PyObject | IVolatilityModel )
    update( data, data_type, contains_fill_forward_data=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( List[BaseData] )
    • data_type ( Type )
    • contains_fill_forward_data ( bool, optional )
    property ask_price

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    float

    property ask_size

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    float

    property base_currency

    Gets the currency acquired by going long this currency pair

    Returns:

    Gets the currency acquired by going long this currency pair

    Return type:

    Cash

    property bid_price

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    float

    property bid_size

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    float

    property buying_power_model

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    float

    property data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property data_filter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property fee_model

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property fill_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property has_data

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property high

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    float

    property hold_stock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property is_delisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property is_tradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property item

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    property leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    float

    property local_time

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    datetime

    property low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    float

    property margin_interest_rate_model

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property margin_model

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    float

    property open_interest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property portfolio_model

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    float

    property price_variation_model

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property quote_currency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property settlement_model

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property shortable_provider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IintableProvider

    property slippage_model

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List[SubscriptionDataConfig]

    property symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property symbol_properties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property volatility_model

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    float

    Crypto

    class QuantConnect.Securities.Crypto.Crypto [source]

    Crypto Security Object Implementation for Crypto Assets

    Clear()

    Removes every custom property that had been set.

    GetLastData()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    RefreshDataNormalizationModeProperty()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    SetBuyingPowerModel( buyingPowerModel )

    Sets the buying power model

    Parameters:
    • buyingPowerModel ( IBuyingPowerModel )
    SetBuyingPowerModel( pyObject )

    Sets the buying power model

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( pyObject )

    Set Security Data Filter

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( dataFilter )

    Set Security Data Filter

    Parameters:
    • dataFilter ( ISecurityDataFilter )
    SetFeeModel( feelModel )

    Sets the fee model

    Parameters:
    • feelModel ( PyObject | IFeeModel )
    SetFillModel( fillModel )

    Sets the fill model

    Parameters:
    • fillModel ( PyObject | IFillModel )
    SetLeverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( decimal )
    SetLocalTimeKeeper( localTimeKeeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    SetMarginInterestRateModel( marginInterestRateModel )

    Sets the margin interests rate model

    Parameters:
    • marginInterestRateModel ( IMarginInterestRateModel )
    SetMarginInterestRateModel( pyObject )

    Sets the margin interests rate model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( pyObject )

    Sets the margin model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( marginModel )

    Sets the margin model

    Parameters:
    • marginModel ( IBuyingPowerModel )
    SetMarketPrice( data )

    Update any security properties based on the latest market data and time

    Parameters:
    SetSettlementModel( settlementModel )

    Sets the settlement model

    Parameters:
    • settlementModel ( PyObject | ISettlementModel )
    SetShortableProvider( pyObject )

    Set Python Shortable Provider for this Security

    Parameters:
    • pyObject ( PyObject )
    SetShortableProvider( shortableProvider )

    Set Python Shortable Provider for this Security

    Parameters:
    • shortableProvider ( IShortableProvider )
    SetSlippageModel( slippageModel )

    Sets the slippage model

    Parameters:
    • slippageModel ( ISlippageModel | PyObject )
    SetVolatilityModel( volatilityModel )

    Sets the volatility model

    Parameters:
    • volatilityModel ( PyObject | IVolatilityModel )
    Update( data, dataType, containsFillForwardData=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( IReadOnlyList<BaseData> )
    • dataType ( Type )
    • containsFillForwardData ( Boolean, optional )
    property AskPrice

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    decimal

    property AskSize

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    decimal

    property BaseCurrency

    Gets the currency acquired by going long this currency pair

    Returns:

    Gets the currency acquired by going long this currency pair

    Return type:

    Cash

    property BidPrice

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    decimal

    property BidSize

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    decimal

    property BuyingPowerModel

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property Cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property Close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    decimal

    property Data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property DataFilter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property Exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property FeeModel

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property FillModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property Fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property HasData

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property High

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    decimal

    property HoldStock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property Holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property Invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property IsDelisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property IsTradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property Leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    decimal

    property LocalTime

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    DateTime

    property Low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    decimal

    property MarginInterestRateModel

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property MarginModel

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property Open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    decimal

    property OpenInterest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property PortfolioModel

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property Price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    decimal

    property PriceVariationModel

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property QuoteCurrency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property SettlementModel

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property ShortableProvider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IShortableProvider

    property SlippageModel

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property Subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List<SubscriptionDataConfig>

    property Symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property SymbolProperties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property Type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property VolatilityModel

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property Volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    decimal

    property [System.String]

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    CryptoFuture

    class QuantConnect.Securities.CryptoFuture.CryptoFuture [source]

    Crypto Future Security Object Implementation for Crypto Future Assets

    clear()

    Removes every custom property that had been set.

    get_last_data()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    is_crypto_coin_future()

    Checks whether the security is a crypto coin future

    Return type:

    bool

    refresh_data_normalization_mode_property()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    set_buying_power_model( buying_power_model )

    Sets the buying power model

    Parameters:
    • buying_power_model ( IBuyingPowerModel )
    set_buying_power_model( py_object )

    Sets the buying power model

    Parameters:
    • py_object ( PyObject )
    set_data_filter( py_object )

    Set Security Data Filter

    Parameters:
    • py_object ( PyObject )
    set_data_filter( data_filter )

    Set Security Data Filter

    Parameters:
    • data_filter ( ISecurityDataFilter )
    set_fee_model( feel_model )

    Sets the fee model

    Parameters:
    • feel_model ( PyObject | IFeeModel )
    set_fill_model( fill_model )

    Sets the fill model

    Parameters:
    • fill_model ( PyObject | IFillModel )
    set_leverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( float )
    set_local_time_keeper( local_time_keeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    set_margin_interest_rate_model( margin_interest_rate_model )

    Sets the margin interests rate model

    Parameters:
    • margin_interest_rate_model ( IMarginInterestRateModel )
    set_margin_interest_rate_model( py_object )

    Sets the margin interests rate model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( py_object )

    Sets the margin model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( margin_model )

    Sets the margin model

    Parameters:
    • margin_model ( IBuyingPowerModel )
    set_market_price( data )

    Update any security properties based on the latest market data and time

    Parameters:
    set_settlement_model( settlement_model )

    Sets the settlement model

    Parameters:
    • settlement_model ( PyObject | ISettlementModel )
    set_shortable_provider( py_object )

    Set Python Shortable Provider for this Security

    Parameters:
    • py_object ( PyObject )
    set_shortable_provider( shortable_provider )

    Set Python Shortable Provider for this Security

    Parameters:
    set_slippage_model( slippage_model )

    Sets the slippage model

    Parameters:
    • slippage_model ( ISlippageModel | PyObject )
    set_volatility_model( volatility_model )

    Sets the volatility model

    Parameters:
    • volatility_model ( PyObject | IVolatilityModel )
    update( data, data_type, contains_fill_forward_data=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( List[BaseData] )
    • data_type ( Type )
    • contains_fill_forward_data ( bool, optional )
    property ask_price

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    float

    property ask_size

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    float

    property base_currency

    Gets the currency acquired by going long this currency pair

    Returns:

    Gets the currency acquired by going long this currency pair

    Return type:

    Cash

    property bid_price

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    float

    property bid_size

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    float

    property buying_power_model

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    float

    property data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property data_filter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property fee_model

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property fill_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property has_data

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property high

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    float

    property hold_stock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property is_delisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property is_tradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property item

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    property leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    float

    property local_time

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    datetime

    property low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    float

    property margin_interest_rate_model

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property margin_model

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    float

    property open_interest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property portfolio_model

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    float

    property price_variation_model

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property quote_currency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property settlement_model

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property shortable_provider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IintableProvider

    property slippage_model

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List[SubscriptionDataConfig]

    property symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property symbol_properties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property volatility_model

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    float

    CryptoFuture

    class QuantConnect.Securities.CryptoFuture.CryptoFuture [source]

    Crypto Future Security Object Implementation for Crypto Future Assets

    Clear()

    Removes every custom property that had been set.

    GetLastData()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    IsCryptoCoinFuture()

    Checks whether the security is a crypto coin future

    Return type:

    Boolean

    RefreshDataNormalizationModeProperty()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    SetBuyingPowerModel( buyingPowerModel )

    Sets the buying power model

    Parameters:
    • buyingPowerModel ( IBuyingPowerModel )
    SetBuyingPowerModel( pyObject )

    Sets the buying power model

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( pyObject )

    Set Security Data Filter

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( dataFilter )

    Set Security Data Filter

    Parameters:
    • dataFilter ( ISecurityDataFilter )
    SetFeeModel( feelModel )

    Sets the fee model

    Parameters:
    • feelModel ( PyObject | IFeeModel )
    SetFillModel( fillModel )

    Sets the fill model

    Parameters:
    • fillModel ( PyObject | IFillModel )
    SetLeverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( decimal )
    SetLocalTimeKeeper( localTimeKeeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    SetMarginInterestRateModel( marginInterestRateModel )

    Sets the margin interests rate model

    Parameters:
    • marginInterestRateModel ( IMarginInterestRateModel )
    SetMarginInterestRateModel( pyObject )

    Sets the margin interests rate model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( pyObject )

    Sets the margin model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( marginModel )

    Sets the margin model

    Parameters:
    • marginModel ( IBuyingPowerModel )
    SetMarketPrice( data )

    Update any security properties based on the latest market data and time

    Parameters:
    SetSettlementModel( settlementModel )

    Sets the settlement model

    Parameters:
    • settlementModel ( PyObject | ISettlementModel )
    SetShortableProvider( pyObject )

    Set Python Shortable Provider for this Security

    Parameters:
    • pyObject ( PyObject )
    SetShortableProvider( shortableProvider )

    Set Python Shortable Provider for this Security

    Parameters:
    • shortableProvider ( IShortableProvider )
    SetSlippageModel( slippageModel )

    Sets the slippage model

    Parameters:
    • slippageModel ( ISlippageModel | PyObject )
    SetVolatilityModel( volatilityModel )

    Sets the volatility model

    Parameters:
    • volatilityModel ( PyObject | IVolatilityModel )
    Update( data, dataType, containsFillForwardData=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( IReadOnlyList<BaseData> )
    • dataType ( Type )
    • containsFillForwardData ( Boolean, optional )
    property AskPrice

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    decimal

    property AskSize

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    decimal

    property BaseCurrency

    Gets the currency acquired by going long this currency pair

    Returns:

    Gets the currency acquired by going long this currency pair

    Return type:

    Cash

    property BidPrice

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    decimal

    property BidSize

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    decimal

    property BuyingPowerModel

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property Cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property Close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    decimal

    property Data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property DataFilter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property Exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property FeeModel

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property FillModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property Fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property HasData

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property High

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    decimal

    property HoldStock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property Holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property Invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property IsDelisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property IsTradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property Leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    decimal

    property LocalTime

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    DateTime

    property Low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    decimal

    property MarginInterestRateModel

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property MarginModel

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property Open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    decimal

    property OpenInterest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property PortfolioModel

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property Price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    decimal

    property PriceVariationModel

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property QuoteCurrency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property SettlementModel

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property ShortableProvider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IShortableProvider

    property SlippageModel

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property Subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List<SubscriptionDataConfig>

    property Symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property SymbolProperties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property Type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property VolatilityModel

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property Volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    decimal

    property [System.String]

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    DarkCloudCover

    class QuantConnect.Indicators.CandlestickPatterns.DarkCloudCover [source]

    Dark Cloud Cover candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DarkCloudCover

    class QuantConnect.Indicators.CandlestickPatterns.DarkCloudCover [source]

    Dark Cloud Cover candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Delistings

    class QuantConnect.Data.Market.Delistings [source]

    Collections of Delisting keyed by Symbol

    add( key, value )

    Adds an item to the ICollection .

    Parameters:
    add( item )

    Adds an item to the ICollection .

    Parameters:
    • item ( Dict[Symbol, Delisting] )
    clear()

    Removes all keys and values from the IExtendedDictionary .

    contains( item )

    Determines whether the ICollection contains a specific value.

    Parameters:
    • item ( Dict[Symbol, Delisting] )
    Return type:

    bool

    contains_key( key )

    Determines whether the IDictionary contains an element with the specified key.

    Parameters:
    Return type:

    bool

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    copy_to( array, array_index )

    Copies the elements of the ICollection to an Array , starting at a particular Array index.

    Parameters:
    • array ( Dict )
    • array_index ( int )
    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    Delisting

    get_enumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    Dict[Symbol, Delisting]

    get_value( key )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Delisting

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    Return type:

    Delisting

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    remove( item )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    • item ( Dict[Symbol, Delisting] )
    Return type:

    bool

    remove( key )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    Return type:

    bool

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    Return type:

    Delisting

    try_get_value( key, value )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    bool

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property count

    Gets the number of elements contained in the ICollection .

    Returns:

    Gets the number of elements contained in the ICollection .

    Return type:

    int

    property is_read_only

    Gets a value indicating whether the ICollection is read-only.

    Returns:

    Gets a value indicating whether the ICollection is read-only.

    Return type:

    bool

    property item

    Gets or sets the Delisting with the specified ticker.

    Returns:

    Gets or sets the Delisting with the specified ticker.

    Return type:

    Delisting

    property keys

    Gets an ICollection containing the keys of the IDictionary .

    Returns:

    Gets an ICollection containing the keys of the IDictionary .

    Return type:

    List[Symbol]

    property time

    Gets or sets the time associated with this collection of data

    Returns:

    Gets or sets the time associated with this collection of data

    Return type:

    datetime

    property values

    Gets an ICollection containing the values in the IDictionary .

    Returns:

    Gets an ICollection containing the values in the IDictionary .

    Return type:

    List[Delisting]

    Delistings

    class QuantConnect.Data.Market.Delistings [source]

    Collections of Delisting keyed by Symbol

    Add( key, value )

    Adds an item to the ICollection .

    Parameters:
    Add( item )

    Adds an item to the ICollection .

    Parameters:
    • item ( KeyValuePair<Symbol, Delisting> )
    Clear()

    Removes all items from the ICollection .

    Contains( item )

    Determines whether the ICollection contains a specific value.

    Parameters:
    • item ( KeyValuePair<Symbol, Delisting> )
    Return type:

    Boolean

    ContainsKey( key )

    Determines whether the IDictionary contains an element with the specified key.

    Parameters:
    Return type:

    Boolean

    CopyTo( array, arrayIndex )

    Copies the elements of the ICollection to an Array , starting at a particular Array index.

    Parameters:
    • array ( KeyValuePair )
    • arrayIndex ( Int32 )
    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    KeyValuePair[Symbol, Delisting]

    GetValue( key )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Delisting

    Remove( item )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    • item ( KeyValuePair<Symbol, Delisting> )
    Return type:

    Boolean

    Remove( key )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    Return type:

    Boolean

    TryGetValue( key, value )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Boolean

    clear()

    Removes all keys and values from the IExtendedDictionary .

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    Delisting

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    Return type:

    Delisting

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    Return type:

    Delisting

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property Count

    Gets the number of elements contained in the ICollection .

    Returns:

    Gets the number of elements contained in the ICollection .

    Return type:

    Int32

    property IsReadOnly

    Gets a value indicating whether the ICollection is read-only.

    Returns:

    Gets a value indicating whether the ICollection is read-only.

    Return type:

    bool

    property Keys

    Gets an ICollection containing the keys of the IDictionary .

    Returns:

    Gets an ICollection containing the keys of the IDictionary .

    Return type:

    ICollection<Symbol>

    property Time

    Gets or sets the time associated with this collection of data

    Returns:

    Gets or sets the time associated with this collection of data

    Return type:

    DateTime

    property Values

    Gets an ICollection containing the values in the IDictionary .

    Returns:

    Gets an ICollection containing the values in the IDictionary .

    Return type:

    ICollection<Delisting>

    property [QuantConnect.Symbol]

    Gets or sets the Delisting with the specified Symbol.

    Returns:

    Gets or sets the Delisting with the specified Symbol.

    Return type:

    Delisting

    property [System.String]

    Gets or sets the Delisting with the specified ticker.

    Returns:

    Gets or sets the Delisting with the specified ticker.

    Return type:

    Delisting

    DeploymentTarget

    enum QuantConnect.DeploymentTarget [source]

    Represents the types deployment targets for algorithms

    field CLOUD_PLATFORM

    Cloud Platform (0)

    Returns:

    Cloud Platform (0)

    Return type:

    DeploymentTarget

    field LOCAL_PLATFORM

    Local Platform (1)

    Returns:

    Local Platform (1)

    Return type:

    DeploymentTarget

    DeploymentTarget

    enum QuantConnect.DeploymentTarget [source]

    Represents the types deployment targets for algorithms

    field CloudPlatform

    Cloud Platform (0)

    Returns:

    Cloud Platform (0)

    Return type:

    DeploymentTarget

    field LocalPlatform

    Local Platform (1)

    Returns:

    Local Platform (1)

    Return type:

    DeploymentTarget

    DerivativeOscillator

    class QuantConnect.Indicators.DerivativeOscillator [source]

    Represents the Derivative Oscillator Indicator, utilizing a moving average convergence-divergence (MACD) histogram to a double-smoothed relative strength index (RSI).

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DerivativeOscillator

    class QuantConnect.Indicators.DerivativeOscillator [source]

    Represents the Derivative Oscillator Indicator, utilizing a moving average convergence-divergence (MACD) histogram to a double-smoothed relative strength index (RSI).

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Dividends

    class QuantConnect.Data.Market.Dividends [source]

    Collection of dividends keyed by Symbol

    add( key, value )

    Adds an item to the ICollection .

    Parameters:
    add( item )

    Adds an item to the ICollection .

    Parameters:
    • item ( Dict[Symbol, Dividend] )
    clear()

    Removes all keys and values from the IExtendedDictionary .

    contains( item )

    Determines whether the ICollection contains a specific value.

    Parameters:
    • item ( Dict[Symbol, Dividend] )
    Return type:

    bool

    contains_key( key )

    Determines whether the IDictionary contains an element with the specified key.

    Parameters:
    Return type:

    bool

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    copy_to( array, array_index )

    Copies the elements of the ICollection to an Array , starting at a particular Array index.

    Parameters:
    • array ( Dict )
    • array_index ( int )
    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    Dividend

    get_enumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    Dict[Symbol, Dividend]

    get_value( key )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Dividend

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    Return type:

    Dividend

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    remove( item )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    • item ( Dict[Symbol, Dividend] )
    Return type:

    bool

    remove( key )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    Return type:

    bool

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    Return type:

    Dividend

    try_get_value( key, value )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    bool

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property count

    Gets the number of elements contained in the ICollection .

    Returns:

    Gets the number of elements contained in the ICollection .

    Return type:

    int

    property is_read_only

    Gets a value indicating whether the ICollection is read-only.

    Returns:

    Gets a value indicating whether the ICollection is read-only.

    Return type:

    bool

    property item

    Gets or sets the Dividend with the specified ticker.

    Returns:

    Gets or sets the Dividend with the specified ticker.

    Return type:

    Dividend

    property keys

    Gets an ICollection containing the keys of the IDictionary .

    Returns:

    Gets an ICollection containing the keys of the IDictionary .

    Return type:

    List[Symbol]

    property time

    Gets or sets the time associated with this collection of data

    Returns:

    Gets or sets the time associated with this collection of data

    Return type:

    datetime

    property values

    Gets an ICollection containing the values in the IDictionary .

    Returns:

    Gets an ICollection containing the values in the IDictionary .

    Return type:

    List[Dividend]

    Dividends

    class QuantConnect.Data.Market.Dividends [source]

    Collection of dividends keyed by Symbol

    Add( key, value )

    Adds an item to the ICollection .

    Parameters:
    Add( item )

    Adds an item to the ICollection .

    Parameters:
    • item ( KeyValuePair<Symbol, Dividend> )
    Clear()

    Removes all items from the ICollection .

    Contains( item )

    Determines whether the ICollection contains a specific value.

    Parameters:
    • item ( KeyValuePair<Symbol, Dividend> )
    Return type:

    Boolean

    ContainsKey( key )

    Determines whether the IDictionary contains an element with the specified key.

    Parameters:
    Return type:

    Boolean

    CopyTo( array, arrayIndex )

    Copies the elements of the ICollection to an Array , starting at a particular Array index.

    Parameters:
    • array ( KeyValuePair )
    • arrayIndex ( Int32 )
    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    KeyValuePair[Symbol, Dividend]

    GetValue( key )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Dividend

    Remove( item )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    • item ( KeyValuePair<Symbol, Dividend> )
    Return type:

    Boolean

    Remove( key )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    Return type:

    Boolean

    TryGetValue( key, value )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Boolean

    clear()

    Removes all keys and values from the IExtendedDictionary .

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    Dividend

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    Return type:

    Dividend

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    Return type:

    Dividend

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property Count

    Gets the number of elements contained in the ICollection .

    Returns:

    Gets the number of elements contained in the ICollection .

    Return type:

    Int32

    property IsReadOnly

    Gets a value indicating whether the ICollection is read-only.

    Returns:

    Gets a value indicating whether the ICollection is read-only.

    Return type:

    bool

    property Keys

    Gets an ICollection containing the keys of the IDictionary .

    Returns:

    Gets an ICollection containing the keys of the IDictionary .

    Return type:

    ICollection<Symbol>

    property Time

    Gets or sets the time associated with this collection of data

    Returns:

    Gets or sets the time associated with this collection of data

    Return type:

    DateTime

    property Values

    Gets an ICollection containing the values in the IDictionary .

    Returns:

    Gets an ICollection containing the values in the IDictionary .

    Return type:

    ICollection<Dividend>

    property [QuantConnect.Symbol]

    Gets or sets the Dividend with the specified Symbol.

    Returns:

    Gets or sets the Dividend with the specified Symbol.

    Return type:

    Dividend

    property [System.String]

    Gets or sets the Dividend with the specified ticker.

    Returns:

    Gets or sets the Dividend with the specified ticker.

    Return type:

    Dividend

    Doji

    class QuantConnect.Indicators.CandlestickPatterns.Doji [source]

    Doji candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Doji

    class QuantConnect.Indicators.CandlestickPatterns.Doji [source]

    Doji candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    DojiStar

    class QuantConnect.Indicators.CandlestickPatterns.DojiStar [source]

    Doji Star candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DojiStar

    class QuantConnect.Indicators.CandlestickPatterns.DojiStar [source]

    Doji Star candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    DragonflyDoji

    class QuantConnect.Indicators.CandlestickPatterns.DragonflyDoji [source]

    Dragonfly Doji candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DragonflyDoji

    class QuantConnect.Indicators.CandlestickPatterns.DragonflyDoji [source]

    Dragonfly Doji candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Engulfing

    class QuantConnect.Indicators.CandlestickPatterns.Engulfing [source]

    Engulfing candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Engulfing

    class QuantConnect.Indicators.CandlestickPatterns.Engulfing [source]

    Engulfing candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Equity

    class QuantConnect.Securities.Equity.Equity [source]

    Equity Security Type : Extension of the underlying Security class for equity specific behaviours.

    clear()

    Removes every custom property that had been set.

    get_last_data()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    refresh_data_normalization_mode_property()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    set_buying_power_model( buying_power_model )

    Sets the buying power model

    Parameters:
    • buying_power_model ( IBuyingPowerModel )
    set_buying_power_model( py_object )

    Sets the buying power model

    Parameters:
    • py_object ( PyObject )
    set_data_filter( py_object )

    Set Security Data Filter

    Parameters:
    • py_object ( PyObject )
    set_data_filter( data_filter )

    Set Security Data Filter

    Parameters:
    • data_filter ( ISecurityDataFilter )
    set_data_normalization_mode( mode )

    Sets the data normalization mode to be used by this security

    Parameters:
    set_fee_model( feel_model )

    Sets the fee model

    Parameters:
    • feel_model ( PyObject | IFeeModel )
    set_fill_model( fill_model )

    Sets the fill model

    Parameters:
    • fill_model ( PyObject | IFillModel )
    set_leverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( float )
    set_local_time_keeper( local_time_keeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    set_margin_interest_rate_model( margin_interest_rate_model )

    Sets the margin interests rate model

    Parameters:
    • margin_interest_rate_model ( IMarginInterestRateModel )
    set_margin_interest_rate_model( py_object )

    Sets the margin interests rate model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( py_object )

    Sets the margin model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( margin_model )

    Sets the margin model

    Parameters:
    • margin_model ( IBuyingPowerModel )
    set_market_price( data )

    Update any security properties based on the latest market data and time

    Parameters:
    set_settlement_model( settlement_model )

    Sets the settlement model

    Parameters:
    • settlement_model ( PyObject | ISettlementModel )
    set_shortable_provider( py_object )

    Set Python Shortable Provider for this Security

    Parameters:
    • py_object ( PyObject )
    set_shortable_provider( shortable_provider )

    Set Python Shortable Provider for this Security

    Parameters:
    set_slippage_model( slippage_model )

    Sets the slippage model

    Parameters:
    • slippage_model ( ISlippageModel | PyObject )
    set_volatility_model( volatility_model )

    Sets the volatility model

    Parameters:
    • volatility_model ( PyObject | IVolatilityModel )
    update( data, data_type, contains_fill_forward_data=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( List[BaseData] )
    • data_type ( Type )
    • contains_fill_forward_data ( bool, optional )
    property ask_price

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    float

    property ask_size

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    float

    property bid_price

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    float

    property bid_size

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    float

    property buying_power_model

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    float

    property data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property data_filter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property fee_model

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property fill_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property has_data

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property high

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    float

    property hold_stock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property is_delisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property is_tradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property item

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    property leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    float

    property local_time

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    datetime

    property low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    float

    property margin_interest_rate_model

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property margin_model

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    float

    property open_interest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property portfolio_model

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    float

    property price_variation_model

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property primary_exchange

    Equity primary exchange.

    Returns:

    Equity primary exchange.

    Return type:

    Exchange

    property quote_currency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property settlement_model

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property shortable

    Checks if the equity is a shortable asset. Note that this does not take into account any open orders or existing holdings. To check if the asset is currently shortable, use QCAlgorithm's ShortableQuantity property instead.

    Returns:

    Checks if the equity is a shortable asset. Note that this does not take into account any open orders or existing holdings. To check if the asset is currently shortable, use QCAlgorithm's ShortableQuantity property instead.

    Return type:

    bool

    property shortable_provider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IintableProvider

    property slippage_model

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List[SubscriptionDataConfig]

    property symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property symbol_properties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property total_shortable_quantity

    Gets the total quantity shortable for this security. This does not take into account any open orders or existing holdings. To check the asset's currently shortable quantity, use QCAlgorithm's ShortableQuantity property instead.

    Returns:

    Gets the total quantity shortable for this security. This does not take into account any open orders or existing holdings. To check the asset's currently shortable quantity, use QCAlgorithm's ShortableQuantity property instead.

    Return type:

    int

    property type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property volatility_model

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    float

    field DEFAULT_SETTLEMENT_DAYS

    The default number of days required to settle an equity sale

    Returns:

    The default number of days required to settle an equity sale

    Return type:

    int

    field DEFAULT_SETTLEMENT_TIME

    The default time of day for settlement

    Returns:

    The default time of day for settlement

    Return type:

    timedelta

    Equity

    class QuantConnect.Securities.Equity.Equity [source]

    Equity Security Type : Extension of the underlying Security class for equity specific behaviours.

    Clear()

    Removes every custom property that had been set.

    GetLastData()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    RefreshDataNormalizationModeProperty()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    SetBuyingPowerModel( buyingPowerModel )

    Sets the buying power model

    Parameters:
    • buyingPowerModel ( IBuyingPowerModel )
    SetBuyingPowerModel( pyObject )

    Sets the buying power model

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( pyObject )

    Set Security Data Filter

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( dataFilter )

    Set Security Data Filter

    Parameters:
    • dataFilter ( ISecurityDataFilter )
    SetDataNormalizationMode( mode )

    Sets the data normalization mode to be used by this security

    Parameters:
    SetFeeModel( feelModel )

    Sets the fee model

    Parameters:
    • feelModel ( PyObject | IFeeModel )
    SetFillModel( fillModel )

    Sets the fill model

    Parameters:
    • fillModel ( PyObject | IFillModel )
    SetLeverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( decimal )
    SetLocalTimeKeeper( localTimeKeeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    SetMarginInterestRateModel( marginInterestRateModel )

    Sets the margin interests rate model

    Parameters:
    • marginInterestRateModel ( IMarginInterestRateModel )
    SetMarginInterestRateModel( pyObject )

    Sets the margin interests rate model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( pyObject )

    Sets the margin model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( marginModel )

    Sets the margin model

    Parameters:
    • marginModel ( IBuyingPowerModel )
    SetMarketPrice( data )

    Update any security properties based on the latest market data and time

    Parameters:
    SetSettlementModel( settlementModel )

    Sets the settlement model

    Parameters:
    • settlementModel ( PyObject | ISettlementModel )
    SetShortableProvider( pyObject )

    Set Python Shortable Provider for this Security

    Parameters:
    • pyObject ( PyObject )
    SetShortableProvider( shortableProvider )

    Set Python Shortable Provider for this Security

    Parameters:
    • shortableProvider ( IShortableProvider )
    SetSlippageModel( slippageModel )

    Sets the slippage model

    Parameters:
    • slippageModel ( ISlippageModel | PyObject )
    SetVolatilityModel( volatilityModel )

    Sets the volatility model

    Parameters:
    • volatilityModel ( PyObject | IVolatilityModel )
    Update( data, dataType, containsFillForwardData=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( IReadOnlyList<BaseData> )
    • dataType ( Type )
    • containsFillForwardData ( Boolean, optional )
    property AskPrice

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    decimal

    property AskSize

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    decimal

    property BidPrice

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    decimal

    property BidSize

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    decimal

    property BuyingPowerModel

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property Cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property Close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    decimal

    property Data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property DataFilter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property Exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property FeeModel

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property FillModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property Fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property HasData

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property High

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    decimal

    property HoldStock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property Holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property Invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property IsDelisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property IsTradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property Leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    decimal

    property LocalTime

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    DateTime

    property Low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    decimal

    property MarginInterestRateModel

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property MarginModel

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property Open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    decimal

    property OpenInterest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property PortfolioModel

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property Price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    decimal

    property PriceVariationModel

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property PrimaryExchange

    Equity primary exchange.

    Returns:

    Equity primary exchange.

    Return type:

    Exchange

    property QuoteCurrency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property SettlementModel

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property Shortable

    Checks if the equity is a shortable asset. Note that this does not take into account any open orders or existing holdings. To check if the asset is currently shortable, use QCAlgorithm's ShortableQuantity property instead.

    Returns:

    Checks if the equity is a shortable asset. Note that this does not take into account any open orders or existing holdings. To check if the asset is currently shortable, use QCAlgorithm's ShortableQuantity property instead.

    Return type:

    bool

    property ShortableProvider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IShortableProvider

    property SlippageModel

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property Subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List<SubscriptionDataConfig>

    property Symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property SymbolProperties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property TotalShortableQuantity

    Gets the total quantity shortable for this security. This does not take into account any open orders or existing holdings. To check the asset's currently shortable quantity, use QCAlgorithm's ShortableQuantity property instead.

    Returns:

    Gets the total quantity shortable for this security. This does not take into account any open orders or existing holdings. To check the asset's currently shortable quantity, use QCAlgorithm's ShortableQuantity property instead.

    Return type:

    Int64

    property Type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property VolatilityModel

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property Volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    decimal

    property [System.String]

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    field DefaultSettlementDays

    The default number of days required to settle an equity sale

    Returns:

    The default number of days required to settle an equity sale

    Return type:

    Int32

    field DefaultSettlementTime

    The default time of day for settlement

    Returns:

    The default time of day for settlement

    Return type:

    TimeSpan

    EveningDojiStar

    class QuantConnect.Indicators.CandlestickPatterns.EveningDojiStar [source]

    Evening Doji Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    EveningDojiStar

    class QuantConnect.Indicators.CandlestickPatterns.EveningDojiStar [source]

    Evening Doji Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    EveningStar

    class QuantConnect.Indicators.CandlestickPatterns.EveningStar [source]

    Evening Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    EveningStar

    class QuantConnect.Indicators.CandlestickPatterns.EveningStar [source]

    Evening Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Forex

    class QuantConnect.Securities.Forex.Forex [source]

    FOREX Security Object Implementation for FOREX Assets

    clear()

    Removes every custom property that had been set.

    get_last_data()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    refresh_data_normalization_mode_property()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    set_buying_power_model( buying_power_model )

    Sets the buying power model

    Parameters:
    • buying_power_model ( IBuyingPowerModel )
    set_buying_power_model( py_object )

    Sets the buying power model

    Parameters:
    • py_object ( PyObject )
    set_data_filter( py_object )

    Set Security Data Filter

    Parameters:
    • py_object ( PyObject )
    set_data_filter( data_filter )

    Set Security Data Filter

    Parameters:
    • data_filter ( ISecurityDataFilter )
    set_fee_model( feel_model )

    Sets the fee model

    Parameters:
    • feel_model ( PyObject | IFeeModel )
    set_fill_model( fill_model )

    Sets the fill model

    Parameters:
    • fill_model ( PyObject | IFillModel )
    set_leverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( float )
    set_local_time_keeper( local_time_keeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    set_margin_interest_rate_model( margin_interest_rate_model )

    Sets the margin interests rate model

    Parameters:
    • margin_interest_rate_model ( IMarginInterestRateModel )
    set_margin_interest_rate_model( py_object )

    Sets the margin interests rate model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( py_object )

    Sets the margin model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( margin_model )

    Sets the margin model

    Parameters:
    • margin_model ( IBuyingPowerModel )
    set_market_price( data )

    Update any security properties based on the latest market data and time

    Parameters:
    set_settlement_model( settlement_model )

    Sets the settlement model

    Parameters:
    • settlement_model ( PyObject | ISettlementModel )
    set_shortable_provider( py_object )

    Set Python Shortable Provider for this Security

    Parameters:
    • py_object ( PyObject )
    set_shortable_provider( shortable_provider )

    Set Python Shortable Provider for this Security

    Parameters:
    set_slippage_model( slippage_model )

    Sets the slippage model

    Parameters:
    • slippage_model ( ISlippageModel | PyObject )
    set_volatility_model( volatility_model )

    Sets the volatility model

    Parameters:
    • volatility_model ( PyObject | IVolatilityModel )
    update( data, data_type, contains_fill_forward_data=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( List[BaseData] )
    • data_type ( Type )
    • contains_fill_forward_data ( bool, optional )
    property ask_price

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    float

    property ask_size

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    float

    property base_currency

    Gets the currency acquired by going long this currency pair

    Returns:

    Gets the currency acquired by going long this currency pair

    Return type:

    Cash

    property bid_price

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    float

    property bid_size

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    float

    property buying_power_model

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    float

    property data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property data_filter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property fee_model

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property fill_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property has_data

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property high

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    float

    property hold_stock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property is_delisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property is_tradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property item

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    property leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    float

    property local_time

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    datetime

    property low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    float

    property margin_interest_rate_model

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property margin_model

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    float

    property open_interest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property portfolio_model

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    float

    property price_variation_model

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property quote_currency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property settlement_model

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property shortable_provider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IintableProvider

    property slippage_model

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List[SubscriptionDataConfig]

    property symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property symbol_properties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property volatility_model

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    float

    Forex

    class QuantConnect.Securities.Forex.Forex [source]

    FOREX Security Object Implementation for FOREX Assets

    Clear()

    Removes every custom property that had been set.

    GetLastData()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    RefreshDataNormalizationModeProperty()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    SetBuyingPowerModel( buyingPowerModel )

    Sets the buying power model

    Parameters:
    • buyingPowerModel ( IBuyingPowerModel )
    SetBuyingPowerModel( pyObject )

    Sets the buying power model

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( pyObject )

    Set Security Data Filter

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( dataFilter )

    Set Security Data Filter

    Parameters:
    • dataFilter ( ISecurityDataFilter )
    SetFeeModel( feelModel )

    Sets the fee model

    Parameters:
    • feelModel ( PyObject | IFeeModel )
    SetFillModel( fillModel )

    Sets the fill model

    Parameters:
    • fillModel ( PyObject | IFillModel )
    SetLeverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( decimal )
    SetLocalTimeKeeper( localTimeKeeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    SetMarginInterestRateModel( marginInterestRateModel )

    Sets the margin interests rate model

    Parameters:
    • marginInterestRateModel ( IMarginInterestRateModel )
    SetMarginInterestRateModel( pyObject )

    Sets the margin interests rate model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( pyObject )

    Sets the margin model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( marginModel )

    Sets the margin model

    Parameters:
    • marginModel ( IBuyingPowerModel )
    SetMarketPrice( data )

    Update any security properties based on the latest market data and time

    Parameters:
    SetSettlementModel( settlementModel )

    Sets the settlement model

    Parameters:
    • settlementModel ( PyObject | ISettlementModel )
    SetShortableProvider( pyObject )

    Set Python Shortable Provider for this Security

    Parameters:
    • pyObject ( PyObject )
    SetShortableProvider( shortableProvider )

    Set Python Shortable Provider for this Security

    Parameters:
    • shortableProvider ( IShortableProvider )
    SetSlippageModel( slippageModel )

    Sets the slippage model

    Parameters:
    • slippageModel ( ISlippageModel | PyObject )
    SetVolatilityModel( volatilityModel )

    Sets the volatility model

    Parameters:
    • volatilityModel ( PyObject | IVolatilityModel )
    Update( data, dataType, containsFillForwardData=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( IReadOnlyList<BaseData> )
    • dataType ( Type )
    • containsFillForwardData ( Boolean, optional )
    property AskPrice

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    decimal

    property AskSize

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    decimal

    property BaseCurrency

    Gets the currency acquired by going long this currency pair

    Returns:

    Gets the currency acquired by going long this currency pair

    Return type:

    Cash

    property BidPrice

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    decimal

    property BidSize

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    decimal

    property BuyingPowerModel

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property Cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property Close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    decimal

    property Data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property DataFilter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property Exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property FeeModel

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property FillModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property Fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property HasData

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property High

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    decimal

    property HoldStock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property Holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property Invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property IsDelisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property IsTradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property Leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    decimal

    property LocalTime

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    DateTime

    property Low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    decimal

    property MarginInterestRateModel

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property MarginModel

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property Open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    decimal

    property OpenInterest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property PortfolioModel

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property Price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    decimal

    property PriceVariationModel

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property QuoteCurrency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property SettlementModel

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property ShortableProvider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IShortableProvider

    property SlippageModel

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property Subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List<SubscriptionDataConfig>

    property Symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property SymbolProperties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property Type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property VolatilityModel

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property Volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    decimal

    property [System.String]

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    Fundamental

    class QuantConnect.Data.Fundamental.Fundamental [source]

    Lean fundamental data class

    clone( fill_forward )

    Return a new instance clone of this object, used in fill forward

    Parameters:
    • fill_forward ( bool )
    Return type:

    BaseData

    data_time_zone()

    Specifies the data time zone for this data type. This is useful for custom data types

    Return type:

    datetimeZone

    default_resolution()

    Gets the default resolution for this data and security type

    Return type:

    Resolution

    get_source( config, date, is_live_mode )

    Return the URL string source of the file. This will be converted to a stream

    Parameters:
    Return type:

    SubscriptionDataSource

    is_sparse_data()

    Indicates that the data set is expected to be sparse

    Return type:

    bool

    reader( config, line, date, is_live_mode )

    Will read a new instance from the given line

    Parameters:
    Return type:

    BaseData

    reader( config, stream, date, is_live_mode )

    Reader converts each line of the data source into BaseData objects. Each data type creates its own factory method, and returns a new instance of the object each time it is called. The returned object is assumed to be time stamped in the config.ExchangeTimeZone.

    Parameters:
    Return type:

    BaseData

    requires_mapping()

    Indicates if there is support for mapping

    Return type:

    bool

    should_cache_to_security()

    Indicates whether this contains data that should be stored in the security cache

    Return type:

    bool

    supported_resolutions()

    This is a daily data set

    Return type:

    List[Resolution]

    update( last_trade, bid_price, ask_price, volume, bid_size, ask_size )

    Updates this base data with a new trade

    Parameters:
    • last_trade ( float )
    • bid_price ( float )
    • ask_price ( float )
    • volume ( float )
    • bid_size ( float )
    • ask_size ( float )
    update_ask( ask_price, ask_size )

    Updates this base data with the new quote ask information

    Parameters:
    • ask_price ( float )
    • ask_size ( float )
    update_bid( bid_price, bid_size )

    Updates this base data with the new quote bid information

    Parameters:
    • bid_price ( float )
    • bid_size ( float )
    update_quote( bid_price, bid_size, ask_price, ask_size )

    Updates this base data with new quote information

    Parameters:
    • bid_price ( float )
    • bid_size ( float )
    • ask_price ( float )
    • ask_size ( float )
    update_trade( last_trade, trade_size )

    Updates this base data with a new trade

    Parameters:
    • last_trade ( float )
    • trade_size ( float )
    property adjusted_price

    Gets the split and dividend adjusted price

    Returns:

    Gets the split and dividend adjusted price

    Return type:

    float

    property asset_classification

    The instance of the AssetClassification class

    Returns:

    The instance of the AssetClassification class

    Return type:

    AssetClassification

    property company_profile

    The instance of the CompanyProfile class

    Returns:

    The instance of the CompanyProfile class

    Return type:

    CompanyProfile

    property company_reference

    The instance of the CompanyReference class

    Returns:

    The instance of the CompanyReference class

    Return type:

    CompanyReference

    property data_type

    Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

    Returns:

    Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

    Return type:

    MarketDataType

    property dollar_volume

    Gets the day's dollar volume for this symbol

    Returns:

    Gets the day's dollar volume for this symbol

    Return type:

    float

    property earning_ratios

    The instance of the EarningRatios class

    Returns:

    The instance of the EarningRatios class

    Return type:

    EarningRatios

    property earning_reports

    The instance of the EarningReports class

    Returns:

    The instance of the EarningReports class

    Return type:

    EarningReports

    property end_time

    The end time of this data.

    Returns:

    The end time of this data.

    Return type:

    datetime

    property financial_statements

    The instance of the FinancialStatements class

    Returns:

    The instance of the FinancialStatements class

    Return type:

    FinancialStatements

    property has_fundamental_data

    Returns whether the symbol has fundamental data for the given date

    Returns:

    Returns whether the symbol has fundamental data for the given date

    Return type:

    bool

    property is_fill_forward

    True if this is a fill forward piece of data

    Returns:

    True if this is a fill forward piece of data

    Return type:

    bool

    property market

    Gets the market for this symbol

    Returns:

    Gets the market for this symbol

    Return type:

    str

    property market_cap

    Price * Total SharesOutstanding. The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding. For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).

    Returns:

    Price * Total SharesOutstanding. The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding. For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).

    Return type:

    int

    property operation_ratios

    The instance of the OperationRatios class

    Returns:

    The instance of the OperationRatios class

    Return type:

    OperationRatios

    property price

    Gets the raw price

    Returns:

    Gets the raw price

    Return type:

    float

    property price_factor

    Gets the price factor for the given date

    Returns:

    Gets the price factor for the given date

    Return type:

    float

    property price_scale_factor

    Gets the combined factor used to create adjusted prices from raw prices

    Returns:

    Gets the combined factor used to create adjusted prices from raw prices

    Return type:

    float

    property security_reference

    The instance of the SecurityReference class

    Returns:

    The instance of the SecurityReference class

    Return type:

    SecurityReference

    property split_factor

    Gets the split factor for the given date

    Returns:

    Gets the split factor for the given date

    Return type:

    float

    property symbol

    Symbol representation for underlying Security

    Returns:

    Symbol representation for underlying Security

    Return type:

    Symbol

    property time

    Current time marker of this data packet.

    Returns:

    Current time marker of this data packet.

    Return type:

    datetime

    property valuation_ratios

    The instance of the ValuationRatios class

    Returns:

    The instance of the ValuationRatios class

    Return type:

    ValuationRatios

    property value

    Gets the raw price

    Returns:

    Gets the raw price

    Return type:

    float

    property volume

    Gets the day's total volume

    Returns:

    Gets the day's total volume

    Return type:

    int

    Fundamental

    class QuantConnect.Data.Fundamental.Fundamental [source]

    Lean fundamental data class

    Clone( fillForward )

    Return a new instance clone of this object, used in fill forward

    Parameters:
    • fillForward ( bool )
    Return type:

    BaseData

    DataTimeZone()

    Specifies the data time zone for this data type. This is useful for custom data types

    Return type:

    DateTimeZone

    DefaultResolution()

    Gets the default resolution for this data and security type

    Return type:

    Resolution

    GetSource( config, date, isLiveMode )

    Return the URL string source of the file. This will be converted to a stream

    Parameters:
    Return type:

    SubscriptionDataSource

    IsSparseData()

    Indicates that the data set is expected to be sparse

    Return type:

    Boolean

    Reader( config, line, date, isLiveMode )

    Will read a new instance from the given line

    Parameters:
    Return type:

    BaseData

    Reader( config, stream, date, isLiveMode )

    Reader converts each line of the data source into BaseData objects. Each data type creates its own factory method, and returns a new instance of the object each time it is called. The returned object is assumed to be time stamped in the config.ExchangeTimeZone.

    Parameters:
    Return type:

    BaseData

    RequiresMapping()

    Indicates if there is support for mapping

    Return type:

    Boolean

    ShouldCacheToSecurity()

    Indicates whether this contains data that should be stored in the security cache

    Return type:

    Boolean

    SupportedResolutions()

    This is a daily data set

    Return type:

    List[Resolution]

    Update( lastTrade, bidPrice, askPrice, volume, bidSize, askSize )

    Updates this base data with a new trade

    Parameters:
    • lastTrade ( decimal )
    • bidPrice ( decimal )
    • askPrice ( decimal )
    • volume ( decimal )
    • bidSize ( decimal )
    • askSize ( decimal )
    UpdateAsk( askPrice, askSize )

    Updates this base data with the new quote ask information

    Parameters:
    • askPrice ( decimal )
    • askSize ( decimal )
    UpdateBid( bidPrice, bidSize )

    Updates this base data with the new quote bid information

    Parameters:
    • bidPrice ( decimal )
    • bidSize ( decimal )
    UpdateQuote( bidPrice, bidSize, askPrice, askSize )

    Updates this base data with new quote information

    Parameters:
    • bidPrice ( decimal )
    • bidSize ( decimal )
    • askPrice ( decimal )
    • askSize ( decimal )
    UpdateTrade( lastTrade, tradeSize )

    Updates this base data with a new trade

    Parameters:
    • lastTrade ( decimal )
    • tradeSize ( decimal )
    property AdjustedPrice

    Gets the split and dividend adjusted price

    Returns:

    Gets the split and dividend adjusted price

    Return type:

    decimal

    property AssetClassification

    The instance of the AssetClassification class

    Returns:

    The instance of the AssetClassification class

    Return type:

    AssetClassification

    property CompanyProfile

    The instance of the CompanyProfile class

    Returns:

    The instance of the CompanyProfile class

    Return type:

    CompanyProfile

    property CompanyReference

    The instance of the CompanyReference class

    Returns:

    The instance of the CompanyReference class

    Return type:

    CompanyReference

    property DataType

    Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

    Returns:

    Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

    Return type:

    MarketDataType

    property DollarVolume

    Gets the day's dollar volume for this symbol

    Returns:

    Gets the day's dollar volume for this symbol

    Return type:

    Double

    property EarningRatios

    The instance of the EarningRatios class

    Returns:

    The instance of the EarningRatios class

    Return type:

    EarningRatios

    property EarningReports

    The instance of the EarningReports class

    Returns:

    The instance of the EarningReports class

    Return type:

    EarningReports

    property EndTime

    The end time of this data.

    Returns:

    The end time of this data.

    Return type:

    DateTime

    property FinancialStatements

    The instance of the FinancialStatements class

    Returns:

    The instance of the FinancialStatements class

    Return type:

    FinancialStatements

    property HasFundamentalData

    Returns whether the symbol has fundamental data for the given date

    Returns:

    Returns whether the symbol has fundamental data for the given date

    Return type:

    bool

    property IsFillForward

    True if this is a fill forward piece of data

    Returns:

    True if this is a fill forward piece of data

    Return type:

    bool

    property Market

    Gets the market for this symbol

    Returns:

    Gets the market for this symbol

    Return type:

    string

    property MarketCap

    Price * Total SharesOutstanding. The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding. For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).

    Returns:

    Price * Total SharesOutstanding. The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding. For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).

    Return type:

    int

    property OperationRatios

    The instance of the OperationRatios class

    Returns:

    The instance of the OperationRatios class

    Return type:

    OperationRatios

    property Price

    Gets the raw price

    Returns:

    Gets the raw price

    Return type:

    decimal

    property PriceFactor

    Gets the price factor for the given date

    Returns:

    Gets the price factor for the given date

    Return type:

    decimal

    property PriceScaleFactor

    Gets the combined factor used to create adjusted prices from raw prices

    Returns:

    Gets the combined factor used to create adjusted prices from raw prices

    Return type:

    decimal

    property SecurityReference

    The instance of the SecurityReference class

    Returns:

    The instance of the SecurityReference class

    Return type:

    SecurityReference

    property SplitFactor

    Gets the split factor for the given date

    Returns:

    Gets the split factor for the given date

    Return type:

    decimal

    property Symbol

    Symbol representation for underlying Security

    Returns:

    Symbol representation for underlying Security

    Return type:

    Symbol

    property Time

    Current time marker of this data packet.

    Returns:

    Current time marker of this data packet.

    Return type:

    DateTime

    property ValuationRatios

    The instance of the ValuationRatios class

    Returns:

    The instance of the ValuationRatios class

    Return type:

    ValuationRatios

    property Value

    Gets the raw price

    Returns:

    Gets the raw price

    Return type:

    decimal

    property Volume

    Gets the day's total volume

    Returns:

    Gets the day's total volume

    Return type:

    int

    Future

    class QuantConnect.Securities.Future.Future [source]

    Futures Security Object Implementation for Futures Assets

    clear()

    Removes every custom property that had been set.

    get_last_data()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    refresh_data_normalization_mode_property()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    set_buying_power_model( buying_power_model )

    Sets the buying power model

    Parameters:
    • buying_power_model ( IBuyingPowerModel )
    set_buying_power_model( py_object )

    Sets the buying power model

    Parameters:
    • py_object ( PyObject )
    set_data_filter( py_object )

    Set Security Data Filter

    Parameters:
    • py_object ( PyObject )
    set_data_filter( data_filter )

    Set Security Data Filter

    Parameters:
    • data_filter ( ISecurityDataFilter )
    set_fee_model( feel_model )

    Sets the fee model

    Parameters:
    • feel_model ( PyObject | IFeeModel )
    set_fill_model( fill_model )

    Sets the fill model

    Parameters:
    • fill_model ( PyObject | IFillModel )
    set_filter( min_expiry, max_expiry )

    Sets the ContractFilter to a new instance of the filter using the specified expiration range values

    Parameters:
    • min_expiry ( timedelta )
    • max_expiry ( timedelta )
    set_filter( min_expiry_days, max_expiry_days )

    Sets the ContractFilter to a new instance of the filter using the specified expiration range values

    Parameters:
    • min_expiry_days ( int )
    • max_expiry_days ( int )
    set_filter( universe_func )

    Sets the ContractFilter to a new instance of the filter using the specified expiration range values

    Parameters:
    • universe_func ( PyObject | Callable[FutureFilterUniverse, FutureFilterUniverse] )
    set_leverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( float )
    set_local_time_keeper( local_time_keeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    set_margin_interest_rate_model( margin_interest_rate_model )

    Sets the margin interests rate model

    Parameters:
    • margin_interest_rate_model ( IMarginInterestRateModel )
    set_margin_interest_rate_model( py_object )

    Sets the margin interests rate model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( py_object )

    Sets the margin model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( margin_model )

    Sets the margin model

    Parameters:
    • margin_model ( IBuyingPowerModel )
    set_market_price( data )

    Update any security properties based on the latest market data and time

    Parameters:
    set_settlement_model( settlement_model )

    Sets the settlement model

    Parameters:
    • settlement_model ( PyObject | ISettlementModel )
    set_shortable_provider( py_object )

    Set Python Shortable Provider for this Security

    Parameters:
    • py_object ( PyObject )
    set_shortable_provider( shortable_provider )

    Set Python Shortable Provider for this Security

    Parameters:
    set_slippage_model( slippage_model )

    Sets the slippage model

    Parameters:
    • slippage_model ( ISlippageModel | PyObject )
    set_volatility_model( volatility_model )

    Sets the volatility model

    Parameters:
    • volatility_model ( PyObject | IVolatilityModel )
    update( data, data_type, contains_fill_forward_data=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( List[BaseData] )
    • data_type ( Type )
    • contains_fill_forward_data ( bool, optional )
    property ask_price

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    float

    property ask_size

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    float

    property bid_price

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    float

    property bid_size

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    float

    property buying_power_model

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    float

    property contract_filter

    Gets or sets the contract filter

    Returns:

    Gets or sets the contract filter

    Return type:

    IDerivativeSecurityFilter

    property data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property data_filter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property expiry

    Gets the expiration date

    Returns:

    Gets the expiration date

    Return type:

    datetime

    property fee_model

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property fill_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property has_data

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property high

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    float

    property hold_stock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property is_delisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property is_future_chain

    Returns true if this is the future chain security, false if it is a specific future contract

    Returns:

    Returns true if this is the future chain security, false if it is a specific future contract

    Return type:

    bool

    property is_future_contract

    Returns true if this is a specific future contract security, false if it is the future chain security

    Returns:

    Returns true if this is a specific future contract security, false if it is the future chain security

    Return type:

    bool

    property is_tradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property item

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    property leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    float

    property local_time

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    datetime

    property low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    float

    property mapped

    Gets or sets the currently mapped symbol for the security

    Returns:

    Gets or sets the currently mapped symbol for the security

    Return type:

    Symbol

    property margin_interest_rate_model

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property margin_model

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    float

    property open_interest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property portfolio_model

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    float

    property price_variation_model

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property quote_currency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property settlement_model

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property settlement_type

    Specifies if futures contract has physical or cash settlement on settlement

    Returns:

    Specifies if futures contract has physical or cash settlement on settlement

    Return type:

    SettlementType

    property shortable_provider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IintableProvider

    property slippage_model

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List[SubscriptionDataConfig]

    property symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property symbol_properties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property underlying

    Gets or sets the underlying security object.

    Returns:

    Gets or sets the underlying security object.

    Return type:

    Security

    property volatility_model

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    float

    field DEFAULT_SETTLEMENT_DAYS

    The default number of days required to settle a futures sale

    Returns:

    The default number of days required to settle a futures sale

    Return type:

    int

    field DEFAULT_SETTLEMENT_TIME

    The default time of day for settlement

    Returns:

    The default time of day for settlement

    Return type:

    timedelta

    Future

    class QuantConnect.Securities.Future.Future [source]

    Futures Security Object Implementation for Futures Assets

    Clear()

    Removes every custom property that had been set.

    GetLastData()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    RefreshDataNormalizationModeProperty()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    SetBuyingPowerModel( buyingPowerModel )

    Sets the buying power model

    Parameters:
    • buyingPowerModel ( IBuyingPowerModel )
    SetBuyingPowerModel( pyObject )

    Sets the buying power model

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( pyObject )

    Set Security Data Filter

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( dataFilter )

    Set Security Data Filter

    Parameters:
    • dataFilter ( ISecurityDataFilter )
    SetFeeModel( feelModel )

    Sets the fee model

    Parameters:
    • feelModel ( PyObject | IFeeModel )
    SetFillModel( fillModel )

    Sets the fill model

    Parameters:
    • fillModel ( PyObject | IFillModel )
    SetFilter( minExpiry, maxExpiry )

    Sets the ContractFilter to a new instance of the filter using the specified expiration range values

    Parameters:
    • minExpiry ( TimeSpan )
    • maxExpiry ( TimeSpan )
    SetFilter( minExpiryDays, maxExpiryDays )

    Sets the ContractFilter to a new instance of the filter using the specified expiration range values

    Parameters:
    • minExpiryDays ( Int32 )
    • maxExpiryDays ( Int32 )
    SetFilter( universeFunc )

    Sets the ContractFilter to a new instance of the filter using the specified expiration range values

    Parameters:
    • universeFunc ( Func[FutureFilterUniverse, FutureFilterUniverse] | PyObject )
    SetLeverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( decimal )
    SetLocalTimeKeeper( localTimeKeeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    SetMarginInterestRateModel( marginInterestRateModel )

    Sets the margin interests rate model

    Parameters:
    • marginInterestRateModel ( IMarginInterestRateModel )
    SetMarginInterestRateModel( pyObject )

    Sets the margin interests rate model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( pyObject )

    Sets the margin model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( marginModel )

    Sets the margin model

    Parameters:
    • marginModel ( IBuyingPowerModel )
    SetMarketPrice( data )

    Update any security properties based on the latest market data and time

    Parameters:
    SetSettlementModel( settlementModel )

    Sets the settlement model

    Parameters:
    • settlementModel ( PyObject | ISettlementModel )
    SetShortableProvider( pyObject )

    Set Python Shortable Provider for this Security

    Parameters:
    • pyObject ( PyObject )
    SetShortableProvider( shortableProvider )

    Set Python Shortable Provider for this Security

    Parameters:
    • shortableProvider ( IShortableProvider )
    SetSlippageModel( slippageModel )

    Sets the slippage model

    Parameters:
    • slippageModel ( ISlippageModel | PyObject )
    SetVolatilityModel( volatilityModel )

    Sets the volatility model

    Parameters:
    • volatilityModel ( PyObject | IVolatilityModel )
    Update( data, dataType, containsFillForwardData=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( IReadOnlyList<BaseData> )
    • dataType ( Type )
    • containsFillForwardData ( Boolean, optional )
    property AskPrice

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    decimal

    property AskSize

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    decimal

    property BidPrice

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    decimal

    property BidSize

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    decimal

    property BuyingPowerModel

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property Cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property Close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    decimal

    property ContractFilter

    Gets or sets the contract filter

    Returns:

    Gets or sets the contract filter

    Return type:

    IDerivativeSecurityFilter

    property Data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property DataFilter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property Exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property Expiry

    Gets the expiration date

    Returns:

    Gets the expiration date

    Return type:

    DateTime

    property FeeModel

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property FillModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property Fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property HasData

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property High

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    decimal

    property HoldStock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property Holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property Invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property IsDelisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property IsFutureChain

    Returns true if this is the future chain security, false if it is a specific future contract

    Returns:

    Returns true if this is the future chain security, false if it is a specific future contract

    Return type:

    bool

    property IsFutureContract

    Returns true if this is a specific future contract security, false if it is the future chain security

    Returns:

    Returns true if this is a specific future contract security, false if it is the future chain security

    Return type:

    bool

    property IsTradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property Leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    decimal

    property LocalTime

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    DateTime

    property Low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    decimal

    property Mapped

    Gets or sets the currently mapped symbol for the security

    Returns:

    Gets or sets the currently mapped symbol for the security

    Return type:

    Symbol

    property MarginInterestRateModel

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property MarginModel

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property Open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    decimal

    property OpenInterest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property PortfolioModel

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property Price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    decimal

    property PriceVariationModel

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property QuoteCurrency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property SettlementModel

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property SettlementType

    Specifies if futures contract has physical or cash settlement on settlement

    Returns:

    Specifies if futures contract has physical or cash settlement on settlement

    Return type:

    SettlementType

    property ShortableProvider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IShortableProvider

    property SlippageModel

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property Subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List<SubscriptionDataConfig>

    property Symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property SymbolProperties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property Type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property Underlying

    Gets or sets the underlying security object.

    Returns:

    Gets or sets the underlying security object.

    Return type:

    Security

    property VolatilityModel

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property Volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    decimal

    property [System.String]

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    field DefaultSettlementDays

    The default number of days required to settle a futures sale

    Returns:

    The default number of days required to settle a futures sale

    Return type:

    Int32

    field DefaultSettlementTime

    The default time of day for settlement

    Returns:

    The default time of day for settlement

    Return type:

    TimeSpan

    GapSideBySideWhite

    class QuantConnect.Indicators.CandlestickPatterns.GapSideBySideWhite [source]

    Up/Down-gap side-by-side white lines candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    GapSideBySideWhite

    class QuantConnect.Indicators.CandlestickPatterns.GapSideBySideWhite [source]

    Up/Down-gap side-by-side white lines candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    GravestoneDoji

    class QuantConnect.Indicators.CandlestickPatterns.GravestoneDoji [source]

    Gravestone Doji candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    GravestoneDoji

    class QuantConnect.Indicators.CandlestickPatterns.GravestoneDoji [source]

    Gravestone Doji candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Hammer

    class QuantConnect.Indicators.CandlestickPatterns.Hammer [source]

    Hammer candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Hammer

    class QuantConnect.Indicators.CandlestickPatterns.Hammer [source]

    Hammer candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    HangingMan

    class QuantConnect.Indicators.CandlestickPatterns.HangingMan [source]

    Hanging Man candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HangingMan

    class QuantConnect.Indicators.CandlestickPatterns.HangingMan [source]

    Hanging Man candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Harami

    class QuantConnect.Indicators.CandlestickPatterns.Harami [source]

    Harami candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Harami

    class QuantConnect.Indicators.CandlestickPatterns.Harami [source]

    Harami candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    HaramiCross

    class QuantConnect.Indicators.CandlestickPatterns.HaramiCross [source]

    Harami Cross candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HaramiCross

    class QuantConnect.Indicators.CandlestickPatterns.HaramiCross [source]

    Harami Cross candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    HighWaveCandle

    class QuantConnect.Indicators.CandlestickPatterns.HighWaveCandle [source]

    High-Wave Candle candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HighWaveCandle

    class QuantConnect.Indicators.CandlestickPatterns.HighWaveCandle [source]

    High-Wave Candle candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Hikkake

    class QuantConnect.Indicators.CandlestickPatterns.Hikkake [source]

    Hikkake candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Hikkake

    class QuantConnect.Indicators.CandlestickPatterns.Hikkake [source]

    Hikkake candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    HikkakeModified

    class QuantConnect.Indicators.CandlestickPatterns.HikkakeModified [source]

    Hikkake Modified candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HikkakeModified

    class QuantConnect.Indicators.CandlestickPatterns.HikkakeModified [source]

    Hikkake Modified candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    HistoryRequest

    class QuantConnect.Data.HistoryRequest [source]

    Represents a request for historical data

    property contract_depth_offset

    The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract

    Returns:

    The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract

    Return type:

    int

    property data_mapping_mode

    Gets the data mapping mode used for this subscription

    Returns:

    Gets the data mapping mode used for this subscription

    Return type:

    DataMappingMode

    property data_normalization_mode

    Gets the normalization mode used for this subscription

    Returns:

    Gets the normalization mode used for this subscription

    Return type:

    DataNormalizationMode

    property data_time_zone

    Gets the time zone of the time stamps on the raw input data

    Returns:

    Gets the time zone of the time stamps on the raw input data

    Return type:

    datetimeZone

    property data_type

    Gets the data type used to process the subscription request, this type must derive from BaseData

    Returns:

    Gets the data type used to process the subscription request, this type must derive from BaseData

    Return type:

    Type

    property end_time_local

    Gets the EndTimeUtc in the security's exchange time zone

    Returns:

    Gets the EndTimeUtc in the security's exchange time zone

    Return type:

    datetime

    property end_time_utc

    Gets the end of the requested time interval in UTC

    Returns:

    Gets the end of the requested time interval in UTC

    Return type:

    datetime

    property exchange_hours

    Gets the exchange hours used for processing fill forward requests

    Returns:

    Gets the exchange hours used for processing fill forward requests

    Return type:

    SecurityExchangeHours

    property fill_forward_resolution

    Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.

    Returns:

    Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.

    Return type:

    Resolution

    property include_extended_market_hours

    Gets whether or not to include extended market hours data, set to false for only normal market hours

    Returns:

    Gets whether or not to include extended market hours data, set to false for only normal market hours

    Return type:

    bool

    property is_custom_data

    Gets true if this is a custom data request, false for normal QC data

    Returns:

    Gets true if this is a custom data request, false for normal QC data

    Return type:

    bool

    property resolution

    Gets the requested data resolution

    Returns:

    Gets the requested data resolution

    Return type:

    Resolution

    property start_time_local

    Gets the StartTimeUtc in the security's exchange time zone

    Returns:

    Gets the StartTimeUtc in the security's exchange time zone

    Return type:

    datetime

    property start_time_utc

    Gets the beginning of the requested time interval in UTC

    Returns:

    Gets the beginning of the requested time interval in UTC

    Return type:

    datetime

    property symbol

    Gets the symbol to request data for

    Returns:

    Gets the symbol to request data for

    Return type:

    Symbol

    property tick_type

    TickType of the history request

    Returns:

    TickType of the history request

    Return type:

    TickType

    property tradable_days_in_data_time_zone

    Gets the tradable days specified by this request, in the security's data time zone

    Returns:

    Gets the tradable days specified by this request, in the security's data time zone

    Return type:

    List[datetime]

    HistoryRequest

    class QuantConnect.Data.HistoryRequest [source]

    Represents a request for historical data

    property ContractDepthOffset

    The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract

    Returns:

    The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract

    Return type:

    UInt32

    property DataMappingMode

    Gets the data mapping mode used for this subscription

    Returns:

    Gets the data mapping mode used for this subscription

    Return type:

    DataMappingMode

    property DataNormalizationMode

    Gets the normalization mode used for this subscription

    Returns:

    Gets the normalization mode used for this subscription

    Return type:

    DataNormalizationMode

    property DataTimeZone

    Gets the time zone of the time stamps on the raw input data

    Returns:

    Gets the time zone of the time stamps on the raw input data

    Return type:

    DateTimeZone

    property DataType

    Gets the data type used to process the subscription request, this type must derive from BaseData

    Returns:

    Gets the data type used to process the subscription request, this type must derive from BaseData

    Return type:

    Type

    property EndTimeLocal

    Gets the EndTimeUtc in the security's exchange time zone

    Returns:

    Gets the EndTimeUtc in the security's exchange time zone

    Return type:

    DateTime

    property EndTimeUtc

    Gets the end of the requested time interval in UTC

    Returns:

    Gets the end of the requested time interval in UTC

    Return type:

    DateTime

    property ExchangeHours

    Gets the exchange hours used for processing fill forward requests

    Returns:

    Gets the exchange hours used for processing fill forward requests

    Return type:

    SecurityExchangeHours

    property FillForwardResolution

    Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.

    Returns:

    Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.

    Return type:

    Resolution

    property IncludeExtendedMarketHours

    Gets whether or not to include extended market hours data, set to false for only normal market hours

    Returns:

    Gets whether or not to include extended market hours data, set to false for only normal market hours

    Return type:

    bool

    property IsCustomData

    Gets true if this is a custom data request, false for normal QC data

    Returns:

    Gets true if this is a custom data request, false for normal QC data

    Return type:

    bool

    property Resolution

    Gets the requested data resolution

    Returns:

    Gets the requested data resolution

    Return type:

    Resolution

    property StartTimeLocal

    Gets the StartTimeUtc in the security's exchange time zone

    Returns:

    Gets the StartTimeUtc in the security's exchange time zone

    Return type:

    DateTime

    property StartTimeUtc

    Gets the beginning of the requested time interval in UTC

    Returns:

    Gets the beginning of the requested time interval in UTC

    Return type:

    DateTime

    property Symbol

    Gets the symbol to request data for

    Returns:

    Gets the symbol to request data for

    Return type:

    Symbol

    property TickType

    TickType of the history request

    Returns:

    TickType of the history request

    Return type:

    TickType

    property TradableDaysInDataTimeZone

    Gets the tradable days specified by this request, in the security's data time zone

    Returns:

    Gets the tradable days specified by this request, in the security's data time zone

    Return type:

    List<DateTime>

    HomingPigeon

    class QuantConnect.Indicators.CandlestickPatterns.HomingPigeon [source]

    Homing Pigeon candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    HomingPigeon

    class QuantConnect.Indicators.CandlestickPatterns.HomingPigeon [source]

    Homing Pigeon candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    IdenticalThreeCrows

    class QuantConnect.Indicators.CandlestickPatterns.IdenticalThreeCrows [source]

    Identical Three Crows candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    IdenticalThreeCrows

    class QuantConnect.Indicators.CandlestickPatterns.IdenticalThreeCrows [source]

    Identical Three Crows candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    InNeck

    class QuantConnect.Indicators.CandlestickPatterns.InNeck [source]

    In-Neck candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    InNeck

    class QuantConnect.Indicators.CandlestickPatterns.InNeck [source]

    In-Neck candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Index

    class QuantConnect.Securities.Index.Index [source]

    INDEX Security Object Implementation for INDEX Assets

    clear()

    Removes every custom property that had been set.

    get_last_data()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    refresh_data_normalization_mode_property()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    set_buying_power_model( buying_power_model )

    Sets the buying power model

    Parameters:
    • buying_power_model ( IBuyingPowerModel )
    set_buying_power_model( py_object )

    Sets the buying power model

    Parameters:
    • py_object ( PyObject )
    set_data_filter( py_object )

    Set Security Data Filter

    Parameters:
    • py_object ( PyObject )
    set_data_filter( data_filter )

    Set Security Data Filter

    Parameters:
    • data_filter ( ISecurityDataFilter )
    set_fee_model( feel_model )

    Sets the fee model

    Parameters:
    • feel_model ( PyObject | IFeeModel )
    set_fill_model( fill_model )

    Sets the fill model

    Parameters:
    • fill_model ( PyObject | IFillModel )
    set_leverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( float )
    set_local_time_keeper( local_time_keeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    set_margin_interest_rate_model( margin_interest_rate_model )

    Sets the margin interests rate model

    Parameters:
    • margin_interest_rate_model ( IMarginInterestRateModel )
    set_margin_interest_rate_model( py_object )

    Sets the margin interests rate model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( py_object )

    Sets the margin model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( margin_model )

    Sets the margin model

    Parameters:
    • margin_model ( IBuyingPowerModel )
    set_market_price( data )

    Update any security properties based on the latest market data and time

    Parameters:
    set_settlement_model( settlement_model )

    Sets the settlement model

    Parameters:
    • settlement_model ( PyObject | ISettlementModel )
    set_shortable_provider( py_object )

    Set Python Shortable Provider for this Security

    Parameters:
    • py_object ( PyObject )
    set_shortable_provider( shortable_provider )

    Set Python Shortable Provider for this Security

    Parameters:
    set_slippage_model( slippage_model )

    Sets the slippage model

    Parameters:
    • slippage_model ( ISlippageModel | PyObject )
    set_volatility_model( volatility_model )

    Sets the volatility model

    Parameters:
    • volatility_model ( PyObject | IVolatilityModel )
    update( data, data_type, contains_fill_forward_data=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( List[BaseData] )
    • data_type ( Type )
    • contains_fill_forward_data ( bool, optional )
    property ask_price

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    float

    property ask_size

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    float

    property bid_price

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    float

    property bid_size

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    float

    property buying_power_model

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    float

    property data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property data_filter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property fee_model

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property fill_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property has_data

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property high

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    float

    property hold_stock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property is_delisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property is_tradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property item

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    property leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    float

    property local_time

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    datetime

    property low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    float

    property margin_interest_rate_model

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property margin_model

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    float

    property open_interest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property portfolio_model

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    float

    property price_variation_model

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property quote_currency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property settlement_model

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property shortable_provider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IintableProvider

    property slippage_model

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List[SubscriptionDataConfig]

    property symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property symbol_properties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property volatility_model

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    float

    Index

    class QuantConnect.Securities.Index.Index [source]

    INDEX Security Object Implementation for INDEX Assets

    Clear()

    Removes every custom property that had been set.

    GetLastData()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    RefreshDataNormalizationModeProperty()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    SetBuyingPowerModel( buyingPowerModel )

    Sets the buying power model

    Parameters:
    • buyingPowerModel ( IBuyingPowerModel )
    SetBuyingPowerModel( pyObject )

    Sets the buying power model

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( pyObject )

    Set Security Data Filter

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( dataFilter )

    Set Security Data Filter

    Parameters:
    • dataFilter ( ISecurityDataFilter )
    SetFeeModel( feelModel )

    Sets the fee model

    Parameters:
    • feelModel ( PyObject | IFeeModel )
    SetFillModel( fillModel )

    Sets the fill model

    Parameters:
    • fillModel ( PyObject | IFillModel )
    SetLeverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( decimal )
    SetLocalTimeKeeper( localTimeKeeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    SetMarginInterestRateModel( marginInterestRateModel )

    Sets the margin interests rate model

    Parameters:
    • marginInterestRateModel ( IMarginInterestRateModel )
    SetMarginInterestRateModel( pyObject )

    Sets the margin interests rate model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( pyObject )

    Sets the margin model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( marginModel )

    Sets the margin model

    Parameters:
    • marginModel ( IBuyingPowerModel )
    SetMarketPrice( data )

    Update any security properties based on the latest market data and time

    Parameters:
    SetSettlementModel( settlementModel )

    Sets the settlement model

    Parameters:
    • settlementModel ( PyObject | ISettlementModel )
    SetShortableProvider( pyObject )

    Set Python Shortable Provider for this Security

    Parameters:
    • pyObject ( PyObject )
    SetShortableProvider( shortableProvider )

    Set Python Shortable Provider for this Security

    Parameters:
    • shortableProvider ( IShortableProvider )
    SetSlippageModel( slippageModel )

    Sets the slippage model

    Parameters:
    • slippageModel ( ISlippageModel | PyObject )
    SetVolatilityModel( volatilityModel )

    Sets the volatility model

    Parameters:
    • volatilityModel ( PyObject | IVolatilityModel )
    Update( data, dataType, containsFillForwardData=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( IReadOnlyList<BaseData> )
    • dataType ( Type )
    • containsFillForwardData ( Boolean, optional )
    property AskPrice

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    decimal

    property AskSize

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    decimal

    property BidPrice

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    decimal

    property BidSize

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    decimal

    property BuyingPowerModel

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property Cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property Close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    decimal

    property Data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property DataFilter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property Exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property FeeModel

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property FillModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property Fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property HasData

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property High

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    decimal

    property HoldStock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property Holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property Invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property IsDelisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property IsTradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property Leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    decimal

    property LocalTime

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    DateTime

    property Low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    decimal

    property MarginInterestRateModel

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property MarginModel

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property Open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    decimal

    property OpenInterest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property PortfolioModel

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property Price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    decimal

    property PriceVariationModel

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property QuoteCurrency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property SettlementModel

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property ShortableProvider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IShortableProvider

    property SlippageModel

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property Subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List<SubscriptionDataConfig>

    property Symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property SymbolProperties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property Type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property VolatilityModel

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property Volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    decimal

    property [System.String]

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    Insight

    class QuantConnect.Algorithm.Framework.Alphas.Insight [source]

    Defines a alpha prediction for a single symbol generated by the algorithm

    cancel( utc_time )

    Cancel this insight

    Parameters:
    • utc_time ( datetime )
    clone()

    Creates a deep clone of this insight instance

    Return type:

    Insight

    expire( utc_time )

    Expire this insight

    Parameters:
    • utc_time ( datetime )
    is_active( utc_time )

    Determines whether or not this insight is considered active at the specified utcTime

    Parameters:
    • utc_time ( datetime )
    Return type:

    bool

    is_expired( utc_time )

    Determines whether or not this insight is considered expired at the specified utcTime

    Parameters:
    • utc_time ( datetime )
    Return type:

    bool

    set_period_and_close_time( exchange_hours )

    Sets the insight period and close times if they have not already been set.

    Parameters:
    short_to_string()

    Returns a short string that represents the current object.

    Return type:

    str

    property close_time_utc

    Gets the insight's prediction end time. This is the time when this insight prediction is expected to be fulfilled. This time takes into account market hours, weekends, as well as the symbol's data resolution

    Returns:

    Gets the insight's prediction end time. This is the time when this insight prediction is expected to be fulfilled. This time takes into account market hours, weekends, as well as the symbol's data resolution

    Return type:

    datetime

    property confidence

    Gets the confidence in this insight

    Returns:

    Gets the confidence in this insight

    Return type:

    float

    property direction

    Gets the predicted direction, down, flat or up

    Returns:

    Gets the predicted direction, down, flat or up

    Return type:

    InsightDirection

    property estimated_value

    Gets the estimated value of this insight in the account currency

    Returns:

    Gets the estimated value of this insight in the account currency

    Return type:

    float

    property generated_time_utc

    Gets the utc time this insight was generated

    Returns:

    Gets the utc time this insight was generated

    Return type:

    datetime

    property group_id

    Gets the group id this insight belongs to, null if not in a group

    Returns:

    Gets the group id this insight belongs to, null if not in a group

    Return type:

    Guid

    property id

    Gets the unique identifier for this insight

    Returns:

    Gets the unique identifier for this insight

    Return type:

    Guid

    property magnitude

    Gets the predicted percent change in the insight type (price/volatility)

    Returns:

    Gets the predicted percent change in the insight type (price/volatility)

    Return type:

    float

    property period

    Gets the period over which this insight is expected to come to fruition

    Returns:

    Gets the period over which this insight is expected to come to fruition

    Return type:

    timedelta

    property reference_value

    Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType

    Returns:

    Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType

    Return type:

    float

    property reference_value_final

    Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType

    Returns:

    Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType

    Return type:

    float

    property score

    Gets the most recent scores for this insight

    Returns:

    Gets the most recent scores for this insight

    Return type:

    InsightScore

    property source_model

    Gets an identifier for the source model that generated this insight.

    Returns:

    Gets an identifier for the source model that generated this insight.

    Return type:

    str

    property symbol

    Gets the symbol this insight is for

    Returns:

    Gets the symbol this insight is for

    Return type:

    Symbol

    property tag

    The insight's tag containing additional information

    Returns:

    The insight's tag containing additional information

    Return type:

    str

    property type

    Gets the type of insight, for example, price insight or volatility insight

    Returns:

    Gets the type of insight, for example, price insight or volatility insight

    Return type:

    InsightType

    property weight

    Gets the portfolio weight of this insight

    Returns:

    Gets the portfolio weight of this insight

    Return type:

    float

    Insight

    class QuantConnect.Algorithm.Framework.Alphas.Insight [source]

    Defines a alpha prediction for a single symbol generated by the algorithm

    Cancel( utcTime )

    Cancel this insight

    Parameters:
    • utcTime ( DateTime )
    Clone()

    Creates a deep clone of this insight instance

    Return type:

    Insight

    Expire( utcTime )

    Expire this insight

    Parameters:
    • utcTime ( DateTime )
    IsActive( utcTime )

    Determines whether or not this insight is considered active at the specified utcTime

    Parameters:
    • utcTime ( DateTime )
    Return type:

    Boolean

    IsExpired( utcTime )

    Determines whether or not this insight is considered expired at the specified utcTime

    Parameters:
    • utcTime ( DateTime )
    Return type:

    Boolean

    SetPeriodAndCloseTime( exchangeHours )

    Sets the insight period and close times if they have not already been set.

    Parameters:
    ShortToString()

    Returns a short string that represents the current object.

    Return type:

    String

    property CloseTimeUtc

    Gets the insight's prediction end time. This is the time when this insight prediction is expected to be fulfilled. This time takes into account market hours, weekends, as well as the symbol's data resolution

    Returns:

    Gets the insight's prediction end time. This is the time when this insight prediction is expected to be fulfilled. This time takes into account market hours, weekends, as well as the symbol's data resolution

    Return type:

    DateTime

    property Confidence

    Gets the confidence in this insight

    Returns:

    Gets the confidence in this insight

    Return type:

    Double

    property Direction

    Gets the predicted direction, down, flat or up

    Returns:

    Gets the predicted direction, down, flat or up

    Return type:

    InsightDirection

    property EstimatedValue

    Gets the estimated value of this insight in the account currency

    Returns:

    Gets the estimated value of this insight in the account currency

    Return type:

    decimal

    property GeneratedTimeUtc

    Gets the utc time this insight was generated

    Returns:

    Gets the utc time this insight was generated

    Return type:

    DateTime

    property GroupId

    Gets the group id this insight belongs to, null if not in a group

    Returns:

    Gets the group id this insight belongs to, null if not in a group

    Return type:

    Guid

    property Id

    Gets the unique identifier for this insight

    Returns:

    Gets the unique identifier for this insight

    Return type:

    Guid

    property Magnitude

    Gets the predicted percent change in the insight type (price/volatility)

    Returns:

    Gets the predicted percent change in the insight type (price/volatility)

    Return type:

    Double

    property Period

    Gets the period over which this insight is expected to come to fruition

    Returns:

    Gets the period over which this insight is expected to come to fruition

    Return type:

    TimeSpan

    property ReferenceValue

    Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType

    Returns:

    Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType

    Return type:

    decimal

    property ReferenceValueFinal

    Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType

    Returns:

    Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType

    Return type:

    decimal

    property Score

    Gets the most recent scores for this insight

    Returns:

    Gets the most recent scores for this insight

    Return type:

    InsightScore

    property SourceModel

    Gets an identifier for the source model that generated this insight.

    Returns:

    Gets an identifier for the source model that generated this insight.

    Return type:

    string

    property Symbol

    Gets the symbol this insight is for

    Returns:

    Gets the symbol this insight is for

    Return type:

    Symbol

    property Tag

    The insight's tag containing additional information

    Returns:

    The insight's tag containing additional information

    Return type:

    string

    property Type

    Gets the type of insight, for example, price insight or volatility insight

    Returns:

    Gets the type of insight, for example, price insight or volatility insight

    Return type:

    InsightType

    property Weight

    Gets the portfolio weight of this insight

    Returns:

    Gets the portfolio weight of this insight

    Return type:

    Double

    InvertedHammer

    class QuantConnect.Indicators.CandlestickPatterns.InvertedHammer [source]

    Inverted Hammer candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    InvertedHammer

    class QuantConnect.Indicators.CandlestickPatterns.InvertedHammer [source]

    Inverted Hammer candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Kicking

    class QuantConnect.Indicators.CandlestickPatterns.Kicking [source]

    Kicking candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Kicking

    class QuantConnect.Indicators.CandlestickPatterns.Kicking [source]

    Kicking candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    KickingByLength

    class QuantConnect.Indicators.CandlestickPatterns.KickingByLength [source]

    Kicking (bull/bear determined by the longer marubozu) candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    KickingByLength

    class QuantConnect.Indicators.CandlestickPatterns.KickingByLength [source]

    Kicking (bull/bear determined by the longer marubozu) candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    LadderBottom

    class QuantConnect.Indicators.CandlestickPatterns.LadderBottom [source]

    Ladder Bottom candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LadderBottom

    class QuantConnect.Indicators.CandlestickPatterns.LadderBottom [source]

    Ladder Bottom candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    LongLeggedDoji

    class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji [source]

    Long Legged Doji candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LongLeggedDoji

    class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji [source]

    Long Legged Doji candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    LongLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.LongLineCandle [source]

    Long Line Candle candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LongLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.LongLineCandle [source]

    Long Line Candle candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Marubozu

    class QuantConnect.Indicators.CandlestickPatterns.Marubozu [source]

    Marubozu candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Marubozu

    class QuantConnect.Indicators.CandlestickPatterns.Marubozu [source]

    Marubozu candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    MatHold

    class QuantConnect.Indicators.CandlestickPatterns.MatHold [source]

    Mat Hold candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MatHold

    class QuantConnect.Indicators.CandlestickPatterns.MatHold [source]

    Mat Hold candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    MatchingLow

    class QuantConnect.Indicators.CandlestickPatterns.MatchingLow [source]

    Matching Low candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MatchingLow

    class QuantConnect.Indicators.CandlestickPatterns.MatchingLow [source]

    Matching Low candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    MorningDojiStar

    class QuantConnect.Indicators.CandlestickPatterns.MorningDojiStar [source]

    Morning Doji Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MorningDojiStar

    class QuantConnect.Indicators.CandlestickPatterns.MorningDojiStar [source]

    Morning Doji Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    MorningStar

    class QuantConnect.Indicators.CandlestickPatterns.MorningStar [source]

    Morning Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    MorningStar

    class QuantConnect.Indicators.CandlestickPatterns.MorningStar [source]

    Morning Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    MovingAverageType

    enum QuantConnect.Indicators.MovingAverageType [source]

    Defines the different types of moving averages

    field ALMA

    The Arnaud Legoux Moving Average (10)

    Returns:

    The Arnaud Legoux Moving Average (10)

    Return type:

    MovingAverageType

    field DOUBLE_EXPONENTIAL

    The double exponential moving average (4)

    Returns:

    The double exponential moving average (4)

    Return type:

    MovingAverageType

    field EXPONENTIAL

    The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)

    Returns:

    The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)

    Return type:

    MovingAverageType

    field HULL

    The Hull Moving Average (9)

    Returns:

    The Hull Moving Average (9)

    Return type:

    MovingAverageType

    field KAMA

    The Kaufman Adaptive Moving Average (8)

    Returns:

    The Kaufman Adaptive Moving Average (8)

    Return type:

    MovingAverageType

    field LINEAR_WEIGHTED_MOVING_AVERAGE

    A weighted moving average type (3)

    Returns:

    A weighted moving average type (3)

    Return type:

    MovingAverageType

    field SIMPLE

    An unweighted, arithmetic mean (0)

    Returns:

    An unweighted, arithmetic mean (0)

    Return type:

    MovingAverageType

    field TRIANGULAR

    The triangular moving average (6)

    Returns:

    The triangular moving average (6)

    Return type:

    MovingAverageType

    field TRIPLE_EXPONENTIAL

    The triple exponential moving average (5)

    Returns:

    The triple exponential moving average (5)

    Return type:

    MovingAverageType

    field T_3

    The T3 moving average (7)

    Returns:

    The T3 moving average (7)

    Return type:

    MovingAverageType

    field WILDERS

    An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)

    Returns:

    An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)

    Return type:

    MovingAverageType

    MovingAverageType

    enum QuantConnect.Indicators.MovingAverageType [source]

    Defines the different types of moving averages

    field Alma

    The Arnaud Legoux Moving Average (10)

    Returns:

    The Arnaud Legoux Moving Average (10)

    Return type:

    MovingAverageType

    field DoubleExponential

    The double exponential moving average (4)

    Returns:

    The double exponential moving average (4)

    Return type:

    MovingAverageType

    field Exponential

    The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)

    Returns:

    The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)

    Return type:

    MovingAverageType

    field Hull

    The Hull Moving Average (9)

    Returns:

    The Hull Moving Average (9)

    Return type:

    MovingAverageType

    field Kama

    The Kaufman Adaptive Moving Average (8)

    Returns:

    The Kaufman Adaptive Moving Average (8)

    Return type:

    MovingAverageType

    field LinearWeightedMovingAverage

    A weighted moving average type (3)

    Returns:

    A weighted moving average type (3)

    Return type:

    MovingAverageType

    field Simple

    An unweighted, arithmetic mean (0)

    Returns:

    An unweighted, arithmetic mean (0)

    Return type:

    MovingAverageType

    field T3

    The T3 moving average (7)

    Returns:

    The T3 moving average (7)

    Return type:

    MovingAverageType

    field Triangular

    The triangular moving average (6)

    Returns:

    The triangular moving average (6)

    Return type:

    MovingAverageType

    field TripleExponential

    The triple exponential moving average (5)

    Returns:

    The triple exponential moving average (5)

    Return type:

    MovingAverageType

    field Wilders

    An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)

    Returns:

    An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)

    Return type:

    MovingAverageType

    OnNeck

    class QuantConnect.Indicators.CandlestickPatterns.OnNeck [source]

    On-Neck candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    OnNeck

    class QuantConnect.Indicators.CandlestickPatterns.OnNeck [source]

    On-Neck candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Option

    class QuantConnect.Securities.Option.Option [source]

    Option Security Object Implementation for Option Assets

    clear()

    Removes every custom property that had been set.

    evaluate_price_model( slice, contract )

    For this option security object, evaluates the specified option contract to compute a theoretical price, IV and greeks

    Parameters:
    Return type:

    OptionPriceModelResult

    get_aggregate_exercise_amount()

    Aggregate exercise amount or aggregate contract value. It is the total amount of cash one will pay (or receive) for the shares of the underlying stock if he/she decides to exercise (or is assigned an exercise notice). This amount is not the premium paid or received for an equity option.

    Return type:

    float

    get_exercise_quantity( exercise_order_quantity )

    Returns the directional quantity of underlying shares that are going to change hands on exercise/assignment of all contracts held by this account, taking into account the contract's Right as well as the contract's current ContractUnitOfTrade , which may have recently changed due to a split/reverse split in the underlying security.

    Parameters:
    • exercise_order_quantity ( float )
    Return type:

    float

    get_intrinsic_value( underlying_price )

    Intrinsic value function of the option

    Parameters:
    • underlying_price ( float )
    Return type:

    float

    get_last_data()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    get_pay_off( underlying_price )

    Option payoff function at expiration time

    Parameters:
    • underlying_price ( float )
    Return type:

    float

    is_auto_exercised( underlying_price )

    Checks if option is eligible for automatic exercise on expiration

    Parameters:
    • underlying_price ( float )
    Return type:

    bool

    out_of_the_money_amount( underlying_price )

    Option out of the money function

    Parameters:
    • underlying_price ( float )
    Return type:

    float

    refresh_data_normalization_mode_property()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    set_buying_power_model( buying_power_model )

    Sets the buying power model

    Parameters:
    • buying_power_model ( IBuyingPowerModel )
    set_buying_power_model( py_object )

    Sets the buying power model

    Parameters:
    • py_object ( PyObject )
    set_data_filter( py_object )

    Set Security Data Filter

    Parameters:
    • py_object ( PyObject )
    set_data_filter( data_filter )

    Set Security Data Filter

    Parameters:
    • data_filter ( ISecurityDataFilter )
    set_data_normalization_mode( mode )

    Sets the data normalization mode to be used by this security

    Parameters:
    set_fee_model( feel_model )

    Sets the fee model

    Parameters:
    • feel_model ( PyObject | IFeeModel )
    set_fill_model( fill_model )

    Sets the fill model

    Parameters:
    • fill_model ( PyObject | IFillModel )
    set_filter( min_strike, max_strike, min_expiry, max_expiry )

    Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

    Parameters:
    • min_strike ( int )
    • max_strike ( int )
    • min_expiry ( timedelta )
    • max_expiry ( timedelta )
    set_filter( min_strike, max_strike, min_expiry_days, max_expiry_days )

    Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

    Parameters:
    • min_strike ( int )
    • max_strike ( int )
    • min_expiry_days ( int )
    • max_expiry_days ( int )
    set_filter( universe_func )

    Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

    Parameters:
    • universe_func ( PyObject | Callable[OptionFilterUniverse, OptionFilterUniverse] )
    set_leverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( float )
    set_local_time_keeper( local_time_keeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    set_margin_interest_rate_model( margin_interest_rate_model )

    Sets the margin interests rate model

    Parameters:
    • margin_interest_rate_model ( IMarginInterestRateModel )
    set_margin_interest_rate_model( py_object )

    Sets the margin interests rate model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( py_object )

    Sets the margin model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( margin_model )

    Sets the margin model

    Parameters:
    • margin_model ( IBuyingPowerModel )
    set_market_price( data )

    Update any security properties based on the latest market data and time

    Parameters:
    set_option_assignment_model( py_object )

    Sets the automatic option assignment model

    Parameters:
    • py_object ( PyObject )
    set_option_assignment_model( option_assignment_model )

    Sets the automatic option assignment model

    Parameters:
    • option_assignment_model ( IOptionAssignmentModel )
    set_option_exercise_model( py_object )

    Sets the option exercise model

    Parameters:
    • py_object ( PyObject )
    set_option_exercise_model( option_exercise_model )

    Sets the option exercise model

    Parameters:
    • option_exercise_model ( IOptionExerciseModel )
    set_settlement_model( settlement_model )

    Sets the settlement model

    Parameters:
    • settlement_model ( PyObject | ISettlementModel )
    set_shortable_provider( py_object )

    Set Python Shortable Provider for this Security

    Parameters:
    • py_object ( PyObject )
    set_shortable_provider( shortable_provider )

    Set Python Shortable Provider for this Security

    Parameters:
    set_slippage_model( slippage_model )

    Sets the slippage model

    Parameters:
    • slippage_model ( ISlippageModel | PyObject )
    set_volatility_model( volatility_model )

    Sets the volatility model

    Parameters:
    • volatility_model ( PyObject | IVolatilityModel )
    update( data, data_type, contains_fill_forward_data=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( List[BaseData] )
    • data_type ( Type )
    • contains_fill_forward_data ( bool, optional )
    property ask_price

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    float

    property ask_size

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    float

    property bid_price

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    float

    property bid_size

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    float

    property buying_power_model

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    float

    property contract_filter

    Gets or sets the contract filter

    Returns:

    Gets or sets the contract filter

    Return type:

    IDerivativeSecurityFilter

    property contract_multiplier

    The contract multiplier for the option security

    Returns:

    The contract multiplier for the option security

    Return type:

    int

    property contract_unit_of_trade

    When the holder of an equity option exercises one contract, or when the writer of an equity option is assigned an exercise notice on one contract, this unit of trade, usually 100 shares of the underlying security, changes hands.

    Returns:

    When the holder of an equity option exercises one contract, or when the writer of an equity option is assigned an exercise notice on one contract, this unit of trade, usually 100 shares of the underlying security, changes hands.

    Return type:

    int

    property data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property data_filter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property exercise_settlement

    Specifies if option contract has physical or cash settlement on exercise

    Returns:

    Specifies if option contract has physical or cash settlement on exercise

    Return type:

    SettlementType

    property expiry

    Gets the expiration date

    Returns:

    Gets the expiration date

    Return type:

    datetime

    property fee_model

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property fill_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property has_data

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property high

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    float

    property hold_stock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property is_delisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property is_option_chain

    Returns true if this is the option chain security, false if it is a specific option contract

    Returns:

    Returns true if this is the option chain security, false if it is a specific option contract

    Return type:

    bool

    property is_option_contract

    Returns true if this is a specific option contract security, false if it is the option chain security

    Returns:

    Returns true if this is a specific option contract security, false if it is the option chain security

    Return type:

    bool

    property is_tradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property item

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    property leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    float

    property local_time

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    datetime

    property low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    float

    property margin_interest_rate_model

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property margin_model

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    float

    property open_interest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property option_assignment_model

    The automatic option assignment model

    Returns:

    The automatic option assignment model

    Return type:

    IOptionAssignmentModel

    property option_exercise_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IOptionExerciseModel

    property portfolio_model

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    float

    property price_model

    Gets or sets the price model for this option security

    Returns:

    Gets or sets the price model for this option security

    Return type:

    IOptionPriceModel

    property price_variation_model

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property quote_currency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property right

    Gets the right being purchased (call [right to buy] or put [right to sell])

    Returns:

    Gets the right being purchased (call [right to buy] or put [right to sell])

    Return type:

    OptionRight

    property scaled_strike_price

    Gets the strike price multiplied by the strike multiplier

    Returns:

    Gets the strike price multiplied by the strike multiplier

    Return type:

    float

    property settlement_model

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property shortable_provider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IintableProvider

    property slippage_model

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property strike_price

    Gets the strike price

    Returns:

    Gets the strike price

    Return type:

    float

    property style

    Gets the option style

    Returns:

    Gets the option style

    Return type:

    OptionStyle

    property subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List[SubscriptionDataConfig]

    property symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property symbol_properties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property underlying

    Gets or sets the underlying security object.

    Returns:

    Gets or sets the underlying security object.

    Return type:

    Security

    property volatility_model

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    float

    field DEFAULT_SETTLEMENT_DAYS

    The default number of days required to settle an equity sale

    Returns:

    The default number of days required to settle an equity sale

    Return type:

    int

    field DEFAULT_SETTLEMENT_TIME

    The default time of day for settlement

    Returns:

    The default time of day for settlement

    Return type:

    timedelta

    Option

    class QuantConnect.Securities.Option.Option [source]

    Option Security Object Implementation for Option Assets

    Clear()

    Removes every custom property that had been set.

    EvaluatePriceModel( slice, contract )

    For this option security object, evaluates the specified option contract to compute a theoretical price, IV and greeks

    Parameters:
    Return type:

    OptionPriceModelResult

    GetAggregateExerciseAmount()

    Aggregate exercise amount or aggregate contract value. It is the total amount of cash one will pay (or receive) for the shares of the underlying stock if he/she decides to exercise (or is assigned an exercise notice). This amount is not the premium paid or received for an equity option.

    Return type:

    Decimal

    GetExerciseQuantity( exerciseOrderQuantity )

    Returns the directional quantity of underlying shares that are going to change hands on exercise/assignment of all contracts held by this account, taking into account the contract's Right as well as the contract's current ContractUnitOfTrade , which may have recently changed due to a split/reverse split in the underlying security.

    Parameters:
    • exerciseOrderQuantity ( decimal )
    Return type:

    Decimal

    GetIntrinsicValue( underlyingPrice )

    Intrinsic value function of the option

    Parameters:
    • underlyingPrice ( decimal )
    Return type:

    Decimal

    GetLastData()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    GetPayOff( underlyingPrice )

    Option payoff function at expiration time

    Parameters:
    • underlyingPrice ( decimal )
    Return type:

    Decimal

    IsAutoExercised( underlyingPrice )

    Checks if option is eligible for automatic exercise on expiration

    Parameters:
    • underlyingPrice ( decimal )
    Return type:

    Boolean

    OutOfTheMoneyAmount( underlyingPrice )

    Option out of the money function

    Parameters:
    • underlyingPrice ( decimal )
    Return type:

    Decimal

    RefreshDataNormalizationModeProperty()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    SetBuyingPowerModel( buyingPowerModel )

    Sets the buying power model

    Parameters:
    • buyingPowerModel ( IBuyingPowerModel )
    SetBuyingPowerModel( pyObject )

    Sets the buying power model

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( pyObject )

    Set Security Data Filter

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( dataFilter )

    Set Security Data Filter

    Parameters:
    • dataFilter ( ISecurityDataFilter )
    SetDataNormalizationMode( mode )

    Sets the data normalization mode to be used by this security

    Parameters:
    SetFeeModel( feelModel )

    Sets the fee model

    Parameters:
    • feelModel ( PyObject | IFeeModel )
    SetFillModel( fillModel )

    Sets the fill model

    Parameters:
    • fillModel ( PyObject | IFillModel )
    SetFilter( minStrike, maxStrike, minExpiry, maxExpiry )

    Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

    Parameters:
    • minStrike ( Int32 )
    • maxStrike ( Int32 )
    • minExpiry ( TimeSpan )
    • maxExpiry ( TimeSpan )
    SetFilter( minStrike, maxStrike, minExpiryDays, maxExpiryDays )

    Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

    Parameters:
    • minStrike ( Int32 )
    • maxStrike ( Int32 )
    • minExpiryDays ( Int32 )
    • maxExpiryDays ( Int32 )
    SetFilter( universeFunc )

    Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

    Parameters:
    • universeFunc ( PyObject | Func[OptionFilterUniverse, OptionFilterUniverse] )
    SetLeverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( decimal )
    SetLocalTimeKeeper( localTimeKeeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    SetMarginInterestRateModel( marginInterestRateModel )

    Sets the margin interests rate model

    Parameters:
    • marginInterestRateModel ( IMarginInterestRateModel )
    SetMarginInterestRateModel( pyObject )

    Sets the margin interests rate model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( pyObject )

    Sets the margin model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( marginModel )

    Sets the margin model

    Parameters:
    • marginModel ( IBuyingPowerModel )
    SetMarketPrice( data )

    Update any security properties based on the latest market data and time

    Parameters:
    SetOptionAssignmentModel( pyObject )

    Sets the automatic option assignment model

    Parameters:
    • pyObject ( PyObject )
    SetOptionAssignmentModel( optionAssignmentModel )

    Sets the automatic option assignment model

    Parameters:
    • optionAssignmentModel ( IOptionAssignmentModel )
    SetOptionExerciseModel( pyObject )

    Sets the option exercise model

    Parameters:
    • pyObject ( PyObject )
    SetOptionExerciseModel( optionExerciseModel )

    Sets the option exercise model

    Parameters:
    • optionExerciseModel ( IOptionExerciseModel )
    SetSettlementModel( settlementModel )

    Sets the settlement model

    Parameters:
    • settlementModel ( PyObject | ISettlementModel )
    SetShortableProvider( pyObject )

    Set Python Shortable Provider for this Security

    Parameters:
    • pyObject ( PyObject )
    SetShortableProvider( shortableProvider )

    Set Python Shortable Provider for this Security

    Parameters:
    • shortableProvider ( IShortableProvider )
    SetSlippageModel( slippageModel )

    Sets the slippage model

    Parameters:
    • slippageModel ( ISlippageModel | PyObject )
    SetVolatilityModel( volatilityModel )

    Sets the volatility model

    Parameters:
    • volatilityModel ( PyObject | IVolatilityModel )
    Update( data, dataType, containsFillForwardData=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( IReadOnlyList<BaseData> )
    • dataType ( Type )
    • containsFillForwardData ( Boolean, optional )
    property AskPrice

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    decimal

    property AskSize

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    decimal

    property BidPrice

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    decimal

    property BidSize

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    decimal

    property BuyingPowerModel

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property Cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property Close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    decimal

    property ContractFilter

    Gets or sets the contract filter

    Returns:

    Gets or sets the contract filter

    Return type:

    IDerivativeSecurityFilter

    property ContractMultiplier

    The contract multiplier for the option security

    Returns:

    The contract multiplier for the option security

    Return type:

    Int32

    property ContractUnitOfTrade

    When the holder of an equity option exercises one contract, or when the writer of an equity option is assigned an exercise notice on one contract, this unit of trade, usually 100 shares of the underlying security, changes hands.

    Returns:

    When the holder of an equity option exercises one contract, or when the writer of an equity option is assigned an exercise notice on one contract, this unit of trade, usually 100 shares of the underlying security, changes hands.

    Return type:

    Int32

    property Data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property DataFilter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property Exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property ExerciseSettlement

    Specifies if option contract has physical or cash settlement on exercise

    Returns:

    Specifies if option contract has physical or cash settlement on exercise

    Return type:

    SettlementType

    property Expiry

    Gets the expiration date

    Returns:

    Gets the expiration date

    Return type:

    DateTime

    property FeeModel

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property FillModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property Fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property HasData

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property High

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    decimal

    property HoldStock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property Holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property Invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property IsDelisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property IsOptionChain

    Returns true if this is the option chain security, false if it is a specific option contract

    Returns:

    Returns true if this is the option chain security, false if it is a specific option contract

    Return type:

    bool

    property IsOptionContract

    Returns true if this is a specific option contract security, false if it is the option chain security

    Returns:

    Returns true if this is a specific option contract security, false if it is the option chain security

    Return type:

    bool

    property IsTradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property Leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    decimal

    property LocalTime

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    DateTime

    property Low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    decimal

    property MarginInterestRateModel

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property MarginModel

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property Open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    decimal

    property OpenInterest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property OptionAssignmentModel

    The automatic option assignment model

    Returns:

    The automatic option assignment model

    Return type:

    IOptionAssignmentModel

    property OptionExerciseModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IOptionExerciseModel

    property PortfolioModel

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property Price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    decimal

    property PriceModel

    Gets or sets the price model for this option security

    Returns:

    Gets or sets the price model for this option security

    Return type:

    IOptionPriceModel

    property PriceVariationModel

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property QuoteCurrency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property Right

    Gets the right being purchased (call [right to buy] or put [right to sell])

    Returns:

    Gets the right being purchased (call [right to buy] or put [right to sell])

    Return type:

    OptionRight

    property ScaledStrikePrice

    Gets the strike price multiplied by the strike multiplier

    Returns:

    Gets the strike price multiplied by the strike multiplier

    Return type:

    decimal

    property SettlementModel

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property ShortableProvider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IShortableProvider

    property SlippageModel

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property StrikePrice

    Gets the strike price

    Returns:

    Gets the strike price

    Return type:

    decimal

    property Style

    Gets the option style

    Returns:

    Gets the option style

    Return type:

    OptionStyle

    property Subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List<SubscriptionDataConfig>

    property Symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property SymbolProperties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property Type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property Underlying

    Gets or sets the underlying security object.

    Returns:

    Gets or sets the underlying security object.

    Return type:

    Security

    property VolatilityModel

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property Volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    decimal

    property [System.String]

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    field DefaultSettlementDays

    The default number of days required to settle an equity sale

    Returns:

    The default number of days required to settle an equity sale

    Return type:

    Int32

    field DefaultSettlementTime

    The default time of day for settlement

    Returns:

    The default time of day for settlement

    Return type:

    TimeSpan

    OptionPricingModelType

    enum QuantConnect.Indicators.OptionPricingModelType [source]

    Defines different types of option pricing model

    field BINOMIAL_COX_ROSS_RUBINSTEIN

    The Cox-Ross-Rubinstein binomial tree model (CRR model)

    Returns:

    The Cox-Ross-Rubinstein binomial tree model (CRR model)

    Return type:

    OptionPricingModelType

    field BLACK_SCHOLES

    Vanilla Black Scholes Model

    Returns:

    Vanilla Black Scholes Model

    Return type:

    OptionPricingModelType

    field FORWARD_TREE

    The forward binomial tree model, or Cox-Ross-Rubinstein with drift model

    Returns:

    The forward binomial tree model, or Cox-Ross-Rubinstein with drift model

    Return type:

    OptionPricingModelType

    OptionPricingModelType

    enum QuantConnect.Indicators.OptionPricingModelType [source]

    Defines different types of option pricing model

    field BinomialCoxRossRubinstein

    The Cox-Ross-Rubinstein binomial tree model (CRR model)

    Returns:

    The Cox-Ross-Rubinstein binomial tree model (CRR model)

    Return type:

    OptionPricingModelType

    field BlackScholes

    Vanilla Black Scholes Model

    Returns:

    Vanilla Black Scholes Model

    Return type:

    OptionPricingModelType

    field ForwardTree

    The forward binomial tree model, or Cox-Ross-Rubinstein with drift model

    Returns:

    The forward binomial tree model, or Cox-Ross-Rubinstein with drift model

    Return type:

    OptionPricingModelType

    OptionStrategy

    class QuantConnect.Securities.Option.OptionStrategy [source]

    Option strategy specification class. Describes option strategy and its parameters for trading.

    property canonical_option

    The canonical Option symbol of the strategy

    Returns:

    The canonical Option symbol of the strategy

    Return type:

    Symbol

    property name

    Option strategy name

    Returns:

    Option strategy name

    Return type:

    str

    property option_legs

    Option strategy legs

    Returns:

    Option strategy legs

    Return type:

    List[OptionLegData]

    property underlying

    Underlying symbol of the strategy

    Returns:

    Underlying symbol of the strategy

    Return type:

    Symbol

    property underlying_legs

    Option strategy underlying legs (usually 0 or 1 legs)

    Returns:

    Option strategy underlying legs (usually 0 or 1 legs)

    Return type:

    List[UnderlyingLegData]

    OptionStrategy

    class QuantConnect.Securities.Option.OptionStrategy [source]

    Option strategy specification class. Describes option strategy and its parameters for trading.

    property CanonicalOption

    The canonical Option symbol of the strategy

    Returns:

    The canonical Option symbol of the strategy

    Return type:

    Symbol

    property Name

    Option strategy name

    Returns:

    Option strategy name

    Return type:

    string

    property OptionLegs

    Option strategy legs

    Returns:

    Option strategy legs

    Return type:

    List<OptionLegData>

    property Underlying

    Underlying symbol of the strategy

    Returns:

    Underlying symbol of the strategy

    Return type:

    Symbol

    property UnderlyingLegs

    Option strategy underlying legs (usually 0 or 1 legs)

    Returns:

    Option strategy underlying legs (usually 0 or 1 legs)

    Return type:

    List<UnderlyingLegData>

    OrderEvent

    class QuantConnect.Orders.OrderEvent [source]

    Order Event - Messaging class signifying a change in an order state and record the change in the user's algorithm portfolio

    clone()

    Returns a clone of the current object.

    Return type:

    OrderEvent

    short_to_string()

    Returns a short string that represents the current object.

    Return type:

    str

    property absolute_fill_quantity

    Public Property Absolute Getter of Quantity -Filled

    Returns:

    Public Property Absolute Getter of Quantity -Filled

    Return type:

    float

    property direction

    Order direction.

    Returns:

    Order direction.

    Return type:

    OrderDirection

    property fill_price

    Fill price information about the order

    Returns:

    Fill price information about the order

    Return type:

    float

    property fill_price_currency

    Currency for the fill price

    Returns:

    Currency for the fill price

    Return type:

    str

    property fill_quantity

    Number of shares of the order that was filled in this event.

    Returns:

    Number of shares of the order that was filled in this event.

    Return type:

    float

    property id

    The unique order event id for each order

    Returns:

    The unique order event id for each order

    Return type:

    int

    property is_assignment

    True if the order event is an assignment

    Returns:

    True if the order event is an assignment

    Return type:

    bool

    property is_in_the_money

    True if the order event's option is In-The-Money (ITM)

    Returns:

    True if the order event's option is In-The-Money (ITM)

    Return type:

    bool

    property limit_price

    The current limit price

    Returns:

    The current limit price

    Return type:

    float

    property message

    Any message from the exchange.

    Returns:

    Any message from the exchange.

    Return type:

    str

    property order_fee

    The fee associated with the order

    Returns:

    The fee associated with the order

    Return type:

    OrderFee

    property order_id

    Id of the order this event comes from.

    Returns:

    Id of the order this event comes from.

    Return type:

    int

    property quantity

    The current order quantity

    Returns:

    The current order quantity

    Return type:

    float

    property status

    Status message of the order.

    Returns:

    Status message of the order.

    Return type:

    OrderStatus

    property stop_price

    The current stop price

    Returns:

    The current stop price

    Return type:

    float

    property symbol

    Easy access to the order symbol associated with this event.

    Returns:

    Easy access to the order symbol associated with this event.

    Return type:

    Symbol

    property ticket

    The order ticket associated to the order

    Returns:

    The order ticket associated to the order

    Return type:

    OrderTicket

    property trailing_amount

    The trailing stop amount

    Returns:

    The trailing stop amount

    Return type:

    float

    property trailing_as_percentage

    Whether the TrailingAmount is a percentage or an absolute currency value

    Returns:

    Whether the TrailingAmount is a percentage or an absolute currency value

    Return type:

    bool

    property trigger_price

    The current trigger price

    Returns:

    The current trigger price

    Return type:

    float

    property utc_time

    The date and time of this event (UTC).

    Returns:

    The date and time of this event (UTC).

    Return type:

    datetime

    OrderEvent

    class QuantConnect.Orders.OrderEvent [source]

    Order Event - Messaging class signifying a change in an order state and record the change in the user's algorithm portfolio

    Clone()

    Returns a clone of the current object.

    Return type:

    OrderEvent

    ShortToString()

    Returns a short string that represents the current object.

    Return type:

    String

    property AbsoluteFillQuantity

    Public Property Absolute Getter of Quantity -Filled

    Returns:

    Public Property Absolute Getter of Quantity -Filled

    Return type:

    decimal

    property Direction

    Order direction.

    Returns:

    Order direction.

    Return type:

    OrderDirection

    property FillPrice

    Fill price information about the order

    Returns:

    Fill price information about the order

    Return type:

    decimal

    property FillPriceCurrency

    Currency for the fill price

    Returns:

    Currency for the fill price

    Return type:

    string

    property FillQuantity

    Number of shares of the order that was filled in this event.

    Returns:

    Number of shares of the order that was filled in this event.

    Return type:

    decimal

    property Id

    The unique order event id for each order

    Returns:

    The unique order event id for each order

    Return type:

    Int32

    property IsAssignment

    True if the order event is an assignment

    Returns:

    True if the order event is an assignment

    Return type:

    bool

    property IsInTheMoney

    True if the order event's option is In-The-Money (ITM)

    Returns:

    True if the order event's option is In-The-Money (ITM)

    Return type:

    bool

    property LimitPrice

    The current limit price

    Returns:

    The current limit price

    Return type:

    decimal

    property Message

    Any message from the exchange.

    Returns:

    Any message from the exchange.

    Return type:

    string

    property OrderFee

    The fee associated with the order

    Returns:

    The fee associated with the order

    Return type:

    OrderFee

    property OrderId

    Id of the order this event comes from.

    Returns:

    Id of the order this event comes from.

    Return type:

    Int32

    property Quantity

    The current order quantity

    Returns:

    The current order quantity

    Return type:

    decimal

    property Status

    Status message of the order.

    Returns:

    Status message of the order.

    Return type:

    OrderStatus

    property StopPrice

    The current stop price

    Returns:

    The current stop price

    Return type:

    decimal

    property Symbol

    Easy access to the order symbol associated with this event.

    Returns:

    Easy access to the order symbol associated with this event.

    Return type:

    Symbol

    property Ticket

    The order ticket associated to the order

    Returns:

    The order ticket associated to the order

    Return type:

    OrderTicket

    property TrailingAmount

    The trailing stop amount

    Returns:

    The trailing stop amount

    Return type:

    decimal

    property TrailingAsPercentage

    Whether the TrailingAmount is a percentage or an absolute currency value

    Returns:

    Whether the TrailingAmount is a percentage or an absolute currency value

    Return type:

    Boolean

    property TriggerPrice

    The current trigger price

    Returns:

    The current trigger price

    Return type:

    decimal

    property UtcTime

    The date and time of this event (UTC).

    Returns:

    The date and time of this event (UTC).

    Return type:

    DateTime

    OrderTicket

    class QuantConnect.Orders.OrderTicket [source]

    Provides a single reference to an order for the algorithm to maintain. As the order gets updated this ticket will also get updated

    cancel( tag=None )

    Submits a new request to cancel this order

    Parameters:
    • tag ( str, optional )
    Return type:

    OrderResponse

    get( field )

    Gets the specified field from the ticket

    Parameters:
    get( field )

    Gets the specified field from the ticket

    Parameters:
    Return type:

    float

    get_most_recent_order_request()

    Gets the most recent OrderRequest for this ticket

    Return type:

    OrderRequest

    get_most_recent_order_response()

    Gets the most recent OrderResponse for this ticket

    Return type:

    OrderResponse

    update( fields )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with data specified in fields

    Parameters:
    Return type:

    OrderResponse

    update_limit_price( limit_price, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with limit price specified in limitPrice and with tag specified in tag

    Parameters:
    • limit_price ( float )
    • tag ( str, optional )
    Return type:

    OrderResponse

    update_quantity( quantity, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with quantity specified in quantity and with tag specified in quantity

    Parameters:
    • quantity ( float )
    • tag ( str, optional )
    Return type:

    OrderResponse

    update_stop_price( stop_price, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with stop price specified in stopPrice and with tag specified in tag

    Parameters:
    • stop_price ( float )
    • tag ( str, optional )
    Return type:

    OrderResponse

    update_stop_trailing_amount( trailing_amount, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with stop trailing amount specified in trailingAmount and with tag specified in tag

    Parameters:
    • trailing_amount ( float )
    • tag ( str, optional )
    Return type:

    OrderResponse

    update_tag( tag )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with tag specified in tag

    Parameters:
    • tag ( str )
    Return type:

    OrderResponse

    update_trigger_price( trigger_price, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with trigger price specified in triggerPrice and with tag specified in tag

    Parameters:
    • trigger_price ( float )
    • tag ( str, optional )
    Return type:

    OrderResponse

    property average_fill_price

    Gets the average fill price for this ticket. If no fills have been processed then this will return a value of zero.

    Returns:

    Gets the average fill price for this ticket. If no fills have been processed then this will return a value of zero.

    Return type:

    float

    property cancel_request

    Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null

    Returns:

    Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null

    Return type:

    CancelOrderRequest

    property has_order

    Returns true if the order has been set for this ticket

    Returns:

    Returns true if the order has been set for this ticket

    Return type:

    bool

    property order_closed

    Gets a wait handle that can be used to wait until this order has filled

    Returns:

    Gets a wait handle that can be used to wait until this order has filled

    Return type:

    WaitHandle

    property order_events

    Gets a list of all order events for this ticket

    Returns:

    Gets a list of all order events for this ticket

    Return type:

    List[OrderEvent]

    property order_id

    Gets the order id of this ticket

    Returns:

    Gets the order id of this ticket

    Return type:

    int

    property order_set

    Gets a wait handle that can be used to wait until the order has been set

    Returns:

    Gets a wait handle that can be used to wait until the order has been set

    Return type:

    WaitHandle

    property order_type

    Gets the type of order

    Returns:

    Gets the type of order

    Return type:

    OrderType

    property quantity

    Gets the number of units ordered

    Returns:

    Gets the number of units ordered

    Return type:

    float

    property quantity_filled

    Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.

    Returns:

    Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.

    Return type:

    float

    property security_type

    Gets the Symbol 's SecurityType

    Returns:

    Gets the Symbol 's SecurityType

    Return type:

    SecurityType

    property status

    Gets the current status of this order ticket

    Returns:

    Gets the current status of this order ticket

    Return type:

    OrderStatus

    property submit_request

    Gets the SubmitOrderRequest that initiated this order

    Returns:

    Gets the SubmitOrderRequest that initiated this order

    Return type:

    SubmitOrderRequest

    property symbol

    Gets the symbol being ordered

    Returns:

    Gets the symbol being ordered

    Return type:

    Symbol

    property tag

    Gets the order's current tag

    Returns:

    Gets the order's current tag

    Return type:

    str

    property time

    Gets the time this order was last updated

    Returns:

    Gets the time this order was last updated

    Return type:

    datetime

    property update_requests

    Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id

    Returns:

    Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id

    Return type:

    List[UpdateOrderRequest]

    OrderTicket

    class QuantConnect.Orders.OrderTicket [source]

    Provides a single reference to an order for the algorithm to maintain. As the order gets updated this ticket will also get updated

    Cancel( tag=None )

    Submits a new request to cancel this order

    Parameters:
    • tag ( string, optional )
    Return type:

    OrderResponse

    Get( field )

    Gets the specified field from the ticket

    Parameters:
    Get( field )

    Gets the specified field from the ticket

    Parameters:
    Return type:

    Decimal

    GetMostRecentOrderRequest()

    Gets the most recent OrderRequest for this ticket

    Return type:

    OrderRequest

    GetMostRecentOrderResponse()

    Gets the most recent OrderResponse for this ticket

    Return type:

    OrderResponse

    Update( fields )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with data specified in fields

    Parameters:
    Return type:

    OrderResponse

    UpdateLimitPrice( limitPrice, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with limit price specified in limitPrice and with tag specified in tag

    Parameters:
    • limitPrice ( decimal )
    • tag ( string, optional )
    Return type:

    OrderResponse

    UpdateQuantity( quantity, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with quantity specified in quantity and with tag specified in quantity

    Parameters:
    • quantity ( decimal )
    • tag ( string, optional )
    Return type:

    OrderResponse

    UpdateStopPrice( stopPrice, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with stop price specified in stopPrice and with tag specified in tag

    Parameters:
    • stopPrice ( decimal )
    • tag ( string, optional )
    Return type:

    OrderResponse

    UpdateStopTrailingAmount( trailingAmount, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with stop trailing amount specified in trailingAmount and with tag specified in tag

    Parameters:
    • trailingAmount ( decimal )
    • tag ( string, optional )
    Return type:

    OrderResponse

    UpdateTag( tag )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with tag specified in tag

    Parameters:
    • tag ( string )
    Return type:

    OrderResponse

    UpdateTriggerPrice( triggerPrice, tag=None )

    Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with trigger price specified in triggerPrice and with tag specified in tag

    Parameters:
    • triggerPrice ( decimal )
    • tag ( string, optional )
    Return type:

    OrderResponse

    property AverageFillPrice

    Gets the average fill price for this ticket. If no fills have been processed then this will return a value of zero.

    Returns:

    Gets the average fill price for this ticket. If no fills have been processed then this will return a value of zero.

    Return type:

    decimal

    property CancelRequest

    Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null

    Returns:

    Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null

    Return type:

    CancelOrderRequest

    property HasOrder

    Returns true if the order has been set for this ticket

    Returns:

    Returns true if the order has been set for this ticket

    Return type:

    bool

    property OrderClosed

    Gets a wait handle that can be used to wait until this order has filled

    Returns:

    Gets a wait handle that can be used to wait until this order has filled

    Return type:

    WaitHandle

    property OrderEvents

    Gets a list of all order events for this ticket

    Returns:

    Gets a list of all order events for this ticket

    Return type:

    IReadOnlyList<OrderEvent>

    property OrderId

    Gets the order id of this ticket

    Returns:

    Gets the order id of this ticket

    Return type:

    Int32

    property OrderSet

    Gets a wait handle that can be used to wait until the order has been set

    Returns:

    Gets a wait handle that can be used to wait until the order has been set

    Return type:

    WaitHandle

    property OrderType

    Gets the type of order

    Returns:

    Gets the type of order

    Return type:

    OrderType

    property Quantity

    Gets the number of units ordered

    Returns:

    Gets the number of units ordered

    Return type:

    decimal

    property QuantityFilled

    Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.

    Returns:

    Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.

    Return type:

    decimal

    property SecurityType

    Gets the Symbol 's SecurityType

    Returns:

    Gets the Symbol 's SecurityType

    Return type:

    SecurityType

    property Status

    Gets the current status of this order ticket

    Returns:

    Gets the current status of this order ticket

    Return type:

    OrderStatus

    property SubmitRequest

    Gets the SubmitOrderRequest that initiated this order

    Returns:

    Gets the SubmitOrderRequest that initiated this order

    Return type:

    SubmitOrderRequest

    property Symbol

    Gets the symbol being ordered

    Returns:

    Gets the symbol being ordered

    Return type:

    Symbol

    property Tag

    Gets the order's current tag

    Returns:

    Gets the order's current tag

    Return type:

    string

    property Time

    Gets the time this order was last updated

    Returns:

    Gets the time this order was last updated

    Return type:

    DateTime

    property UpdateRequests

    Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id

    Returns:

    Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id

    Return type:

    IReadOnlyList<UpdateOrderRequest>

    Piercing

    class QuantConnect.Indicators.CandlestickPatterns.Piercing [source]

    Piercing candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Piercing

    class QuantConnect.Indicators.CandlestickPatterns.Piercing [source]

    Piercing candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Resolution

    enum QuantConnect.Resolution [source]

    Resolution of data requested.

    field DAILY

    Daily Resolution (4)

    Returns:

    Daily Resolution (4)

    Return type:

    Resolution

    field HOUR

    Hour Resolution (3)

    Returns:

    Hour Resolution (3)

    Return type:

    Resolution

    field MINUTE

    Minute Resolution (2)

    Returns:

    Minute Resolution (2)

    Return type:

    Resolution

    field SECOND

    Second Resolution (1)

    Returns:

    Second Resolution (1)

    Return type:

    Resolution

    field TICK

    Tick Resolution (0)

    Returns:

    Tick Resolution (0)

    Return type:

    Resolution

    Resolution

    enum QuantConnect.Resolution [source]

    Resolution of data requested.

    field Daily

    Daily Resolution (4)

    Returns:

    Daily Resolution (4)

    Return type:

    Resolution

    field Hour

    Hour Resolution (3)

    Returns:

    Hour Resolution (3)

    Return type:

    Resolution

    field Minute

    Minute Resolution (2)

    Returns:

    Minute Resolution (2)

    Return type:

    Resolution

    field Second

    Second Resolution (1)

    Returns:

    Second Resolution (1)

    Return type:

    Resolution

    field Tick

    Tick Resolution (0)

    Returns:

    Tick Resolution (0)

    Return type:

    Resolution

    RickshawMan

    class QuantConnect.Indicators.CandlestickPatterns.RickshawMan [source]

    Rickshaw Man candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RickshawMan

    class QuantConnect.Indicators.CandlestickPatterns.RickshawMan [source]

    Rickshaw Man candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    RiseFallThreeMethods

    class QuantConnect.Indicators.CandlestickPatterns.RiseFallThreeMethods [source]

    Rising/Falling Three Methods candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    RiseFallThreeMethods

    class QuantConnect.Indicators.CandlestickPatterns.RiseFallThreeMethods [source]

    Rising/Falling Three Methods candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ScheduledEvent

    class QuantConnect.Scheduling.ScheduledEvent [source]

    Real time self scheduling event

    property enabled

    Gets or sets whether this event is enabled

    Returns:

    Gets or sets whether this event is enabled

    Return type:

    bool

    property name

    Gets an identifier for this event

    Returns:

    Gets an identifier for this event

    Return type:

    str

    property next_event_utc_time

    Gets the next time this scheduled event will fire in UTC

    Returns:

    Gets the next time this scheduled event will fire in UTC

    Return type:

    datetime

    field ALGORITHM_END_OF_DAY_DELTA

    Gets the default time before midnight end of day events will fire

    Returns:

    Gets the default time before midnight end of day events will fire

    Return type:

    timedelta

    field SECURITY_END_OF_DAY_DELTA

    Gets the default time before market close end of trading day events will fire

    Returns:

    Gets the default time before market close end of trading day events will fire

    Return type:

    timedelta

    ScheduledEvent

    class QuantConnect.Scheduling.ScheduledEvent [source]

    Real time self scheduling event

    property Enabled

    Gets or sets whether this event is enabled

    Returns:

    Gets or sets whether this event is enabled

    Return type:

    bool

    property Name

    Gets an identifier for this event

    Returns:

    Gets an identifier for this event

    Return type:

    string

    property NextEventUtcTime

    Gets the next time this scheduled event will fire in UTC

    Returns:

    Gets the next time this scheduled event will fire in UTC

    Return type:

    DateTime

    field AlgorithmEndOfDayDelta

    Gets the default time before midnight end of day events will fire

    Returns:

    Gets the default time before midnight end of day events will fire

    Return type:

    TimeSpan

    field SecurityEndOfDayDelta

    Gets the default time before market close end of trading day events will fire

    Returns:

    Gets the default time before market close end of trading day events will fire

    Return type:

    TimeSpan

    Security

    class QuantConnect.Securities.Security [source]

    A base vehicle properties class for providing a common interface to all assets in QuantConnect.

    clear()

    Removes every custom property that had been set.

    get_last_data()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    refresh_data_normalization_mode_property()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    set_buying_power_model( buying_power_model )

    Sets the buying power model

    Parameters:
    • buying_power_model ( IBuyingPowerModel )
    set_buying_power_model( py_object )

    Sets the buying power model

    Parameters:
    • py_object ( PyObject )
    set_data_filter( py_object )

    Set Security Data Filter

    Parameters:
    • py_object ( PyObject )
    set_data_filter( data_filter )

    Set Security Data Filter

    Parameters:
    • data_filter ( ISecurityDataFilter )
    set_fee_model( feel_model )

    Sets the fee model

    Parameters:
    • feel_model ( PyObject | IFeeModel )
    set_fill_model( fill_model )

    Sets the fill model

    Parameters:
    • fill_model ( PyObject | IFillModel )
    set_leverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( float )
    set_local_time_keeper( local_time_keeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    set_margin_interest_rate_model( margin_interest_rate_model )

    Sets the margin interests rate model

    Parameters:
    • margin_interest_rate_model ( IMarginInterestRateModel )
    set_margin_interest_rate_model( py_object )

    Sets the margin interests rate model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( py_object )

    Sets the margin model

    Parameters:
    • py_object ( PyObject )
    set_margin_model( margin_model )

    Sets the margin model

    Parameters:
    • margin_model ( IBuyingPowerModel )
    set_market_price( data )

    Update any security properties based on the latest market data and time

    Parameters:
    set_settlement_model( settlement_model )

    Sets the settlement model

    Parameters:
    • settlement_model ( PyObject | ISettlementModel )
    set_shortable_provider( py_object )

    Set Python Shortable Provider for this Security

    Parameters:
    • py_object ( PyObject )
    set_shortable_provider( shortable_provider )

    Set Python Shortable Provider for this Security

    Parameters:
    set_slippage_model( slippage_model )

    Sets the slippage model

    Parameters:
    • slippage_model ( ISlippageModel | PyObject )
    set_volatility_model( volatility_model )

    Sets the volatility model

    Parameters:
    • volatility_model ( PyObject | IVolatilityModel )
    update( data, data_type, contains_fill_forward_data=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( List[BaseData] )
    • data_type ( Type )
    • contains_fill_forward_data ( bool, optional )
    property ask_price

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    float

    property ask_size

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    float

    property bid_price

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    float

    property bid_size

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    float

    property buying_power_model

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    float

    property data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property data_filter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property fee_model

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property fill_model

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property has_data

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property high

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    float

    property hold_stock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property is_delisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property is_tradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property item

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    property leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    float

    property local_time

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    datetime

    property low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    float

    property margin_interest_rate_model

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property margin_model

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    float

    property open_interest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property portfolio_model

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    float

    property price_variation_model

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property quote_currency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property settlement_model

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property shortable_provider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IintableProvider

    property slippage_model

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List[SubscriptionDataConfig]

    property symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property symbol_properties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property volatility_model

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    float

    field NULL_LEVERAGE

    A null security leverage value

    Returns:

    A null security leverage value

    Return type:

    float

    Security

    class QuantConnect.Securities.Security [source]

    A base vehicle properties class for providing a common interface to all assets in QuantConnect.

    Clear()

    Removes every custom property that had been set.

    GetLastData()

    Get the last price update set to the security if any else null

    Return type:

    BaseData

    RefreshDataNormalizationModeProperty()

    This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

    SetBuyingPowerModel( buyingPowerModel )

    Sets the buying power model

    Parameters:
    • buyingPowerModel ( IBuyingPowerModel )
    SetBuyingPowerModel( pyObject )

    Sets the buying power model

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( pyObject )

    Set Security Data Filter

    Parameters:
    • pyObject ( PyObject )
    SetDataFilter( dataFilter )

    Set Security Data Filter

    Parameters:
    • dataFilter ( ISecurityDataFilter )
    SetFeeModel( feelModel )

    Sets the fee model

    Parameters:
    • feelModel ( PyObject | IFeeModel )
    SetFillModel( fillModel )

    Sets the fill model

    Parameters:
    • fillModel ( PyObject | IFillModel )
    SetLeverage( leverage )

    Set the leverage parameter for this security

    Parameters:
    • leverage ( decimal )
    SetLocalTimeKeeper( localTimeKeeper )

    Sets the LocalTimeKeeper to be used for this Security . This is the source of this instance's time.

    Parameters:
    SetMarginInterestRateModel( marginInterestRateModel )

    Sets the margin interests rate model

    Parameters:
    • marginInterestRateModel ( IMarginInterestRateModel )
    SetMarginInterestRateModel( pyObject )

    Sets the margin interests rate model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( pyObject )

    Sets the margin model

    Parameters:
    • pyObject ( PyObject )
    SetMarginModel( marginModel )

    Sets the margin model

    Parameters:
    • marginModel ( IBuyingPowerModel )
    SetMarketPrice( data )

    Update any security properties based on the latest market data and time

    Parameters:
    SetSettlementModel( settlementModel )

    Sets the settlement model

    Parameters:
    • settlementModel ( PyObject | ISettlementModel )
    SetShortableProvider( pyObject )

    Set Python Shortable Provider for this Security

    Parameters:
    • pyObject ( PyObject )
    SetShortableProvider( shortableProvider )

    Set Python Shortable Provider for this Security

    Parameters:
    • shortableProvider ( IShortableProvider )
    SetSlippageModel( slippageModel )

    Sets the slippage model

    Parameters:
    • slippageModel ( ISlippageModel | PyObject )
    SetVolatilityModel( volatilityModel )

    Sets the volatility model

    Parameters:
    • volatilityModel ( PyObject | IVolatilityModel )
    Update( data, dataType, containsFillForwardData=None )

    Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

    Parameters:
    • data ( IReadOnlyList<BaseData> )
    • dataType ( Type )
    • containsFillForwardData ( Boolean, optional )
    property AskPrice

    Gets the most recent ask price if available

    Returns:

    Gets the most recent ask price if available

    Return type:

    decimal

    property AskSize

    Gets the most recent ask size if available

    Returns:

    Gets the most recent ask size if available

    Return type:

    decimal

    property BidPrice

    Gets the most recent bid price if available

    Returns:

    Gets the most recent bid price if available

    Return type:

    decimal

    property BidSize

    Gets the most recent bid size if available

    Returns:

    Gets the most recent bid size if available

    Return type:

    decimal

    property BuyingPowerModel

    Gets the buying power model used for this security

    Returns:

    Gets the buying power model used for this security

    Return type:

    IBuyingPowerModel

    property Cache

    Data cache for the security to store previous price information.

    Returns:

    Data cache for the security to store previous price information.

    Return type:

    SecurityCache

    property Close

    If this uses tradebar data, return the most recent close.

    Returns:

    If this uses tradebar data, return the most recent close.

    Return type:

    decimal

    property Data

    Provides dynamic access to data in the cache

    Returns:

    Provides dynamic access to data in the cache

    Return type:

    object

    property DataFilter

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Returns:

    Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

    Return type:

    ISecurityDataFilter

    property Exchange

    Exchange class contains the market opening hours, along with pre-post market hours.

    Returns:

    Exchange class contains the market opening hours, along with pre-post market hours.

    Return type:

    SecurityExchange

    property FeeModel

    Fee model used to compute order fees for this security

    Returns:

    Fee model used to compute order fees for this security

    Return type:

    IFeeModel

    property FillModel

    Fill model used to produce fill events for this security

    Returns:

    Fill model used to produce fill events for this security

    Return type:

    IFillModel

    property Fundamentals

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Returns:

    Gets the fundamental data associated with the security if there is any, otherwise null.

    Return type:

    Fundamental

    property HasData

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Returns:

    There has been at least one datapoint since our algorithm started running for us to determine price.

    Return type:

    bool

    property High

    If this uses tradebar data, return the most recent high.

    Returns:

    If this uses tradebar data, return the most recent high.

    Return type:

    decimal

    property HoldStock

    Read only property that checks if we currently own stock in the company.

    Returns:

    Read only property that checks if we currently own stock in the company.

    Return type:

    bool

    property Holdings

    Holdings class contains the portfolio, cash and processes order fills.

    Returns:

    Holdings class contains the portfolio, cash and processes order fills.

    Return type:

    SecurityHolding

    property Invested

    Alias for HoldStock - Do we have any of this security

    Returns:

    Alias for HoldStock - Do we have any of this security

    Return type:

    bool

    property IsDelisted

    True if the security has been delisted from exchanges and is no longer tradable

    Returns:

    True if the security has been delisted from exchanges and is no longer tradable

    Return type:

    bool

    property IsTradable

    Gets or sets whether or not this security should be considered tradable

    Returns:

    Gets or sets whether or not this security should be considered tradable

    Return type:

    bool

    property Leverage

    Leverage for this Security.

    Returns:

    Leverage for this Security.

    Return type:

    decimal

    property LocalTime

    Local time for this market

    Returns:

    Local time for this market

    Return type:

    DateTime

    property Low

    If this uses tradebar data, return the most recent low.

    Returns:

    If this uses tradebar data, return the most recent low.

    Return type:

    decimal

    property MarginInterestRateModel

    Gets or sets the margin interest rate model

    Returns:

    Gets or sets the margin interest rate model

    Return type:

    IMarginInterestRateModel

    property MarginModel

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Returns:

    Gets the buying power model used for this security, an alias for BuyingPowerModel

    Return type:

    IBuyingPowerModel

    property Open

    If this uses tradebar data, return the most recent open.

    Returns:

    If this uses tradebar data, return the most recent open.

    Return type:

    decimal

    property OpenInterest

    Access to the open interest of the security today

    Returns:

    Access to the open interest of the security today

    Return type:

    int

    property PortfolioModel

    Gets the portfolio model used by this security

    Returns:

    Gets the portfolio model used by this security

    Return type:

    ISecurityPortfolioModel

    property Price

    Get the current value of the security.

    Returns:

    Get the current value of the security.

    Return type:

    decimal

    property PriceVariationModel

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Returns:

    Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

    Return type:

    IPriceVariationModel

    property QuoteCurrency

    Gets the Cash object used for converting the quote currency to the account currency

    Returns:

    Gets the Cash object used for converting the quote currency to the account currency

    Return type:

    Cash

    property SettlementModel

    Gets the settlement model used for this security

    Returns:

    Gets the settlement model used for this security

    Return type:

    ISettlementModel

    property ShortableProvider

    This securities IShortableProvider

    Returns:

    This securities IShortableProvider

    Return type:

    IShortableProvider

    property SlippageModel

    Slippage model use to compute slippage of market orders

    Returns:

    Slippage model use to compute slippage of market orders

    Return type:

    ISlippageModel

    property Subscriptions

    Gets all the subscriptions for this security

    Returns:

    Gets all the subscriptions for this security

    Return type:

    List<SubscriptionDataConfig>

    property Symbol

    Symbol for the asset.

    Returns:

    Symbol for the asset.

    Return type:

    Symbol

    property SymbolProperties

    Gets the symbol properties for this security

    Returns:

    Gets the symbol properties for this security

    Return type:

    SymbolProperties

    property Type

    Type of the security.

    Returns:

    Type of the security.

    Return type:

    SecurityType

    property VolatilityModel

    Gets the volatility model used for this security

    Returns:

    Gets the volatility model used for this security

    Return type:

    IVolatilityModel

    property Volume

    Access to the volume of the equity today

    Returns:

    Access to the volume of the equity today

    Return type:

    decimal

    property [System.String]

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Returns:

    Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

    Return type:

    object

    field NullLeverage

    A null security leverage value

    Returns:

    A null security leverage value

    Return type:

    decimal

    SecurityChanges

    class QuantConnect.Data.UniverseSelection.SecurityChanges [source]

    Defines the additions and subtractions to the algorithm's security subscriptions

    property added_securities

    Gets the symbols that were added by universe selection

    Returns:

    Gets the symbols that were added by universe selection

    Return type:

    List[Security]

    property count

    Gets the total count of added and removed securities

    Returns:

    Gets the total count of added and removed securities

    Return type:

    int

    property filter_custom_securities

    True will filter out custom securities from the AddedSecurities and RemovedSecurities properties

    Returns:

    True will filter out custom securities from the AddedSecurities and RemovedSecurities properties

    Return type:

    bool

    property filter_internal_securities

    True will filter out internal securities from the AddedSecurities and RemovedSecurities properties

    Returns:

    True will filter out internal securities from the AddedSecurities and RemovedSecurities properties

    Return type:

    bool

    property removed_securities

    Gets the symbols that were removed by universe selection. This list may include symbols that were removed, but are still receiving data due to existing holdings or open orders

    Returns:

    Gets the symbols that were removed by universe selection. This list may include symbols that were removed, but are still receiving data due to existing holdings or open orders

    Return type:

    List[Security]

    field NONE

    Gets an instance that represents no changes have been made

    Returns:

    Gets an instance that represents no changes have been made

    Return type:

    SecurityChanges

    SecurityChanges

    class QuantConnect.Data.UniverseSelection.SecurityChanges [source]

    Defines the additions and subtractions to the algorithm's security subscriptions

    property AddedSecurities

    Gets the symbols that were added by universe selection

    Returns:

    Gets the symbols that were added by universe selection

    Return type:

    IReadOnlyList<Security>

    property Count

    Gets the total count of added and removed securities

    Returns:

    Gets the total count of added and removed securities

    Return type:

    Int32

    property FilterCustomSecurities

    True will filter out custom securities from the AddedSecurities and RemovedSecurities properties

    Returns:

    True will filter out custom securities from the AddedSecurities and RemovedSecurities properties

    Return type:

    bool

    property FilterInternalSecurities

    True will filter out internal securities from the AddedSecurities and RemovedSecurities properties

    Returns:

    True will filter out internal securities from the AddedSecurities and RemovedSecurities properties

    Return type:

    bool

    property RemovedSecurities

    Gets the symbols that were removed by universe selection. This list may include symbols that were removed, but are still receiving data due to existing holdings or open orders

    Returns:

    Gets the symbols that were removed by universe selection. This list may include symbols that were removed, but are still receiving data due to existing holdings or open orders

    Return type:

    IReadOnlyList<Security>

    field None

    Gets an instance that represents no changes have been made

    Returns:

    Gets an instance that represents no changes have been made

    Return type:

    SecurityChanges

    SecurityExchangeHours

    class QuantConnect.Securities.SecurityExchangeHours [source]

    Represents the schedule of a security exchange. This includes daily regular and extended market hours as well as holidays, early closes and late opens.

    get_market_hours( local_date_time )

    Helper to access the market hours field based on the day of week

    Parameters:
    • local_date_time ( datetime )
    Return type:

    LocalMarketHours

    get_next_market_close( local_date_time, extended_market_hours )

    Gets the local date time corresponding to the next market close following the specified time

    Parameters:
    • local_date_time ( datetime )
    • extended_market_hours ( bool )
    Return type:

    datetime

    get_next_market_open( local_date_time, extended_market_hours )

    Gets the local date time corresponding to the next market open following the specified time

    Parameters:
    • local_date_time ( datetime )
    • extended_market_hours ( bool )
    Return type:

    datetime

    get_next_trading_day( date )

    Gets the next trading day

    Parameters:
    • date ( datetime )
    Return type:

    datetime

    get_previous_market_open( local_date_time, extended_market_hours )

    Gets the local date time corresponding to the previous market open to the specified time

    Parameters:
    • local_date_time ( datetime )
    • extended_market_hours ( bool )
    Return type:

    datetime

    get_previous_trading_day( local_date )

    Gets the previous trading day

    Parameters:
    • local_date ( datetime )
    Return type:

    datetime

    is_date_open( local_date_time )

    Determines if the exchange will be open on the date specified by the local date time

    Parameters:
    • local_date_time ( datetime )
    Return type:

    bool

    is_open( start_local_date_time, end_local_date_time, extended_market_hours )

    Determines if the exchange is open at the specified local date time.

    Parameters:
    • start_local_date_time ( datetime )
    • end_local_date_time ( datetime )
    • extended_market_hours ( bool )
    Return type:

    bool

    is_open( local_date_time, extended_market_hours )

    Determines if the exchange is open at the specified local date time.

    Parameters:
    • local_date_time ( datetime )
    • extended_market_hours ( bool )
    Return type:

    bool

    property early_closes

    Gets the early closes for this exchange

    Returns:

    Gets the early closes for this exchange

    Return type:

    Dict[datetime, timedelta]

    property holidays

    Gets the holidays for the exchange

    Returns:

    Gets the holidays for the exchange

    Return type:

    HashSet[datetime]

    property is_market_always_open

    Checks whether the market is always open or not

    Returns:

    Checks whether the market is always open or not

    Return type:

    bool

    property late_opens

    Gets the late opens for this exchange

    Returns:

    Gets the late opens for this exchange

    Return type:

    Dict[datetime, timedelta]

    property market_hours

    Gets the market hours for this exchange

    Returns:

    Gets the market hours for this exchange

    Return type:

    Dict[DayOfWeek, LocalMarketHours]

    property regular_market_duration

    Gets the most common tradable time during the market week. For a normal US equity trading day this is 6.5 hours. This does NOT account for extended market hours and only considers Market

    Returns:

    Gets the most common tradable time during the market week. For a normal US equity trading day this is 6.5 hours. This does NOT account for extended market hours and only considers Market

    Return type:

    timedelta

    property time_zone

    Gets the time zone this exchange resides in

    Returns:

    Gets the time zone this exchange resides in

    Return type:

    datetimeZone

    SecurityExchangeHours

    class QuantConnect.Securities.SecurityExchangeHours [source]

    Represents the schedule of a security exchange. This includes daily regular and extended market hours as well as holidays, early closes and late opens.

    GetMarketHours( localDateTime )

    Helper to access the market hours field based on the day of week

    Parameters:
    • localDateTime ( DateTime )
    Return type:

    LocalMarketHours

    GetNextMarketClose( localDateTime, extendedMarketHours )

    Gets the local date time corresponding to the next market close following the specified time

    Parameters:
    • localDateTime ( DateTime )
    • extendedMarketHours ( bool )
    Return type:

    DateTime

    GetNextMarketOpen( localDateTime, extendedMarketHours )

    Gets the local date time corresponding to the next market open following the specified time

    Parameters:
    • localDateTime ( DateTime )
    • extendedMarketHours ( bool )
    Return type:

    DateTime

    GetNextTradingDay( date )

    Gets the next trading day

    Parameters:
    • date ( DateTime )
    Return type:

    DateTime

    GetPreviousMarketOpen( localDateTime, extendedMarketHours )

    Gets the local date time corresponding to the previous market open to the specified time

    Parameters:
    • localDateTime ( DateTime )
    • extendedMarketHours ( bool )
    Return type:

    DateTime

    GetPreviousTradingDay( localDate )

    Gets the previous trading day

    Parameters:
    • localDate ( DateTime )
    Return type:

    DateTime

    IsDateOpen( localDateTime )

    Determines if the exchange will be open on the date specified by the local date time

    Parameters:
    • localDateTime ( DateTime )
    Return type:

    Boolean

    IsOpen( startLocalDateTime, endLocalDateTime, extendedMarketHours )

    Determines if the exchange is open at the specified local date time.

    Parameters:
    • startLocalDateTime ( DateTime )
    • endLocalDateTime ( DateTime )
    • extendedMarketHours ( bool )
    Return type:

    Boolean

    IsOpen( localDateTime, extendedMarketHours )

    Determines if the exchange is open at the specified local date time.

    Parameters:
    • localDateTime ( DateTime )
    • extendedMarketHours ( bool )
    Return type:

    Boolean

    property EarlyCloses

    Gets the early closes for this exchange

    Returns:

    Gets the early closes for this exchange

    Return type:

    IReadOnlyDictionary<DateTime, TimeSpan>

    property Holidays

    Gets the holidays for the exchange

    Returns:

    Gets the holidays for the exchange

    Return type:

    HashSet<DateTime>

    property IsMarketAlwaysOpen

    Checks whether the market is always open or not

    Returns:

    Checks whether the market is always open or not

    Return type:

    bool

    property LateOpens

    Gets the late opens for this exchange

    Returns:

    Gets the late opens for this exchange

    Return type:

    IReadOnlyDictionary<DateTime, TimeSpan>

    property MarketHours

    Gets the market hours for this exchange

    Returns:

    Gets the market hours for this exchange

    Return type:

    IReadOnlyDictionary<DayOfWeek, LocalMarketHours>

    property RegularMarketDuration

    Gets the most common tradable time during the market week. For a normal US equity trading day this is 6.5 hours. This does NOT account for extended market hours and only considers Market

    Returns:

    Gets the most common tradable time during the market week. For a normal US equity trading day this is 6.5 hours. This does NOT account for extended market hours and only considers Market

    Return type:

    TimeSpan

    property TimeZone

    Gets the time zone this exchange resides in

    Returns:

    Gets the time zone this exchange resides in

    Return type:

    DateTimeZone

    SecurityType

    enum QuantConnect.SecurityType [source]

    Type of tradable security / underlying asset

    field BASE

    Base class for all security types (0)

    Returns:

    Base class for all security types (0)

    Return type:

    SecurityType

    field CFD

    Contract For a Difference Security Type (6)

    Returns:

    Contract For a Difference Security Type (6)

    Return type:

    SecurityType

    field COMMODITY

    Commodity Security Type (3)

    Returns:

    Commodity Security Type (3)

    Return type:

    SecurityType

    field CRYPTO

    Cryptocurrency Security Type (7)

    Returns:

    Cryptocurrency Security Type (7)

    Return type:

    SecurityType

    field CRYPTO_FUTURE

    Crypto Future Type (11)

    Returns:

    Crypto Future Type (11)

    Return type:

    SecurityType

    field EQUITY

    US Equity Security (1)

    Returns:

    US Equity Security (1)

    Return type:

    SecurityType

    field FOREX

    FOREX Security (4)

    Returns:

    FOREX Security (4)

    Return type:

    SecurityType

    field FUTURE

    Future Security Type (5)

    Returns:

    Future Security Type (5)

    Return type:

    SecurityType

    field FUTURE_OPTION

    Futures Options Security Type (8)

    Returns:

    Futures Options Security Type (8)

    Return type:

    SecurityType

    field INDEX

    Index Security Type (9)

    Returns:

    Index Security Type (9)

    Return type:

    SecurityType

    field INDEX_OPTION

    Index Option Security Type (10)

    Returns:

    Index Option Security Type (10)

    Return type:

    SecurityType

    field OPTION

    Option Security Type (2)

    Returns:

    Option Security Type (2)

    Return type:

    SecurityType

    SecurityType

    enum QuantConnect.SecurityType [source]

    Type of tradable security / underlying asset

    field Base

    Base class for all security types (0)

    Returns:

    Base class for all security types (0)

    Return type:

    SecurityType

    field Cfd

    Contract For a Difference Security Type (6)

    Returns:

    Contract For a Difference Security Type (6)

    Return type:

    SecurityType

    field Commodity

    Commodity Security Type (3)

    Returns:

    Commodity Security Type (3)

    Return type:

    SecurityType

    field Crypto

    Cryptocurrency Security Type (7)

    Returns:

    Cryptocurrency Security Type (7)

    Return type:

    SecurityType

    field CryptoFuture

    Crypto Future Type (11)

    Returns:

    Crypto Future Type (11)

    Return type:

    SecurityType

    field Equity

    US Equity Security (1)

    Returns:

    US Equity Security (1)

    Return type:

    SecurityType

    field Forex

    FOREX Security (4)

    Returns:

    FOREX Security (4)

    Return type:

    SecurityType

    field Future

    Future Security Type (5)

    Returns:

    Future Security Type (5)

    Return type:

    SecurityType

    field FutureOption

    Futures Options Security Type (8)

    Returns:

    Futures Options Security Type (8)

    Return type:

    SecurityType

    field Index

    Index Security Type (9)

    Returns:

    Index Security Type (9)

    Return type:

    SecurityType

    field IndexOption

    Index Option Security Type (10)

    Returns:

    Index Option Security Type (10)

    Return type:

    SecurityType

    field Option

    Option Security Type (2)

    Returns:

    Option Security Type (2)

    Return type:

    SecurityType

    SeparatingLines

    class QuantConnect.Indicators.CandlestickPatterns.SeparatingLines [source]

    Separating Lines candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SeparatingLines

    class QuantConnect.Indicators.CandlestickPatterns.SeparatingLines [source]

    Separating Lines candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    SeriesType

    enum QuantConnect.SeriesType [source]

    Available types of chart series

    field BAR

    Bar chart (3)

    Returns:

    Bar chart (3)

    Return type:

    SeriesType

    field CANDLE

    Charts (2)

    Returns:

    Charts (2)

    Return type:

    SeriesType

    field FLAG

    Flag indicators (4)

    Returns:

    Flag indicators (4)

    Return type:

    SeriesType

    field HEATMAP

    Heatmap Plot (9) -- NOTE: 8 is reserved

    Returns:

    Heatmap Plot (9) -- NOTE: 8 is reserved

    Return type:

    SeriesType

    field LINE

    Line Plot for Value Types (0)

    Returns:

    Line Plot for Value Types (0)

    Return type:

    SeriesType

    field PIE

    Pie chart (6)

    Returns:

    Pie chart (6)

    Return type:

    SeriesType

    field SCATTER

    Scatter Plot for Chart Distinct Types (1)

    Returns:

    Scatter Plot for Chart Distinct Types (1)

    Return type:

    SeriesType

    field SCATTER_3D

    Scatter 3D Plot (10)

    Returns:

    Scatter 3D Plot (10)

    Return type:

    SeriesType

    field STACKED_AREA

    100% area chart showing relative proportions of series values at each time index (5)

    Returns:

    100% area chart showing relative proportions of series values at each time index (5)

    Return type:

    SeriesType

    field TREEMAP

    Treemap Plot (7)

    Returns:

    Treemap Plot (7)

    Return type:

    SeriesType

    SeriesType

    enum QuantConnect.SeriesType [source]

    Available types of chart series

    field Bar

    Bar chart (3)

    Returns:

    Bar chart (3)

    Return type:

    SeriesType

    field Candle

    Charts (2)

    Returns:

    Charts (2)

    Return type:

    SeriesType

    field Flag

    Flag indicators (4)

    Returns:

    Flag indicators (4)

    Return type:

    SeriesType

    field Heatmap

    Heatmap Plot (9) -- NOTE: 8 is reserved

    Returns:

    Heatmap Plot (9) -- NOTE: 8 is reserved

    Return type:

    SeriesType

    field Line

    Line Plot for Value Types (0)

    Returns:

    Line Plot for Value Types (0)

    Return type:

    SeriesType

    field Pie

    Pie chart (6)

    Returns:

    Pie chart (6)

    Return type:

    SeriesType

    field Scatter

    Scatter Plot for Chart Distinct Types (1)

    Returns:

    Scatter Plot for Chart Distinct Types (1)

    Return type:

    SeriesType

    field Scatter3d

    Scatter 3D Plot (10)

    Returns:

    Scatter 3D Plot (10)

    Return type:

    SeriesType

    field StackedArea

    100% area chart showing relative proportions of series values at each time index (5)

    Returns:

    100% area chart showing relative proportions of series values at each time index (5)

    Return type:

    SeriesType

    field Treemap

    Treemap Plot (7)

    Returns:

    Treemap Plot (7)

    Return type:

    SeriesType

    ShootingStar

    class QuantConnect.Indicators.CandlestickPatterns.ShootingStar [source]

    Shooting Star candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ShootingStar

    class QuantConnect.Indicators.CandlestickPatterns.ShootingStar [source]

    Shooting Star candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ShortLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle [source]

    Short Line Candle candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ShortLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle [source]

    Short Line Candle candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Slice

    class QuantConnect.Data.Slice [source]

    Provides a data structure for all of an algorithm's data at a single time step

    clear()

    Removes all keys and values from the IExtendedDictionary .

    contains_key( symbol )

    Determines whether this instance contains data for the specified symbol

    Parameters:
    Return type:

    bool

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get()

    Gets the DataDictionary for all data of the specified type

    get( symbol )

    Gets the DataDictionary for all data of the specified type

    Parameters:
    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    Object

    get( type )

    Gets the DataDictionary for all data of the specified type

    Parameters:
    • type ( Type )
    Return type:

    Object

    get_enumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    Dict[Symbol, BaseData]

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    merge_slice( input_slice )

    Merge two slice with same Time

    Parameters:
    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    • symbol ( Symbol )
    • default_value ( object )
    Return type:

    Object

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    remove( symbol )

    Removes the value with the specified Symbol

    Parameters:
    Return type:

    bool

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    • symbol ( Symbol )
    • default_value ( object )
    Return type:

    Object

    try_get_value( symbol, data )

    Gets the data associated with the specified symbol

    Parameters:
    Return type:

    bool

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property all_data

    All the data hold in this slice

    Returns:

    All the data hold in this slice

    Return type:

    List[BaseData]

    property bars

    Gets the TradeBars for this slice of data

    Returns:

    Gets the TradeBars for this slice of data

    Return type:

    TradeBars

    property count

    Gets the number of symbols held in this slice

    Returns:

    Gets the number of symbols held in this slice

    Return type:

    int

    property delistings

    Gets the Delistings for this slice of data

    Returns:

    Gets the Delistings for this slice of data

    Return type:

    Delistings

    property dividends

    Gets the Dividends for this slice of data

    Returns:

    Gets the Dividends for this slice of data

    Return type:

    Dividends

    property future_chains

    Gets the FuturesChains for this slice of data

    Returns:

    Gets the FuturesChains for this slice of data

    Return type:

    FuturesChains

    property futures_chains

    Gets the FuturesChains for this slice of data

    Returns:

    Gets the FuturesChains for this slice of data

    Return type:

    FuturesChains

    property has_data

    Gets whether or not this slice has data

    Returns:

    Gets whether or not this slice has data

    Return type:

    bool

    property is_read_only

    Gets a value indicating whether the IDictionary object is read-only.

    Returns:

    Gets a value indicating whether the IDictionary object is read-only.

    Return type:

    bool

    property item

    Gets the data corresponding to the specified symbol. If the requested data is of Tick , then a List will be returned, otherwise, it will be the subscribed type, for example, TradeBar or event UnlinkedData for custom data.

    Returns:

    Gets the data corresponding to the specified symbol. If the requested data is of Tick , then a List will be returned, otherwise, it will be the subscribed type, for example, TradeBar or event UnlinkedData for custom data.

    Return type:

    object

    property keys

    Gets all the symbols in this slice

    Returns:

    Gets all the symbols in this slice

    Return type:

    List[Symbol]

    property margin_interest_rates

    Gets the MarginInterestRates for this slice of data

    Returns:

    Gets the MarginInterestRates for this slice of data

    Return type:

    MarginInterestRates

    property option_chains

    Gets the OptionChains for this slice of data

    Returns:

    Gets the OptionChains for this slice of data

    Return type:

    OptionChains

    property quote_bars

    Gets the QuoteBars for this slice of data

    Returns:

    Gets the QuoteBars for this slice of data

    Return type:

    QuoteBars

    property splits

    Gets the Splits for this slice of data

    Returns:

    Gets the Splits for this slice of data

    Return type:

    Splits

    property symbol_changed_events

    Gets the SymbolChangedEvents for this slice of data

    Returns:

    Gets the SymbolChangedEvents for this slice of data

    Return type:

    SymbolChangedEvents

    property ticks

    Gets the Ticks for this slice of data

    Returns:

    Gets the Ticks for this slice of data

    Return type:

    Ticks

    property time

    Gets the timestamp for this slice of data

    Returns:

    Gets the timestamp for this slice of data

    Return type:

    datetime

    property utc_time

    Gets the timestamp for this slice of data in UTC

    Returns:

    Gets the timestamp for this slice of data in UTC

    Return type:

    datetime

    property values

    Gets a list of all the data in this slice

    Returns:

    Gets a list of all the data in this slice

    Return type:

    List[BaseData]

    Slice

    class QuantConnect.Data.Slice [source]

    Provides a data structure for all of an algorithm's data at a single time step

    Clear()

    Removes all items from the ICollection .

    ContainsKey( symbol )

    Determines whether this instance contains data for the specified symbol

    Parameters:
    Return type:

    Boolean

    Get()

    Gets the DataDictionary for all data of the specified type

    Get( symbol )

    Gets the DataDictionary for all data of the specified type

    Parameters:
    Get( type )

    Gets the DataDictionary for all data of the specified type

    Parameters:
    • type ( Type )
    Return type:

    Object

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    KeyValuePair[Symbol, BaseData]

    MergeSlice( inputSlice )

    Merge two slice with same Time

    Parameters:
    Remove( symbol )

    Removes the value with the specified Symbol

    Parameters:
    Return type:

    Boolean

    TryGetValue( symbol, data )

    Gets the data associated with the specified symbol

    Parameters:
    Return type:

    Boolean

    clear()

    Removes all keys and values from the IExtendedDictionary .

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    Object

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    • symbol ( Symbol )
    • default_value ( object )
    Return type:

    Object

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    • symbol ( Symbol )
    • default_value ( object )
    Return type:

    Object

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property AllData

    All the data hold in this slice

    Returns:

    All the data hold in this slice

    Return type:

    List<BaseData>

    property Bars

    Gets the TradeBars for this slice of data

    Returns:

    Gets the TradeBars for this slice of data

    Return type:

    TradeBars

    property Count

    Gets the number of symbols held in this slice

    Returns:

    Gets the number of symbols held in this slice

    Return type:

    Int32

    property Delistings

    Gets the Delistings for this slice of data

    Returns:

    Gets the Delistings for this slice of data

    Return type:

    Delistings

    property Dividends

    Gets the Dividends for this slice of data

    Returns:

    Gets the Dividends for this slice of data

    Return type:

    Dividends

    property FutureChains

    Gets the FuturesChains for this slice of data

    Returns:

    Gets the FuturesChains for this slice of data

    Return type:

    FuturesChains

    property FuturesChains

    Gets the FuturesChains for this slice of data

    Returns:

    Gets the FuturesChains for this slice of data

    Return type:

    FuturesChains

    property HasData

    Gets whether or not this slice has data

    Returns:

    Gets whether or not this slice has data

    Return type:

    bool

    property IsReadOnly

    Gets a value indicating whether the IDictionary object is read-only.

    Returns:

    Gets a value indicating whether the IDictionary object is read-only.

    Return type:

    bool

    property Keys

    Gets all the symbols in this slice

    Returns:

    Gets all the symbols in this slice

    Return type:

    IReadOnlyList<Symbol>

    property MarginInterestRates

    Gets the MarginInterestRates for this slice of data

    Returns:

    Gets the MarginInterestRates for this slice of data

    Return type:

    MarginInterestRates

    property OptionChains

    Gets the OptionChains for this slice of data

    Returns:

    Gets the OptionChains for this slice of data

    Return type:

    OptionChains

    property QuoteBars

    Gets the QuoteBars for this slice of data

    Returns:

    Gets the QuoteBars for this slice of data

    Return type:

    QuoteBars

    property Splits

    Gets the Splits for this slice of data

    Returns:

    Gets the Splits for this slice of data

    Return type:

    Splits

    property SymbolChangedEvents

    Gets the SymbolChangedEvents for this slice of data

    Returns:

    Gets the SymbolChangedEvents for this slice of data

    Return type:

    SymbolChangedEvents

    property Ticks

    Gets the Ticks for this slice of data

    Returns:

    Gets the Ticks for this slice of data

    Return type:

    Ticks

    property Time

    Gets the timestamp for this slice of data

    Returns:

    Gets the timestamp for this slice of data

    Return type:

    DateTime

    property UtcTime

    Gets the timestamp for this slice of data in UTC

    Returns:

    Gets the timestamp for this slice of data in UTC

    Return type:

    DateTime

    property Values

    Gets a list of all the data in this slice

    Returns:

    Gets a list of all the data in this slice

    Return type:

    IReadOnlyList<BaseData>

    property [QuantConnect.Symbol]

    Gets the data corresponding to the specified symbol. If the requested data is of Tick , then a List will be returned, otherwise, it will be the subscribed type, for example, TradeBar or event UnlinkedData for custom data.

    Returns:

    Gets the data corresponding to the specified symbol. If the requested data is of Tick , then a List will be returned, otherwise, it will be the subscribed type, for example, TradeBar or event UnlinkedData for custom data.

    Return type:

    object

    property [System.String]

    Indexer method for the base dictioanry to access the objects by their symbol.

    Returns:

    Indexer method for the base dictioanry to access the objects by their symbol.

    Return type:

    object

    SpinningTop

    class QuantConnect.Indicators.CandlestickPatterns.SpinningTop [source]

    Spinning Top candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    SpinningTop

    class QuantConnect.Indicators.CandlestickPatterns.SpinningTop [source]

    Spinning Top candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Splits

    class QuantConnect.Data.Market.Splits [source]

    Collection of splits keyed by Symbol

    add( key, value )

    Adds an item to the ICollection .

    Parameters:
    add( item )

    Adds an item to the ICollection .

    Parameters:
    • item ( Dict[Symbol, Split] )
    clear()

    Removes all keys and values from the IExtendedDictionary .

    contains( item )

    Determines whether the ICollection contains a specific value.

    Parameters:
    • item ( Dict[Symbol, Split] )
    Return type:

    bool

    contains_key( key )

    Determines whether the IDictionary contains an element with the specified key.

    Parameters:
    Return type:

    bool

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    copy_to( array, array_index )

    Copies the elements of the ICollection to an Array , starting at a particular Array index.

    Parameters:
    • array ( Dict )
    • array_index ( int )
    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    Split

    get_enumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    Dict[Symbol, Split]

    get_value( key )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Split

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    Return type:

    Split

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    remove( item )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    • item ( Dict[Symbol, Split] )
    Return type:

    bool

    remove( key )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    Return type:

    bool

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    Return type:

    Split

    try_get_value( key, value )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    bool

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property count

    Gets the number of elements contained in the ICollection .

    Returns:

    Gets the number of elements contained in the ICollection .

    Return type:

    int

    property is_read_only

    Gets a value indicating whether the ICollection is read-only.

    Returns:

    Gets a value indicating whether the ICollection is read-only.

    Return type:

    bool

    property item

    Gets or sets the Split with the specified ticker.

    Returns:

    Gets or sets the Split with the specified ticker.

    Return type:

    Split

    property keys

    Gets an ICollection containing the keys of the IDictionary .

    Returns:

    Gets an ICollection containing the keys of the IDictionary .

    Return type:

    List[Symbol]

    property time

    Gets or sets the time associated with this collection of data

    Returns:

    Gets or sets the time associated with this collection of data

    Return type:

    datetime

    property values

    Gets an ICollection containing the values in the IDictionary .

    Returns:

    Gets an ICollection containing the values in the IDictionary .

    Return type:

    List[Split]

    Splits

    class QuantConnect.Data.Market.Splits [source]

    Collection of splits keyed by Symbol

    Add( key, value )

    Adds an item to the ICollection .

    Parameters:
    Add( item )

    Adds an item to the ICollection .

    Parameters:
    • item ( KeyValuePair<Symbol, Split> )
    Clear()

    Removes all items from the ICollection .

    Contains( item )

    Determines whether the ICollection contains a specific value.

    Parameters:
    • item ( KeyValuePair<Symbol, Split> )
    Return type:

    Boolean

    ContainsKey( key )

    Determines whether the IDictionary contains an element with the specified key.

    Parameters:
    Return type:

    Boolean

    CopyTo( array, arrayIndex )

    Copies the elements of the ICollection to an Array , starting at a particular Array index.

    Parameters:
    • array ( KeyValuePair )
    • arrayIndex ( Int32 )
    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    KeyValuePair[Symbol, Split]

    GetValue( key )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Split

    Remove( item )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    • item ( KeyValuePair<Symbol, Split> )
    Return type:

    Boolean

    Remove( key )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    Return type:

    Boolean

    TryGetValue( key, value )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Boolean

    clear()

    Removes all keys and values from the IExtendedDictionary .

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    Split

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    Return type:

    Split

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    Return type:

    Split

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property Count

    Gets the number of elements contained in the ICollection .

    Returns:

    Gets the number of elements contained in the ICollection .

    Return type:

    Int32

    property IsReadOnly

    Gets a value indicating whether the ICollection is read-only.

    Returns:

    Gets a value indicating whether the ICollection is read-only.

    Return type:

    bool

    property Keys

    Gets an ICollection containing the keys of the IDictionary .

    Returns:

    Gets an ICollection containing the keys of the IDictionary .

    Return type:

    ICollection<Symbol>

    property Time

    Gets or sets the time associated with this collection of data

    Returns:

    Gets or sets the time associated with this collection of data

    Return type:

    DateTime

    property Values

    Gets an ICollection containing the values in the IDictionary .

    Returns:

    Gets an ICollection containing the values in the IDictionary .

    Return type:

    ICollection<Split>

    property [QuantConnect.Symbol]

    Gets or sets the Split with the specified Symbol.

    Returns:

    Gets or sets the Split with the specified Symbol.

    Return type:

    Split

    property [System.String]

    Gets or sets the Split with the specified ticker.

    Returns:

    Gets or sets the Split with the specified ticker.

    Return type:

    Split

    StalledPattern

    class QuantConnect.Indicators.CandlestickPatterns.StalledPattern [source]

    Stalled Pattern candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    StalledPattern

    class QuantConnect.Indicators.CandlestickPatterns.StalledPattern [source]

    Stalled Pattern candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    StickSandwich

    class QuantConnect.Indicators.CandlestickPatterns.StickSandwich [source]

    Stick Sandwich candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    StickSandwich

    class QuantConnect.Indicators.CandlestickPatterns.StickSandwich [source]

    Stick Sandwich candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    SubmitOrderRequest

    class QuantConnect.Orders.SubmitOrderRequest [source]

    Defines a request to submit a new order

    set_response( response, status=3 )

    Sets the Response for this request

    Parameters:
    property group_order_manager

    Gets the manager for the combo order. If null, the order is not a combo order.

    Returns:

    Gets the manager for the combo order. If null, the order is not a combo order.

    Return type:

    GroupOrderManager

    property limit_price

    Gets the limit price of the order, zero if not a limit order

    Returns:

    Gets the limit price of the order, zero if not a limit order

    Return type:

    float

    property order_id

    Gets the order id the request acts on

    Returns:

    Gets the order id the request acts on

    Return type:

    int

    property order_properties

    Gets the order properties for this request

    Returns:

    Gets the order properties for this request

    Return type:

    IOrderProperties

    property order_request_type

    Gets Submit

    Returns:

    Gets Submit

    Return type:

    OrderRequestType

    property order_type

    Gets the order type od the order

    Returns:

    Gets the order type od the order

    Return type:

    OrderType

    property quantity

    Gets the quantity of the order

    Returns:

    Gets the quantity of the order

    Return type:

    float

    property response

    Gets the response for this request. If this request was never processed then this will equal Unprocessed . This value is never equal to null.

    Returns:

    Gets the response for this request. If this request was never processed then this will equal Unprocessed . This value is never equal to null.

    Return type:

    OrderResponse

    property security_type

    Gets the security type of the symbol

    Returns:

    Gets the security type of the symbol

    Return type:

    SecurityType

    property status

    Gets the status of this request

    Returns:

    Gets the status of this request

    Return type:

    OrderRequestStatus

    property stop_price

    Gets the stop price of the order, zero if not a stop order

    Returns:

    Gets the stop price of the order, zero if not a stop order

    Return type:

    float

    property symbol

    Gets the symbol to be traded

    Returns:

    Gets the symbol to be traded

    Return type:

    Symbol

    property tag

    Gets a tag for this request

    Returns:

    Gets a tag for this request

    Return type:

    str

    property time

    Gets the UTC time the request was created

    Returns:

    Gets the UTC time the request was created

    Return type:

    datetime

    property trailing_amount

    Trailing amount for a trailing stop order

    Returns:

    Trailing amount for a trailing stop order

    Return type:

    float

    property trailing_as_percentage

    Determines whether the TrailingAmount is a percentage or an absolute currency value

    Returns:

    Determines whether the TrailingAmount is a percentage or an absolute currency value

    Return type:

    bool

    property trigger_price

    Price which must first be reached before a limit order can be submitted.

    Returns:

    Price which must first be reached before a limit order can be submitted.

    Return type:

    float

    SubmitOrderRequest

    class QuantConnect.Orders.SubmitOrderRequest [source]

    Defines a request to submit a new order

    SetResponse( response, status=3 )

    Sets the Response for this request

    Parameters:
    property GroupOrderManager

    Gets the manager for the combo order. If null, the order is not a combo order.

    Returns:

    Gets the manager for the combo order. If null, the order is not a combo order.

    Return type:

    GroupOrderManager

    property LimitPrice

    Gets the limit price of the order, zero if not a limit order

    Returns:

    Gets the limit price of the order, zero if not a limit order

    Return type:

    decimal

    property OrderId

    Gets the order id the request acts on

    Returns:

    Gets the order id the request acts on

    Return type:

    Int32

    property OrderProperties

    Gets the order properties for this request

    Returns:

    Gets the order properties for this request

    Return type:

    IOrderProperties

    property OrderRequestType

    Gets Submit

    Returns:

    Gets Submit

    Return type:

    OrderRequestType

    property OrderType

    Gets the order type od the order

    Returns:

    Gets the order type od the order

    Return type:

    OrderType

    property Quantity

    Gets the quantity of the order

    Returns:

    Gets the quantity of the order

    Return type:

    decimal

    property Response

    Gets the response for this request. If this request was never processed then this will equal Unprocessed . This value is never equal to null.

    Returns:

    Gets the response for this request. If this request was never processed then this will equal Unprocessed . This value is never equal to null.

    Return type:

    OrderResponse

    property SecurityType

    Gets the security type of the symbol

    Returns:

    Gets the security type of the symbol

    Return type:

    SecurityType

    property Status

    Gets the status of this request

    Returns:

    Gets the status of this request

    Return type:

    OrderRequestStatus

    property StopPrice

    Gets the stop price of the order, zero if not a stop order

    Returns:

    Gets the stop price of the order, zero if not a stop order

    Return type:

    decimal

    property Symbol

    Gets the symbol to be traded

    Returns:

    Gets the symbol to be traded

    Return type:

    Symbol

    property Tag

    Gets a tag for this request

    Returns:

    Gets a tag for this request

    Return type:

    string

    property Time

    Gets the UTC time the request was created

    Returns:

    Gets the UTC time the request was created

    Return type:

    DateTime

    property TrailingAmount

    Trailing amount for a trailing stop order

    Returns:

    Trailing amount for a trailing stop order

    Return type:

    decimal

    property TrailingAsPercentage

    Determines whether the TrailingAmount is a percentage or an absolute currency value

    Returns:

    Determines whether the TrailingAmount is a percentage or an absolute currency value

    Return type:

    bool

    property TriggerPrice

    Price which must first be reached before a limit order can be submitted.

    Returns:

    Price which must first be reached before a limit order can be submitted.

    Return type:

    decimal

    SwissArmyKnifeTool

    enum QuantConnect.Indicators.SwissArmyKnifeTool [source]

    The tools of the Swiss Army Knife. Some of the tools lend well to chaining with the "Of" Method, others may be treated as moving averages

    field BAND_PASS

    BandPass Filter (4)

    Returns:

    BandPass Filter (4)

    Return type:

    SwissArmyKnifeTool

    field BUTTER

    Two Pole Butterworth Filter (1)

    Returns:

    Two Pole Butterworth Filter (1)

    Return type:

    SwissArmyKnifeTool

    field GAUSS

    Two Pole Gaussian Filter (0)

    Returns:

    Two Pole Gaussian Filter (0)

    Return type:

    SwissArmyKnifeTool

    field HIGH_PASS

    High Pass Filter (2)

    Returns:

    High Pass Filter (2)

    Return type:

    SwissArmyKnifeTool

    field TWO_POLE_HIGH_PASS

    Two Pole High Pass Filter (3)

    Returns:

    Two Pole High Pass Filter (3)

    Return type:

    SwissArmyKnifeTool

    SwissArmyKnifeTool

    enum QuantConnect.Indicators.SwissArmyKnifeTool [source]

    The tools of the Swiss Army Knife. Some of the tools lend well to chaining with the "Of" Method, others may be treated as moving averages

    field BandPass

    BandPass Filter (4)

    Returns:

    BandPass Filter (4)

    Return type:

    SwissArmyKnifeTool

    field Butter

    Two Pole Butterworth Filter (1)

    Returns:

    Two Pole Butterworth Filter (1)

    Return type:

    SwissArmyKnifeTool

    field Gauss

    Two Pole Gaussian Filter (0)

    Returns:

    Two Pole Gaussian Filter (0)

    Return type:

    SwissArmyKnifeTool

    field HighPass

    High Pass Filter (2)

    Returns:

    High Pass Filter (2)

    Return type:

    SwissArmyKnifeTool

    field TwoPoleHighPass

    Two Pole High Pass Filter (3)

    Returns:

    Two Pole High Pass Filter (3)

    Return type:

    SwissArmyKnifeTool

    Symbol

    class QuantConnect.Symbol [source]

    Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security

    has_canonical()

    Determines whether the symbol has a canonical representation

    Return type:

    bool

    has_underlying_symbol( symbol )

    Determines if the specified symbol is an underlying of this symbol instance

    Parameters:
    Return type:

    bool

    is_canonical()

    Method returns true, if symbol is a derivative canonical symbol

    Return type:

    bool

    update_mapped_symbol( mapped_symbol, contract_depth_offset=0 )

    Creates new symbol with updated mapped symbol. Symbol Mapping: When symbols change over time (e.g. CHASE-> JPM) need to update the symbol requested. Method returns newly created symbol

    Parameters:
    • mapped_symbol ( str )
    • contract_depth_offset ( int, optional )
    Return type:

    Symbol

    property canonical

    Get's the canonical representation of this symbol

    Returns:

    Get's the canonical representation of this symbol

    Return type:

    Symbol

    property cik

    The Central Index Key number (CIK) corresponding to this Symbol

    Returns:

    The Central Index Key number (CIK) corresponding to this Symbol

    Return type:

    int

    property composite_figi

    The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol

    Returns:

    The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol

    Return type:

    str

    property cusip

    The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol

    Returns:

    The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol

    Return type:

    str

    property has_underlying

    Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property

    Returns:

    Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property

    Return type:

    bool

    property id

    Gets the security identifier for this symbol

    Returns:

    Gets the security identifier for this symbol

    Return type:

    SecurityIdentifier

    property isin

    The International Securities Identification Number (ISIN) corresponding to this Symbol

    Returns:

    The International Securities Identification Number (ISIN) corresponding to this Symbol

    Return type:

    str

    property security_type

    Gets the security type of the symbol

    Returns:

    Gets the security type of the symbol

    Return type:

    SecurityType

    property sedol

    The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol

    Returns:

    The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol

    Return type:

    str

    property underlying

    Gets the security underlying symbol, if any

    Returns:

    Gets the security underlying symbol, if any

    Return type:

    Symbol

    property value

    Gets the current symbol for this ticker

    Returns:

    Gets the current symbol for this ticker

    Return type:

    str

    field EMPTY

    Represents an unassigned symbol. This is intended to be used as an uninitialized, default value

    Returns:

    Represents an unassigned symbol. This is intended to be used as an uninitialized, default value

    Return type:

    Symbol

    field NONE

    Represents no symbol. This is intended to be used when no symbol is explicitly intended

    Returns:

    Represents no symbol. This is intended to be used when no symbol is explicitly intended

    Return type:

    Symbol

    Symbol

    class QuantConnect.Symbol [source]

    Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security

    HasCanonical()

    Determines whether the symbol has a canonical representation

    Return type:

    Boolean

    HasUnderlyingSymbol( symbol )

    Determines if the specified symbol is an underlying of this symbol instance

    Parameters:
    Return type:

    Boolean

    IsCanonical()

    Method returns true, if symbol is a derivative canonical symbol

    Return type:

    Boolean

    UpdateMappedSymbol( mappedSymbol, contractDepthOffset=0 )

    Creates new symbol with updated mapped symbol. Symbol Mapping: When symbols change over time (e.g. CHASE-> JPM) need to update the symbol requested. Method returns newly created symbol

    Parameters:
    • mappedSymbol ( string )
    • contractDepthOffset ( UInt32, optional )
    Return type:

    Symbol

    property CIK

    The Central Index Key number (CIK) corresponding to this Symbol

    Returns:

    The Central Index Key number (CIK) corresponding to this Symbol

    Return type:

    Int32

    property CUSIP

    The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol

    Returns:

    The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol

    Return type:

    string

    property Canonical

    Get's the canonical representation of this symbol

    Returns:

    Get's the canonical representation of this symbol

    Return type:

    Symbol

    property CompositeFIGI

    The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol

    Returns:

    The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol

    Return type:

    string

    property HasUnderlying

    Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property

    Returns:

    Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property

    Return type:

    bool

    property ID

    Gets the security identifier for this symbol

    Returns:

    Gets the security identifier for this symbol

    Return type:

    SecurityIdentifier

    property ISIN

    The International Securities Identification Number (ISIN) corresponding to this Symbol

    Returns:

    The International Securities Identification Number (ISIN) corresponding to this Symbol

    Return type:

    string

    property SEDOL

    The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol

    Returns:

    The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol

    Return type:

    string

    property SecurityType

    Gets the security type of the symbol

    Returns:

    Gets the security type of the symbol

    Return type:

    SecurityType

    property Underlying

    Gets the security underlying symbol, if any

    Returns:

    Gets the security underlying symbol, if any

    Return type:

    Symbol

    property Value

    Gets the current symbol for this ticker

    Returns:

    Gets the current symbol for this ticker

    Return type:

    string

    field Empty

    Represents an unassigned symbol. This is intended to be used as an uninitialized, default value

    Returns:

    Represents an unassigned symbol. This is intended to be used as an uninitialized, default value

    Return type:

    Symbol

    field None

    Represents no symbol. This is intended to be used when no symbol is explicitly intended

    Returns:

    Represents no symbol. This is intended to be used when no symbol is explicitly intended

    Return type:

    Symbol

    SymbolChangedEvents

    class QuantConnect.Data.Market.SymbolChangedEvents [source]

    Collection of SymbolChangedEvent keyed by the original, requested symbol

    add( key, value )

    Adds an item to the ICollection .

    Parameters:
    add( item )

    Adds an item to the ICollection .

    Parameters:
    • item ( Dict[Symbol, SymbolChangedEvent] )
    clear()

    Removes all keys and values from the IExtendedDictionary .

    contains( item )

    Determines whether the ICollection contains a specific value.

    Parameters:
    • item ( Dict[Symbol, SymbolChangedEvent] )
    Return type:

    bool

    contains_key( key )

    Determines whether the IDictionary contains an element with the specified key.

    Parameters:
    Return type:

    bool

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    copy_to( array, array_index )

    Copies the elements of the ICollection to an Array , starting at a particular Array index.

    Parameters:
    • array ( Dict )
    • array_index ( int )
    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    SymbolChangedEvent

    get_enumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    Dict[Symbol, SymbolChangedEvent]

    get_value( key )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    SymbolChangedEvent

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    Return type:

    SymbolChangedEvent

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    remove( item )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    • item ( Dict[Symbol, SymbolChangedEvent] )
    Return type:

    bool

    remove( key )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    Return type:

    bool

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    Return type:

    SymbolChangedEvent

    try_get_value( key, value )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    bool

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property count

    Gets the number of elements contained in the ICollection .

    Returns:

    Gets the number of elements contained in the ICollection .

    Return type:

    int

    property is_read_only

    Gets a value indicating whether the ICollection is read-only.

    Returns:

    Gets a value indicating whether the ICollection is read-only.

    Return type:

    bool

    property item

    Gets or sets the SymbolChangedEvent with the specified ticker.

    Returns:

    Gets or sets the SymbolChangedEvent with the specified ticker.

    Return type:

    SymbolChangedEvent

    property keys

    Gets an ICollection containing the keys of the IDictionary .

    Returns:

    Gets an ICollection containing the keys of the IDictionary .

    Return type:

    List[Symbol]

    property time

    Gets or sets the time associated with this collection of data

    Returns:

    Gets or sets the time associated with this collection of data

    Return type:

    datetime

    property values

    Gets an ICollection containing the values in the IDictionary .

    Returns:

    Gets an ICollection containing the values in the IDictionary .

    Return type:

    List[SymbolChangedEvent]

    SymbolChangedEvents

    class QuantConnect.Data.Market.SymbolChangedEvents [source]

    Collection of SymbolChangedEvent keyed by the original, requested symbol

    Add( key, value )

    Adds an item to the ICollection .

    Parameters:
    Add( item )

    Adds an item to the ICollection .

    Parameters:
    • item ( KeyValuePair<Symbol, SymbolChangedEvent> )
    Clear()

    Removes all items from the ICollection .

    Contains( item )

    Determines whether the ICollection contains a specific value.

    Parameters:
    • item ( KeyValuePair<Symbol, SymbolChangedEvent> )
    Return type:

    Boolean

    ContainsKey( key )

    Determines whether the IDictionary contains an element with the specified key.

    Parameters:
    Return type:

    Boolean

    CopyTo( array, arrayIndex )

    Copies the elements of the ICollection to an Array , starting at a particular Array index.

    Parameters:
    • array ( KeyValuePair )
    • arrayIndex ( Int32 )
    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Return type:

    KeyValuePair[Symbol, SymbolChangedEvent]

    GetValue( key )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    SymbolChangedEvent

    Remove( item )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    • item ( KeyValuePair<Symbol, SymbolChangedEvent> )
    Return type:

    Boolean

    Remove( key )

    Removes the first occurrence of a specific object from the ICollection .

    Parameters:
    Return type:

    Boolean

    TryGetValue( key, value )

    Gets the value associated with the specified key.

    Parameters:
    Return type:

    Boolean

    clear()

    Removes all keys and values from the IExtendedDictionary .

    copy()

    Creates a shallow copy of the IExtendedDictionary .

    Return type:

    PyDict

    fromkeys( sequence, value )

    Creates a new dictionary from the given sequence of elements.

    Parameters:
    Return type:

    PyDict

    get( symbol, value )

    Returns the value for the specified Symbol if Symbol is in dictionary.

    Parameters:
    Return type:

    SymbolChangedEvent

    items()

    Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

    Return type:

    PyList

    keys()

    Returns a view object that displays a list of all the Symbol objects in the dictionary

    Return type:

    PyList

    pop( symbol, default_value )

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Parameters:
    Return type:

    SymbolChangedEvent

    popitem()

    Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

    Return type:

    PyTuple

    setdefault( symbol, default_value )

    Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

    Parameters:
    Return type:

    SymbolChangedEvent

    update( other )

    Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

    Parameters:
    • other ( PyObject )
    values()

    Returns a view object that displays a list of all the values in the dictionary.

    Return type:

    PyList

    property Count

    Gets the number of elements contained in the ICollection .

    Returns:

    Gets the number of elements contained in the ICollection .

    Return type:

    Int32

    property IsReadOnly

    Gets a value indicating whether the ICollection is read-only.

    Returns:

    Gets a value indicating whether the ICollection is read-only.

    Return type:

    bool

    property Keys

    Gets an ICollection containing the keys of the IDictionary .

    Returns:

    Gets an ICollection containing the keys of the IDictionary .

    Return type:

    ICollection<Symbol>

    property Time

    Gets or sets the time associated with this collection of data

    Returns:

    Gets or sets the time associated with this collection of data

    Return type:

    DateTime

    property Values

    Gets an ICollection containing the values in the IDictionary .

    Returns:

    Gets an ICollection containing the values in the IDictionary .

    Return type:

    ICollection<SymbolChangedEvent>

    property [QuantConnect.Symbol]

    Gets or sets the SymbolChangedEvent with the specified Symbol.

    Returns:

    Gets or sets the SymbolChangedEvent with the specified Symbol.

    Return type:

    SymbolChangedEvent

    property [System.String]

    Gets or sets the SymbolChangedEvent with the specified ticker.

    Returns:

    Gets or sets the SymbolChangedEvent with the specified ticker.

    Return type:

    SymbolChangedEvent

    SymbolProperties

    class QuantConnect.Securities.SymbolProperties [source]

    Represents common properties for a specific security, uniquely identified by market, symbol and security type

    property contract_multiplier

    The contract multiplier for the security

    Returns:

    The contract multiplier for the security

    Return type:

    float

    property description

    The description of the security

    Returns:

    The description of the security

    Return type:

    str

    property lot_size

    The lot size (lot size of the order) for the security

    Returns:

    The lot size (lot size of the order) for the security

    Return type:

    float

    property market_ticker

    The market ticker

    Returns:

    The market ticker

    Return type:

    str

    property minimum_order_size

    The minimum order size allowed For crypto/forex pairs it's expected to be expressed in base or quote currency i.e For BTC/USD the minimum order size allowed with Coinbase is 0.0001 BTC while on Binance the minimum order size allowed is 10 USD

    Returns:

    The minimum order size allowed For crypto/forex pairs it's expected to be expressed in base or quote currency i.e For BTC/USD the minimum order size allowed with Coinbase is 0.0001 BTC while on Binance the minimum order size allowed is 10 USD

    Return type:

    float

    property minimum_price_variation

    The minimum price variation (tick size) for the security

    Returns:

    The minimum price variation (tick size) for the security

    Return type:

    float

    property price_magnifier

    Allows normalizing live asset prices to US Dollars for Lean consumption. In some exchanges, for some securities, data is expressed in cents like for example for corn futures ('ZC').

    Returns:

    Allows normalizing live asset prices to US Dollars for Lean consumption. In some exchanges, for some securities, data is expressed in cents like for example for corn futures ('ZC').

    Return type:

    float

    property quote_currency

    The quote currency of the security

    Returns:

    The quote currency of the security

    Return type:

    str

    property strike_multiplier

    Scale factor for option's strike price. For some options, such as NQX, the strike price is based on a fraction of the underlying, thus this paramater scales the strike price so that it can be used in comparation with the underlying such as in Int32)

    Returns:

    Scale factor for option's strike price. For some options, such as NQX, the strike price is based on a fraction of the underlying, thus this paramater scales the strike price so that it can be used in comparation with the underlying such as in Int32)

    Return type:

    float

    SymbolProperties

    class QuantConnect.Securities.SymbolProperties [source]

    Represents common properties for a specific security, uniquely identified by market, symbol and security type

    property ContractMultiplier

    The contract multiplier for the security

    Returns:

    The contract multiplier for the security

    Return type:

    decimal

    property Description

    The description of the security

    Returns:

    The description of the security

    Return type:

    string

    property LotSize

    The lot size (lot size of the order) for the security

    Returns:

    The lot size (lot size of the order) for the security

    Return type:

    decimal

    property MarketTicker

    The market ticker

    Returns:

    The market ticker

    Return type:

    string

    property MinimumOrderSize

    The minimum order size allowed For crypto/forex pairs it's expected to be expressed in base or quote currency i.e For BTC/USD the minimum order size allowed with Coinbase is 0.0001 BTC while on Binance the minimum order size allowed is 10 USD

    Returns:

    The minimum order size allowed For crypto/forex pairs it's expected to be expressed in base or quote currency i.e For BTC/USD the minimum order size allowed with Coinbase is 0.0001 BTC while on Binance the minimum order size allowed is 10 USD

    Return type:

    decimal

    property MinimumPriceVariation

    The minimum price variation (tick size) for the security

    Returns:

    The minimum price variation (tick size) for the security

    Return type:

    decimal

    property PriceMagnifier

    Allows normalizing live asset prices to US Dollars for Lean consumption. In some exchanges, for some securities, data is expressed in cents like for example for corn futures ('ZC').

    Returns:

    Allows normalizing live asset prices to US Dollars for Lean consumption. In some exchanges, for some securities, data is expressed in cents like for example for corn futures ('ZC').

    Return type:

    decimal

    property QuoteCurrency

    The quote currency of the security

    Returns:

    The quote currency of the security

    Return type:

    string

    property StrikeMultiplier

    Scale factor for option's strike price. For some options, such as NQX, the strike price is based on a fraction of the underlying, thus this paramater scales the strike price so that it can be used in comparation with the underlying such as in Int32)

    Returns:

    Scale factor for option's strike price. For some options, such as NQX, the strike price is based on a fraction of the underlying, thus this paramater scales the strike price so that it can be used in comparation with the underlying such as in Int32)

    Return type:

    decimal

    Takuri

    class QuantConnect.Indicators.CandlestickPatterns.Takuri [source]

    Takuri (Dragonfly Doji with very long lower shadow) candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Takuri

    class QuantConnect.Indicators.CandlestickPatterns.Takuri [source]

    Takuri (Dragonfly Doji with very long lower shadow) candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    TasukiGap

    class QuantConnect.Indicators.CandlestickPatterns.TasukiGap [source]

    Tasuki Gap candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TasukiGap

    class QuantConnect.Indicators.CandlestickPatterns.TasukiGap [source]

    Tasuki Gap candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ThreeBlackCrows

    class QuantConnect.Indicators.CandlestickPatterns.ThreeBlackCrows [source]

    Three Black Crows candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeBlackCrows

    class QuantConnect.Indicators.CandlestickPatterns.ThreeBlackCrows [source]

    Three Black Crows candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ThreeInside

    class QuantConnect.Indicators.CandlestickPatterns.ThreeInside [source]

    Three Inside Up/Down candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeInside

    class QuantConnect.Indicators.CandlestickPatterns.ThreeInside [source]

    Three Inside Up/Down candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ThreeLineStrike

    class QuantConnect.Indicators.CandlestickPatterns.ThreeLineStrike [source]

    Three Line Strike candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeLineStrike

    class QuantConnect.Indicators.CandlestickPatterns.ThreeLineStrike [source]

    Three Line Strike candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ThreeOutside

    class QuantConnect.Indicators.CandlestickPatterns.ThreeOutside [source]

    Three Outside Up/Down candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeOutside

    class QuantConnect.Indicators.CandlestickPatterns.ThreeOutside [source]

    Three Outside Up/Down candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ThreeStarsInSouth

    class QuantConnect.Indicators.CandlestickPatterns.ThreeStarsInSouth [source]

    Three Stars In The South candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeStarsInSouth

    class QuantConnect.Indicators.CandlestickPatterns.ThreeStarsInSouth [source]

    Three Stars In The South candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ThreeWhiteSoldiers

    class QuantConnect.Indicators.CandlestickPatterns.ThreeWhiteSoldiers [source]

    Three Advancing White Soldiers candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ThreeWhiteSoldiers

    class QuantConnect.Indicators.CandlestickPatterns.ThreeWhiteSoldiers [source]

    Three Advancing White Soldiers candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Thrusting

    class QuantConnect.Indicators.CandlestickPatterns.Thrusting [source]

    Thrusting candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Thrusting

    class QuantConnect.Indicators.CandlestickPatterns.Thrusting [source]

    Thrusting candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    TradeBar

    class QuantConnect.Data.Market.TradeBar [source]

    TradeBar class for second and minute resolution data: An OHLC implementation of the QuantConnect BaseData class with parameters for candles.

    clone( fill_forward )

    Return a new instance clone of this object, used in fill forward

    Parameters:
    • fill_forward ( bool )
    Return type:

    BaseData

    data_time_zone()

    Specifies the data time zone for this data type. This is useful for custom data types

    Return type:

    datetimeZone

    default_resolution()

    Gets the default resolution for this data and security type

    Return type:

    Resolution

    get_source( config, date, is_live_mode )

    Get Source for Custom Data File >> What source file location would you prefer for each type of usage:

    Parameters:
    Return type:

    SubscriptionDataSource

    is_sparse_data()

    Indicates that the data set is expected to be sparse

    Return type:

    bool

    reader( config, line, date, is_live_mode )

    TradeBar Reader: Fetch the data from the QC storage and feed it line by line into the engine.

    Parameters:
    Return type:

    BaseData

    reader( config, stream, date, is_live_mode )

    TradeBar Reader: Fetch the data from the QC storage and feed it line by line into the engine.

    Parameters:
    Return type:

    BaseData

    requires_mapping()

    Indicates if there is support for mapping

    Return type:

    bool

    should_cache_to_security()

    Indicates whether this contains data that should be stored in the security cache

    Return type:

    bool

    supported_resolutions()

    Gets the supported resolution for this data and security type

    Return type:

    List[Resolution]

    update( last_trade, bid_price, ask_price, volume, bid_size, ask_size )

    Update the tradebar - build the bar from this pricing information:

    Parameters:
    • last_trade ( float )
    • bid_price ( float )
    • ask_price ( float )
    • volume ( float )
    • bid_size ( float )
    • ask_size ( float )
    update_ask( ask_price, ask_size )

    Updates this base data with the new quote ask information

    Parameters:
    • ask_price ( float )
    • ask_size ( float )
    update_bid( bid_price, bid_size )

    Updates this base data with the new quote bid information

    Parameters:
    • bid_price ( float )
    • bid_size ( float )
    update_quote( bid_price, bid_size, ask_price, ask_size )

    Updates this base data with new quote information

    Parameters:
    • bid_price ( float )
    • bid_size ( float )
    • ask_price ( float )
    • ask_size ( float )
    update_trade( last_trade, trade_size )

    Updates this base data with a new trade

    Parameters:
    • last_trade ( float )
    • trade_size ( float )
    property close

    Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.

    Returns:

    Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.

    Return type:

    float

    property data_type

    Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

    Returns:

    Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

    Return type:

    MarketDataType

    property end_time

    The closing time of this bar, computed via the Time and Period

    Returns:

    The closing time of this bar, computed via the Time and Period

    Return type:

    datetime

    property high

    High price of the TradeBar during the time period.

    Returns:

    High price of the TradeBar during the time period.

    Return type:

    float

    property is_fill_forward

    True if this is a fill forward piece of data

    Returns:

    True if this is a fill forward piece of data

    Return type:

    bool

    property low

    Low price of the TradeBar during the time period.

    Returns:

    Low price of the TradeBar during the time period.

    Return type:

    float

    property open

    Opening price of the bar: Defined as the price at the start of the time period.

    Returns:

    Opening price of the bar: Defined as the price at the start of the time period.

    Return type:

    float

    property period

    The period of this trade bar, (second, minute, daily, ect...)

    Returns:

    The period of this trade bar, (second, minute, daily, ect...)

    Return type:

    timedelta

    property price

    As this is a backtesting platform we'll provide an alias of value as price.

    Returns:

    As this is a backtesting platform we'll provide an alias of value as price.

    Return type:

    float

    property symbol

    Symbol representation for underlying Security

    Returns:

    Symbol representation for underlying Security

    Return type:

    Symbol

    property time

    Current time marker of this data packet.

    Returns:

    Current time marker of this data packet.

    Return type:

    datetime

    property value

    Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.

    Returns:

    Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.

    Return type:

    float

    property volume

    Volume:

    Returns:

    Volume:

    Return type:

    float

    TradeBar

    class QuantConnect.Data.Market.TradeBar [source]

    TradeBar class for second and minute resolution data: An OHLC implementation of the QuantConnect BaseData class with parameters for candles.

    Clone( fillForward )

    Return a new instance clone of this object, used in fill forward

    Parameters:
    • fillForward ( bool )
    Return type:

    BaseData

    DataTimeZone()

    Specifies the data time zone for this data type. This is useful for custom data types

    Return type:

    DateTimeZone

    DefaultResolution()

    Gets the default resolution for this data and security type

    Return type:

    Resolution

    GetSource( config, date, isLiveMode )

    Get Source for Custom Data File >> What source file location would you prefer for each type of usage:

    Parameters:
    Return type:

    SubscriptionDataSource

    IsSparseData()

    Indicates that the data set is expected to be sparse

    Return type:

    Boolean

    Reader( config, line, date, isLiveMode )

    TradeBar Reader: Fetch the data from the QC storage and feed it line by line into the engine.

    Parameters:
    Return type:

    BaseData

    Reader( config, stream, date, isLiveMode )

    TradeBar Reader: Fetch the data from the QC storage and feed it line by line into the engine.

    Parameters:
    Return type:

    BaseData

    RequiresMapping()

    Indicates if there is support for mapping

    Return type:

    Boolean

    ShouldCacheToSecurity()

    Indicates whether this contains data that should be stored in the security cache

    Return type:

    Boolean

    SupportedResolutions()

    Gets the supported resolution for this data and security type

    Return type:

    List[Resolution]

    Update( lastTrade, bidPrice, askPrice, volume, bidSize, askSize )

    Update the tradebar - build the bar from this pricing information:

    Parameters:
    • lastTrade ( decimal )
    • bidPrice ( decimal )
    • askPrice ( decimal )
    • volume ( decimal )
    • bidSize ( decimal )
    • askSize ( decimal )
    UpdateAsk( askPrice, askSize )

    Updates this base data with the new quote ask information

    Parameters:
    • askPrice ( decimal )
    • askSize ( decimal )
    UpdateBid( bidPrice, bidSize )

    Updates this base data with the new quote bid information

    Parameters:
    • bidPrice ( decimal )
    • bidSize ( decimal )
    UpdateQuote( bidPrice, bidSize, askPrice, askSize )

    Updates this base data with new quote information

    Parameters:
    • bidPrice ( decimal )
    • bidSize ( decimal )
    • askPrice ( decimal )
    • askSize ( decimal )
    UpdateTrade( lastTrade, tradeSize )

    Updates this base data with a new trade

    Parameters:
    • lastTrade ( decimal )
    • tradeSize ( decimal )
    property Close

    Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.

    Returns:

    Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.

    Return type:

    decimal

    property DataType

    Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

    Returns:

    Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

    Return type:

    MarketDataType

    property EndTime

    The closing time of this bar, computed via the Time and Period

    Returns:

    The closing time of this bar, computed via the Time and Period

    Return type:

    DateTime

    property High

    High price of the TradeBar during the time period.

    Returns:

    High price of the TradeBar during the time period.

    Return type:

    decimal

    property IsFillForward

    True if this is a fill forward piece of data

    Returns:

    True if this is a fill forward piece of data

    Return type:

    bool

    property Low

    Low price of the TradeBar during the time period.

    Returns:

    Low price of the TradeBar during the time period.

    Return type:

    decimal

    property Open

    Opening price of the bar: Defined as the price at the start of the time period.

    Returns:

    Opening price of the bar: Defined as the price at the start of the time period.

    Return type:

    decimal

    property Period

    The period of this trade bar, (second, minute, daily, ect...)

    Returns:

    The period of this trade bar, (second, minute, daily, ect...)

    Return type:

    TimeSpan

    property Price

    As this is a backtesting platform we'll provide an alias of value as price.

    Returns:

    As this is a backtesting platform we'll provide an alias of value as price.

    Return type:

    decimal

    property Symbol

    Symbol representation for underlying Security

    Returns:

    Symbol representation for underlying Security

    Return type:

    Symbol

    property Time

    Current time marker of this data packet.

    Returns:

    Current time marker of this data packet.

    Return type:

    DateTime

    property Value

    Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.

    Returns:

    Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.

    Return type:

    decimal

    property Volume

    Volume:

    Returns:

    Volume:

    Return type:

    decimal

    Tristar

    class QuantConnect.Indicators.CandlestickPatterns.Tristar [source]

    Tristar candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    Tristar

    class QuantConnect.Indicators.CandlestickPatterns.Tristar [source]

    Tristar candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    TwoCrows

    class QuantConnect.Indicators.CandlestickPatterns.TwoCrows [source]

    Two Crows candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    TwoCrows

    class QuantConnect.Indicators.CandlestickPatterns.TwoCrows [source]

    Two Crows candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    UniqueThreeRiver

    class QuantConnect.Indicators.CandlestickPatterns.UniqueThreeRiver [source]

    Unique Three River candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    UniqueThreeRiver

    class QuantConnect.Indicators.CandlestickPatterns.UniqueThreeRiver [source]

    Unique Three River candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    Universe

    class QuantConnect.Data.UniverseSelection.Universe [source]

    Provides a base class for all universes to derive from.

    can_remove_member( utc_time, security )

    Determines whether or not the specified security can be removed from this universe. This is useful to prevent securities from being taken out of a universe before the algorithm has had enough time to make decisions on the security

    Parameters:
    Return type:

    bool

    contains_member( symbol )

    Determines whether or not the specified symbol is currently a member of this universe

    Parameters:
    Return type:

    bool

    dispose()

    Marks this universe as disposed and ready to remove all child subscriptions

    get_subscription_requests( security, current_time_utc, maximum_end_time_utc, subscription_service )

    Gets the subscription requests to be added for the specified security

    Parameters:
    • security ( Security )
    • current_time_utc ( datetime )
    • maximum_end_time_utc ( datetime )
    • subscription_service ( ISubscriptionDataConfigService )
    Return type:

    List[SubscriptionRequest]

    perform_selection( utc_time, data )

    Performs universe selection using the data specified

    Parameters:
    Return type:

    List[Symbol]

    select_symbols( utc_time, data )

    Performs universe selection using the data specified

    Parameters:
    Return type:

    List[Symbol]

    property asynchronous

    True if this universe filter can run async in the data stack

    Returns:

    True if this universe filter can run async in the data stack

    Return type:

    bool

    property configuration

    Gets the configuration used to get universe data

    Returns:

    Gets the configuration used to get universe data

    Return type:

    SubscriptionDataConfig

    property data_type

    Gets the data type of this universe

    Returns:

    Gets the data type of this universe

    Return type:

    Type

    property dispose_requested

    Flag indicating if disposal of this universe has been requested

    Returns:

    Flag indicating if disposal of this universe has been requested

    Return type:

    bool

    property market

    Gets the market of this universe

    Returns:

    Gets the market of this universe

    Return type:

    str

    property members

    Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.

    Returns:

    Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.

    Return type:

    Dict[Symbol, Security]

    property securities

    Gets the internal security collection used to define membership in this universe

    Returns:

    Gets the internal security collection used to define membership in this universe

    Return type:

    Dict[Symbol, Member]

    property security_type

    Gets the security type of this universe

    Returns:

    Gets the security type of this universe

    Return type:

    SecurityType

    property selected

    The currently selected symbol set

    Returns:

    The currently selected symbol set

    Return type:

    HashSet[Symbol]

    property symbol

    Gets the symbol of this universe

    Returns:

    Gets the symbol of this universe

    Return type:

    Symbol

    property universe_settings

    Gets the settings used for subscriptions added for this universe

    Returns:

    Gets the settings used for subscriptions added for this universe

    Return type:

    UniverseSettings

    field UNCHANGED

    Gets a value indicating that no change to the universe should be made

    Returns:

    Gets a value indicating that no change to the universe should be made

    Return type:

    UnchangedUniverse

    Universe

    class QuantConnect.Data.UniverseSelection.Universe [source]

    Provides a base class for all universes to derive from.

    CanRemoveMember( utcTime, security )

    Determines whether or not the specified security can be removed from this universe. This is useful to prevent securities from being taken out of a universe before the algorithm has had enough time to make decisions on the security

    Parameters:
    Return type:

    Boolean

    ContainsMember( symbol )

    Determines whether or not the specified symbol is currently a member of this universe

    Parameters:
    Return type:

    Boolean

    Dispose()

    Marks this universe as disposed and ready to remove all child subscriptions

    GetSubscriptionRequests( security, currentTimeUtc, maximumEndTimeUtc, subscriptionService )

    Gets the subscription requests to be added for the specified security

    Parameters:
    • security ( Security )
    • currentTimeUtc ( DateTime )
    • maximumEndTimeUtc ( DateTime )
    • subscriptionService ( ISubscriptionDataConfigService )
    Return type:

    IEnumerable[SubscriptionRequest]

    PerformSelection( utcTime, data )

    Performs universe selection using the data specified

    Parameters:
    Return type:

    IEnumerable[Symbol]

    SelectSymbols( utcTime, data )

    Performs universe selection using the data specified

    Parameters:
    Return type:

    IEnumerable[Symbol]

    property Asynchronous

    True if this universe filter can run async in the data stack

    Returns:

    True if this universe filter can run async in the data stack

    Return type:

    bool

    property Configuration

    Gets the configuration used to get universe data

    Returns:

    Gets the configuration used to get universe data

    Return type:

    SubscriptionDataConfig

    property DataType

    Gets the data type of this universe

    Returns:

    Gets the data type of this universe

    Return type:

    Type

    property DisposeRequested

    Flag indicating if disposal of this universe has been requested

    Returns:

    Flag indicating if disposal of this universe has been requested

    Return type:

    bool

    property Market

    Gets the market of this universe

    Returns:

    Gets the market of this universe

    Return type:

    string

    property Members

    Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.

    Returns:

    Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.

    Return type:

    Dictionary<Symbol, Security>

    property Securities

    Gets the internal security collection used to define membership in this universe

    Returns:

    Gets the internal security collection used to define membership in this universe

    Return type:

    ConcurrentDictionary<Symbol, Member>

    property SecurityType

    Gets the security type of this universe

    Returns:

    Gets the security type of this universe

    Return type:

    SecurityType

    property Selected

    The currently selected symbol set

    Returns:

    The currently selected symbol set

    Return type:

    HashSet<Symbol>

    property Symbol

    Gets the symbol of this universe

    Returns:

    Gets the symbol of this universe

    Return type:

    Symbol

    property UniverseSettings

    Gets the settings used for subscriptions added for this universe

    Returns:

    Gets the settings used for subscriptions added for this universe

    Return type:

    UniverseSettings

    field Unchanged

    Gets a value indicating that no change to the universe should be made

    Returns:

    Gets a value indicating that no change to the universe should be made

    Return type:

    UnchangedUniverse

    UniverseSettings

    class QuantConnect.Data.UniverseSelection.UniverseSettings [source]

    Defines settings required when adding a subscription

    field asynchronous

    True if universe selection can run asynchronous

    Returns:

    True if universe selection can run asynchronous

    Return type:

    bool

    field contract_depth_offset

    The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contra

    Returns:

    The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contra

    Return type:

    int

    field data_mapping_mode

    Defines how universe data is mapped together

    Returns:

    Defines how universe data is mapped together

    Return type:

    DataMappingMode

    field data_normalization_mode

    Defines how universe data is normalized before being send into the algorithm

    Returns:

    Defines how universe data is normalized before being send into the algorithm

    Return type:

    DataNormalizationMode

    field extended_market_hours

    True to allow extended market hours data, false otherwise

    Returns:

    True to allow extended market hours data, false otherwise

    Return type:

    bool

    field fill_forward

    True to fill data forward, false otherwise

    Returns:

    True to fill data forward, false otherwise

    Return type:

    bool

    field leverage

    The leverage to be used

    Returns:

    The leverage to be used

    Return type:

    float

    field minimum_time_in_universe

    Defines the minimum amount of time a security must be in the universe before being removed.

    Returns:

    Defines the minimum amount of time a security must be in the universe before being removed.

    Return type:

    timedelta

    field resolution

    The resolution to be used

    Returns:

    The resolution to be used

    Return type:

    Resolution

    field schedule

    If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule

    Returns:

    If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule

    Return type:

    Schedule

    field subscription_data_types

    Allows a universe to specify which data types to add for a selected symbol

    Returns:

    Allows a universe to specify which data types to add for a selected symbol

    Return type:

    List[Tuple[Type, TickType]]

    UniverseSettings

    class QuantConnect.Data.UniverseSelection.UniverseSettings [source]

    Defines settings required when adding a subscription

    field Asynchronous

    True if universe selection can run asynchronous

    Returns:

    True if universe selection can run asynchronous

    Return type:

    Boolean

    field ContractDepthOffset

    The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contra

    Returns:

    The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contra

    Return type:

    Int32

    field DataMappingMode

    Defines how universe data is mapped together

    Returns:

    Defines how universe data is mapped together

    Return type:

    DataMappingMode

    field DataNormalizationMode

    Defines how universe data is normalized before being send into the algorithm

    Returns:

    Defines how universe data is normalized before being send into the algorithm

    Return type:

    DataNormalizationMode

    field ExtendedMarketHours

    True to allow extended market hours data, false otherwise

    Returns:

    True to allow extended market hours data, false otherwise

    Return type:

    bool

    field FillForward

    True to fill data forward, false otherwise

    Returns:

    True to fill data forward, false otherwise

    Return type:

    bool

    field Leverage

    The leverage to be used

    Returns:

    The leverage to be used

    Return type:

    decimal

    field MinimumTimeInUniverse

    Defines the minimum amount of time a security must be in the universe before being removed.

    Returns:

    Defines the minimum amount of time a security must be in the universe before being removed.

    Return type:

    TimeSpan

    field Resolution

    The resolution to be used

    Returns:

    The resolution to be used

    Return type:

    Resolution

    field Schedule

    If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule

    Returns:

    If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule

    Return type:

    Schedule

    field SubscriptionDataTypes

    Allows a universe to specify which data types to add for a selected symbol

    Returns:

    Allows a universe to specify which data types to add for a selected symbol

    Return type:

    List<Tuple<Type, TickType>>

    UpDownGapThreeMethods

    class QuantConnect.Indicators.CandlestickPatterns.UpDownGapThreeMethods [source]

    Up/Down Gap Three Methods candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    UpDownGapThreeMethods

    class QuantConnect.Indicators.CandlestickPatterns.UpDownGapThreeMethods [source]

    Up/Down Gap Three Methods candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    UpsideGapTwoCrows

    class QuantConnect.Indicators.CandlestickPatterns.UpsideGapTwoCrows [source]

    Upside Gap Two Crows candlestick pattern

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    UpsideGapTwoCrows

    class QuantConnect.Indicators.CandlestickPatterns.UpsideGapTwoCrows [source]

    Upside Gap Two Crows candlestick pattern

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    DoubleExponentialMovingAverage

    class QuantConnect.Indicators.DoubleExponentialMovingAverage [source]

    This indicator computes the Double Exponential Moving Average (DEMA). The Double Exponential Moving Average is calculated with the following formula: EMA2 = EMA(EMA(t,period),period) DEMA = 2 * EMA(t,period) - EMA2 The Generalized DEMA (GD) is calculated with the following formula: GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    DoubleExponentialMovingAverage

    class QuantConnect.Indicators.DoubleExponentialMovingAverage [source]

    This indicator computes the Double Exponential Moving Average (DEMA). The Double Exponential Moving Average is calculated with the following formula: EMA2 = EMA(EMA(t,period),period) DEMA = 2 * EMA(t,period) - EMA2 The Generalized DEMA (GD) is calculated with the following formula: GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, for the indicator to be ready and fully initialized.

    Returns:

    Required period, in data points, for the indicator to be ready and fully initialized.

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    LongLeggedDoji

    class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji [source]

    Long Legged Doji candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    LongLeggedDoji

    class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji [source]

    Long Legged Doji candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    ShortLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle [source]

    Short Line Candle candlestick pattern indicator

    get_enumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    reset()

    Resets this indicator to its initial state

    to_detailed_string()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    str

    update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( datetime )
    • value ( float )
    Return type:

    bool

    update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    bool

    property consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet[IDataConsolidator]

    property current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property is_ready

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property item

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

    property name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    str

    property period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    int

    property previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property warm_up_period

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    int

    property window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow[IndicatorDataPoint]

    ShortLineCandle

    class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle [source]

    Short Line Candle candlestick pattern indicator

    GetEnumerator()

    Returns an enumerator that iterates through the history window.

    Return type:

    IEnumerator[IndicatorDataPoint]

    Reset()

    Resets this indicator to its initial state

    ToDetailedString()

    Provides a more detailed string of this indicator in the form of {Name} - {Value}

    Return type:

    String

    Update( time, value )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • time ( DateTime )
    • value ( decimal )
    Return type:

    Boolean

    Update( input )

    Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

    Parameters:
    • input ( IBaseData )
    Return type:

    Boolean

    property Consolidators

    The data consolidators associated with this indicator if any

    Returns:

    The data consolidators associated with this indicator if any

    Return type:

    ISet<IDataConsolidator>

    property Current

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property IsReady

    Gets a flag indicating when this indicator is ready and fully initialized

    Returns:

    Gets a flag indicating when this indicator is ready and fully initialized

    Return type:

    bool

    property Name

    Gets a name for this indicator

    Returns:

    Gets a name for this indicator

    Return type:

    string

    property Period

    Gets the period of this window indicator

    Returns:

    Gets the period of this window indicator

    Return type:

    Int32

    property Previous

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Returns:

    Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

    Return type:

    IndicatorDataPoint

    property Samples

    Gets the number of samples processed by this indicator

    Returns:

    Gets the number of samples processed by this indicator

    Return type:

    int

    property WarmUpPeriod

    Required period, in data points, to the indicator to be ready and fully initialized

    Returns:

    Required period, in data points, to the indicator to be ready and fully initialized

    Return type:

    Int32

    property Window

    A rolling window keeping a history of the indicator values of a given period

    Returns:

    A rolling window keeping a history of the indicator values of a given period

    Return type:

    RollingWindow<IndicatorDataPoint>

    property [System.Int32]

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Returns:

    Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

    Return type:

    IndicatorDataPoint

     

    Migrations

    Migrations

    Zipline

    The following pages explain how to migrate trading algorithms from Zipline to LEAN:

     

    Zipline

    Initialization

    Initializing State

    On QuantConnect, algorithm initialization behavior is equivalent to Quantopian's initialize method. Initialize initialize is the method equivalent, and it is only ran once at the start of the algorithm. It is responsible for initially adding data to the algorithm, adding a universe, setting the brokerage, setting the algorithm's start and end date, etc.

    The algorithm structure in QuantConnect differs from Quantopian's as well. On QuantConnect, we create a class that derives from QCAlgorithm and define our overrides/algorithm functionality there. An example of an algorithm with initialization is provided.

    Quantopian

    def initialize(context):
        # Adds AAPL sid to `context` for use later in `handle_data(...)`
        context.aapl = sid(24)

    QuantConnect

    class MyAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            # Adds minutely AAPL data to the algorithm
            self.aapl = self.add_equity("AAPL", Resolution.MINUTE)

    On QuantConnect, the self parameter is the equivalent of the context parameter in Quantopian algorithms. You can use self to access algorithm resources, such as the Portfolio, Orders, Order Tickets, Securities, place orders in your algorithm, and much more.

    You can read more about algorithm initialization at the Initializion documentation page.

    Attaching Pipelines

    The functional equivalent of Pipelines on QuantConnect are Universes. Universes can be used to dynamically select assets your algorithm wants to trade or request data from. To add a universe to your algorithm, you can call the AddUniverse() method and provide the required Coarse and Fine universe selection functions.

    Coarse Universe selection is the first step of universe selection. It provides a means to filter data in a lightweight fashion before proceeding to Fine Universe selection. Coarse universe will allow you to filter assets based off top-level fundamental factors, such as Dollar Volume for the day, if a company has fundamental data, and market of the asset.

    Fine Universe selection is the second step of universe selection. It provides fundamental data to your user-defined function, and can be used to filter in greater detail based on an asset's fundamental data, such as earnings, EPS, etc.

    An example of coarse and fine universe selection to filter assets in our algorithm is provided. Adding universes can be used as an alternative to using AddEquity add_equity if you prefer dynamic asset selection.

    class MyUniverseAlgorithm(QCAlgorithm):
        def Initialize(self) -> None:
            self.SetStartDate(2020, 1, 1)
            self.SetEndDate(2020, 2, 1)
    
            self.UniverseSettings.Resolution = Resolution.Minute
            self.AddUniverse(self.CoarseSelectionFunction, self.FineSelectionFunction)
    
        def CoarseSelectionFunction(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
            return [i.Symbol for i in coarse if i.DollarVolume > 500000 and i.HasFundamentalData]
    
        def FineSelectionFunction(self, fine: List[FineFundamental]) -> List[Symbol]:
            return [i.Symbol for i in fine if i.EarningReports.BasicEPS.OneMonth > 0]

    You can configure universe settings by modifying the existing UniverseSettings attribute of the algorithm.

    class MyUniverseAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.universe_settings.resolution = Resolution.MINUTE
            self.universe_settings.data_normalization_mode = DataNormalizationMode.ADJUSTED
            self.universe_settings.leverage = 1.0
            self.universe_settings.extended_market_hours = False

    You can read more about universe selection at the Universe documentation page.

    Scheduling Functions

    Scheduled Events on QuantConnect are the equivalent of schedule_function() from Quantopian. Examples are provided comparing the Scheduled Events functionality between QuantConnect and Quantopian.

    Quantopian

    import quantopian.algorithm as algo
    
    def my_scheduled_function(context, data):
        pass
    
    def initialize(context):
        # Runs a function every day 60 minutes before U.S. Equities market close
        algo.schedule_function(
            func=my_scheduled_function,
            date_rule=algo.date_rules.every_day(),
            time_rule=algo.time_rules.market_close(minutes=60),
            calendar=algo.calendars.US_EQUITIES
        )

    QuantConnect

    class MyAlgorithm(QCAlgorithm):
        def my_scheduled_function(self):
            pass
    
        # Runs a function every day 60 minutes before SPY ETF's market close
        def initialize(self) -> None:
            self.schedule.on(
                self.date_rules.every_day(),
                self.time_rules.before_market_close("SPY", 60),
                self.my_scheduled_function
           )

    You can read more about scheduled events at the Scheduled Events documentation page.

    Setting Slippage and Commissions

    QuantConnect supports applying slippage and commissions per individual security.

    To add a slippage model to a security, we must set the SlippageModel property of the Security object to our model. A Security is returned when data is added to the algorithm. Examples of setting slippage in an algorithm is provided below for both Quantopian and QuantConnect.

    Quantopian

    import quantopian.algorithm as algorithm
    from zipline.finance.slippage import FixedSlippage
    
    
        def initialize(context):
            # This will set slippage for all U.S. equities
            algorithm.set_slippage(us_equities=FixedSlippage(0.01))
        

    QuantConnect

    class MyAlgorithm(QCAlgorithm)
        def initialize(self) -> None:
            spy = self.add_equity("SPY", Resolution.MINUTE)
            # `ConstantSlippageModel` is the same as `FixedSlippage` on Quantopian.
            # This will set slippage only for the "SPY" security.
            spy.slippage_model = ConstantSlippageModel(0.01)

    Commissions

    To add a fee model (otherwise known as Commissions on Quantopian) to a security, we must set the FeeModel property of the Security object to our model. Examples are provided below for Quantopian and QuantConnect.

    Quantopian

    import quantopian.algorithm as algorithm
    from zipline.finance.commission import PerShare
    
    
        def initialize(context):
            # Approximates Interactive Brokers' equities trading commissions.
            algorithm.set_commission(us_equities=Pershare(cost=0.0075))
        

    QuantConnect

    class MyAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
           aapl = self.add_equity("AAPL", Resolution.MINUTE)
           spy = self.add_equity("SPY", Resolution.MINUTE)
    
           # Sets the fee model to the IB fee model, which simulates
           # the fees we would encounter in live trading.
           spy.fee_model = InteractiveBrokersFeeModel()
    
           # Sets the fee model to a constant fee model
           aapl.fee_model = ConstantFeeModel(0.01, "USD")

    You can read more about Securities and their attributes at the Securities and Portfolio and Reality Modeling documentation pages.

    Manual Asset Lookup

    On QuantConnect, we provide the Symbol class to reference a security across time with a changing ticker. This is similar to Quantopian's symbol() function, which enables the same functionality.

    When you add data to your algorithm, a Security object is returned. The Symbol is accessible from the Security as shown below.

    class MyAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.set_start_date(2000, 1, 1)
            self.set_end_date(2020, 1, 1)
            # TWX will change to AOL when backtesting in the early 2000s, and will
            # change to TWX as the backtest advances past the date it was renamed.
            twx_security = self.add_equity("TWX", Resolution.MINUTE)
            twx_symbol = twx_security.symbol

    To manually create a reference to an old equity, you can use the Symbol.Create() method, or the Symbol.CreateEquity() method.

    You can read more about Symbols and Security Identifiers (SID) at the Security Identifiers documentation page.

     

    Zipline

    Using Data

    Pipeline in Algorithms

    As covered in the Initialization section, Pipelines can be replicated using Universe Selection in QuantConnect, albeit with some additional steps in between and a performance impact.

    In this section, we will construct and define an equivalent pipeline model using universe selection in QuantConnect. We will filter our data set in Coarse and Fine, and apply an additional filter to historical data with a rolling window.

    We first create a skeleton algorithm definition to begin setting up our Pipeline. Note that this algorithm will allow all equities through, which will have a substantial performance impact on our algorithm.

    class MyPipelineAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.set_start_date(2020, 1, 1)
            self.set_end_date(2020, 10, 20)
    
            self.add_universe(self.coarse_selection_function, self.fine_selection_function)
    
        def coarse_selection_function(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
            # Allows all Symbols through, no filtering applied
            return [coarse_data.symbol for coarse_data in coarse]
    
        def fine_selection_function(self, fine: List[FineFundamental]) -> List[Symbol]:
            # Allows all Symbols through, no filtering applied
            return [fine_data.symbol for fine_data in fine]

    The skeleton algorithm is the equivalent of the Pipeline call below.

    from quantopian.pipeline import Pipeline
    from quantopian.pipeline.domain import US_EQUITIES
    from quantopian.research import run_pipeline
    
    pipe = Pipeline(columns={}, domain=US_EQUITIES)
    run_pipeline(pipe, '2020-01-01', '2020-10-20')

    The equivalent of Pipeline(screen=...) resolves to the filter applied at the Coarse and Fine stages of universe selection. Let's define a filter of stocks with a dollar volume greater than $50000000 USD, as well as a rolling thirty day return greater than 2%. Once we've initially filtered the Symbols in Coarse Universe Selection, let's define a final filter only allowing stocks with EPS greater than 0. Beware of making History() calls with many Symbols. It could potentially cause your algorithm to run out of system resources (i.e. RAM) and reduce performance of your algorithm on universe selection.

    from datetime import datetime, timedelta
    
    class MyPipelineAlgorithm(QCAlgorithm):
        def Initialize(self) -> None:
            self.SetStartDate(2020, 1, 1)
            self.SetEndDate(2020, 10, 20)
    
            self.AddUniverse(self.CoarseSelectionFunction, self.FineSelectionFunction)
    
        def CoarseSelectionFunction(self, coarse: List[CoarseFundamental]) -> List[Symbol]:
            # Allows all Symbols through, no filtering applied
            dollar_volume_filter_symbols = [coarse_data.Symbol for coarse_data in coarse if coarse_data.DollarVolume > 50000000]
    
            # Make a history call to calculate the 30 day rolling returns
            df = self.History(dollar_volume_filter_symbols, self.Time - timedelta(days=60), self.Time, Resolution.Daily)
    
            # Compute the rolling 30 day returns
            df = df['close'].groupby(level=0).filter(lambda x: len(x) >= 30).groupby(level=0).apply(lambda x: (x.iloc[-1] - x.iloc[-30]) / x.iloc[-30])
    
            # Finally, apply our filter
            dataframe_screen = df[df > 0.02]
    
            # Filters out any Symbol that is not in the DataFrame
            return [s for s in dollar_volume_filter_symbols if str(s) in dataframe_screen]
    
        def FineSelectionFunction(self, fine: List[FineFundamental]) -> List[Symbol]:
            # We receive the filtered symbols from before, and we filter by EPS > 0 in this step
           return [s.Symbol for s in fine if s.EarningReports.BasicEPS.ThreeMonths > 0]

    This class definition is now roughly equivalent to the following CustomFactor and Pipeline call in Quantopian, excluding the EPS filtering.

    from quantopian.pipeline.filters import QTradableStocksUS
    from quantopian.pipeline.factors import AverageDollarVolume
    
    class PercentageChange(CustomFactor):
        def compute(self, today, assets, out, values):
            out[:] = (values[-1] - values[0]) / values[0]
    
        dollar_volume = AverageDollarVolume(window_length=5)
        dollar_volume_filter = (dollar_volume > 50000000)
    
        pipe = Pipeline(
            columns={
                "percent_change": PercentageChange(inputs=[USEquityPricing.close], window_length=30)
            },
            screen=(QTradableStocksUS() & dollar_volume_filter)
        )
        

    An example of the shape of the DataFrame returned from History is shown below. The DataFrame has a MultiIndex, with level=0 being the Symbol, and level=1 being the Time for that point of data. You can index the Symbol/ level=0 index by using either the SecurityIdentifier string (e.g. df.loc["AAPL R735QTJ8XC9X"] ) or with the ticker of the Symbol (e.g. df.loc["AAPL"] ) Historical data of IBM, & AAPL

    BarData Lookup

    Similar but different, the Quantopian BarData object, and the QuantConnect Slice object both provide data to the user's algorithm as point-in-time data.

    In Quantopian, data is handled via the handle_data(context, data) function. In QuantConnect, data is handled via the OnData(self, slice) method. Both of these functions accept data whenever new data exists for a given point in time. Although these two functions share the same method signature, the handling of the data is different.

    BarData vs. Slice

    BarData is the primary mechanism to retrieve the point-in-time data, as well as requesting history for any given securities in Quantopian. The following code retrieves daily historical data from 30 days into the past, as well as getting the most recent data for AAPL at the current point-in-time.

    Quantopian

    def initialize(context):
        context.aapl = sid(24)
    
    def handle_data(context, data):
        # Gets a DataFrame of AAPL history going back 30 days
        aapl_history = data.history(context.aapl, fields=["open", "high", "low", "close", "volume"], 30, "1d")
        # Gets a pandas Series of the most recent AAPL data
        aapl_current = data.current(context.aapl, fields=["open", "high", "low", "close", "volume"])

    QuantConnect

    from datetime import timedelta
            
    class MyHistoryAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.aapl = self.add_equity("AAPL", Resolution.DAILY)
    
        def on_data(self, slice: Slice) -> None:
            # Gets a DataFrame of AAPL history going back 30 days
            aapl_history = self.history([self.aapl.symbol], timedelta(days=30), Resolution.DAILY)
    
            # Gets the most recent AAPL Trade data (OHLCV)
            aapl_current = slice.bars[self.aapl.symbol]
        

    Slice represents a single point in time, and does not provide the functionality to access historical data itself. To access historical data in an algorithm, use the algorithm's self.History() call to request a pandas DataFrame of historical data. In Slice , the data that is accessed is not a pandas DataFrame, but rather a single object containing data for a single point in time.

    The TradeBar class, for example, only contains scalar values of OHLCV, rather than return a DataFrame of OHLCV values. Since the data Slice contains is point-in-time, there will be only a single trade/quote bar per Symbol whenever OnData(self, data) is called.

    QuantConnect provides Quote (NBBO) data for use in your algorithm, otherwise known as a QuoteBar . Quote data is only accessible when an algorithm is set to consume Tick, Second, or Minutely data.

    You can access Trade (OHLCV) data by accessing the Bars attribute of Slice . You can access Quote (Bid(OHLCV), Ask(OHLCV)) data by accessing the QuoteBars attribute of Slice .

    Both of the Bars and QuoteBars attributes are similar to Python dictionaries, and can be used as such. To check to see if there exists a new piece of data for a given security, you can use Python's in operator on Bars and or QuoteBars . You can also choose to iterate on all data received by calling the Values attribute of the Bars or QuoteBars attributes, which will return either a list of TradeBar or QuoteBar objects.

    The TradeBar object contains the Open , High , Low , Close , Volume , Time time , EndTime end_time , and Symbol attributes. The QuoteBar object contains the following attributes:

    Note that the Bid and Ask attributes can potentially be None if no bid/ask data exists at a given point-in-time.

    The example below shows the different ways to access TradeBar and QuoteBar data, as well as requesting 30 days of AAPL historical data.

    from datetime import datetime, timedelta
    
    
    class MyDataAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.aapl_security = self.add_equity("AAPL", Resolution.DAILY)
            self.aapl_symbol = self.aapl_security.symbol
    
        def on_data(self, slice: Slice) -> None:
            # Gets 30 days of AAPL history
            aapl_history = self.history([self.aapl_symbol], timedelta(days=30), Resolution.DAILY)
    
            # We must first check to make sure we have AAPL data, since this point-in-time
            # might not have had any trades for AAPL (this is in case you trade a low
            # liquidity asset. The data can potentially be missing for a point-in-time).
            if self.aapl_symbol in slice.bars:
                aapl_current_trade = slice.bars[self.aapl_symbol]
                Log(f"{self.time} :: TRADE :: {self.aapl_symbol} - O: {aapl_current_trade.open} H: {aapl_current_trade.high} L: {aapl_current_trade.low} C: {aapl_current_trade.close} V: {aapl_current_trade.volume}")
    
            # Check to make sure we have AAPL data first, since there might not have
            # been any quote updates since the previous for AAPL (this is in case you trade
            # a low liquidity asset. The data can potentially be missing for a point-in-time).
            if self.aapl_symbol in data.quote_bars:
                aapl_current_quote = slice.quote_bars[self.aapl_symbol]
                if aapl_current_quote.bid is not None:
                    Log(f"{} :: QUOTE :: {} - Bid O: {} Bid H: {} Bid L: {} Bid C: {} Bid size: {}".format(
                        str(self.time),
                        str(self.aapl_symbol)
                        str(aapl_current_quote.bid.open),
                        str(aapl_current_quote.bid.high),
                        str(aapl_current_quote.bid.low),
                        str(aapl_current_quote.bid.close),
                        str(aapl_current_quote.last_bid_size)
                    ))
    
                if aapl_current_quote.ask is not None:
                    Log(f"{} :: QUOTE :: {} - Ask O: {} Ask H: {} Ask L: {} Ask C: {} Ask size: {}".format(
                        str(self.time),
                        str(self.aapl_symbol),
                        str(aapl_current_quote.ask.open),
                        str(aapl_current_quote.ask.high),
                        str(aapl_current_quote.ask.low),
                        str(aapl_current_quote.ask.close),
                        str(aapl_current_quote.last_ask_size)
                    ))
        

     

    Zipline

    Ordering

    Placing Orders

    Both Quantopian and QuantConnect offer several methods for placing orders. Both platforms have MarketOrder , LimitOrder , StopOrder , and StopLimitOrder stop_limit_order classes to create specific order types, although the StopOrder order is named StopMarketOrder on our platform. On Quantopian, creating these orders is done by passing a style argument to the order method.

    from zipline.finance.execution import (
        LimitOrder,
        MarketOrder,
        StopLimitOrder,
        StopOrder,
    )
    
    def initialize(context):
        context.stock = sid(8554)
        context.ordered = False
    
    def handle_data(context, data):
        if not context.ordered:
            close = data.current(context.stock, 'close')
            order(context.stock, 10, style=MarketOrder()) 
            order(context.stock, 10, style=LimitOrder(limit_price=close * 0.9)) 
            order(context.stock, -10, style=StopOrder(stop_price=close * 0.85)) 
            order(context.stock, -10, style=StopLimitOrder(limit_price=close * 0.75, stop_price=close * 0.85)) 
            context.ordered = True
    

    On QuantConnect, the same orders can be created with

    class MyAlgorithm(QCAlgorithm):
    
        def initialize(self) -> None:
            self.set_start_date(2020, 3, 1)
            self.set_cash(100000)
            self._symbol = self.add_equity("SPY", Resolution.MINUTE).symbol
            self.ordered = False
    
        def on_data(self, slice: Slice) -> None:
            if not self.ordered and slice.contains_key(self._symbol):
                close = slice[self._symbol].close
                self.market_order(self._symbol, 10)
                self.limit_order(self._symbol, 10, close * 0.9)
                self.stop_market_order(self._symbol, -10, close * 0.85)
                self.stop_limit_order(self._symbol, -10, close * 0.85, close * 0.75)
                self.ordered = True
    

    In addition to the order types above, QuantConnect has several other order types available. Refer to our Trading and Orders documentation for a comprehensive list.

    Quantopian's order_optimal_portfolio method computes the optimal portfolio weights using an objective and constraints, then places the orders to achieve the desired portfolio. For example, the code below uses the Quantopian API to create an equal-weighted dollar-neutral portfolio.

    import quantopian.algorithm as algo
    import quantopian.optimize as opt
    
    objective = opt.TargetWeights(weights)
    constraints = [
        opt.MaxGrossExposure(1.0),
        opt.DollarNeutral()
    ]
    algo.order_optimal_portfolio(objective, constraints)
    

    To acheive the same functionality with QuantConnect, we utilize portfolio construction models . For instance, to create an equal-weighted dollar-neutral portfolio, we could define the following portfolio construction model and attach it to the algorithm.

    class MyAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.set_start_date(2020, 5, 1)  
            self.set_cash(100000)  
    
            self.set_portfolio_construction(EqualWeightedDollarNeutralPortfolioConstructionModel())
    
    
    class EqualWeightedDollarNeutralPortfolioConstructionModel(PortfolioConstructionModel):
    
        def determine_target_percent(self, activeInsights: List[Insight]) -> Dict[Insight, float]:
            result = {}
            
            longs = 0
            shorts = 0
            for insight in activeInsights:
                if insight.direction == InsightDirection.UP:
                    longs += 1
                elif insight.direction == InsightDirection.DOWN:
                    shorts += 1
                result[insight] = 0
            
            if longs == 0 or shorts == 0:
                return result
            
            for insight in activeInsights:
                if insight.direction == InsightDirection.UP:
                    result[insight] = 0.5 / longs
                elif insight.direction == InsightDirection.DOWN:
                    result[insight] = -0.5 / shorts
            return result
    

    When algorithms require manual control of their orders, both Quantopian and QuantConnect have lower-level ordering methods. Quantopian's order method, which places an order for a fixed number of shares, directly maps to our Order method. Additionally, Quantopian's order_target_percent method places an order to adjust a position to a target percent of the current portfolio value. Here's an example use case of these methods on the Quantopian platform.

    order_target_percent(sid(8554), 10) # Allocate 10% of portfolio
    order(sid(8554), 10) # Order 10 shares
    

    On QuantConnect, these same orders can be placed using the SetHoldings set_holdings and Order methods.

    self.set_holdings(symbol, 0.1) # Allocate 10% of portfolio
    self.order(symbol, 10) # Order 10 shares
    

    Quantopian and QuantConnect don't have equivalents for all the ordering techniques, although we can create a workaround for most situations. For instance, Quantopian's order_percent method places an order in the specified asset corresponding to the given percent of the current portfolio value.

    order_percent(sid(8554), 10) # Allocate 10% more of portfolio
    

    To accomplish this on QuantConnect, we can determine the weight of the asset in the Portfolio portfolio , then manually determine the new target percent to pass to SetHoldings set_holdings .

    current_weight = self.portfolio[symbol].holdings_value / self.portfolio.total_portfolio_value
    self.set_holdings(symbol, current_weight + 0.1) # Allocate 10% more of portfolio
    

    The Porfolio Object

    Quantopian's Portfolio portfolio class provides read-only access to the current portfolio state. The state includes starting cash, current cash, portfolio value, and positions. The Portfolio portfolio object is accessed through the context object, as seen below.

      
    context.portfolio.starting_cash     # Amount of cash in the portfolio at the start of the backtest
                     .cash              # Amount of cash currently held in portfolio
                     .portfolio_value   # Current liquidation value of the portfolio's holdings
                     .positions         # Dict-like object for currently-held positions
    

    All of this information, and more, is attainable on QuantConnect by using our Portfolio portfolio object. Listed below is an example of doing so. Although there isn't a property for starting cash, this value can be saved during Initialization to be referenced later.

    self.portfolio.cash                  # Sum of all currencies in account (only settled cash)
                  .total_portfolio_value   # Portfolio equity
                  .keys                  # Collection of Symbol objects in the portfolio
                  .values                # Collection of SecurityHolding objects in the portfolio
    

    On Quantopian, by iterating through the positions dictionary, we can access information about currently-held positions. This includes the number of shares held, the last traded price & date of the asset, and the position's cost basis.

      
    for sid, position in context.portfolio.positions.iteritems():
        position.amount            # Number of shares in the position 
                .cost_basis        # Volume weighted average price paid per share
                .last_sale_price   # Price at last sale of the asset on the exchange 
                .last_sale_date    # Date of last sale of the asset on the exchange
    

    Since the Portfolio portfolio on QuantConnect is a Dictionary<Symbol, SecurityHolding> , we can get information on current positions by indexing the Portfolio portfolio object with a Symbol or ticker. The SecurityHolding object that is returned contains information related to a single security in the portfolio. For instance, we have

    self.portfolio[symbol].quantity                 # Number of shares held
                          .average_price             # Average price of shares held (aka cost basis)
                          .price                    # Last traded price of the security
    

    For more information on our Portfolio portfolio object refer to the Securities and Portfolio documentation.

     

    Zipline

    Logging and Plotting

    Logging

    In QuantConnect, the self.Debug() method is the equivalent of the log.info() function in Quantopian. Debug output is viewable via the QuantConnect Terminal Console.

    Output to the console via self.Debug() is rate-limited. If you need long-term storage of your logs and don't want to overflow the console, consider using self.Log() instead. An example comparing logging between Quantopian and QuantConnect is shown below.

    Quantopian

    def initialize(context):
        log.info("Hello, console!")

    QuantConnect

    class MyLoggingAlgorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.debug("Hello, console!")
            self.log("Hello, backtesting logs!")

    Logging via self.Log() has daily limits in QuantConnect. On the free tier, users are limited to 10KB of logs per day for your account/organization. To increase this limit, you can upgrade your account to a different tier. Calls to self.Debug() will also count towards the 10KB log limit, but are always outputted to the Terminal Console regardless of your daily log limit.

    To view pricing and upgrade your account, visit the Organization Pricing page.

    You can view the logs generated via self.Log() for a backtest by first accessing a backtest, and clicking the "Logs" tab near the bottom of the page. To download the logs, you can click the "Download Logs" link to download a text file containing your backtest's logs.

    Plotting

    In Quantopian, plotting/charting is done with the record(series1_name=scalar_value, series2_name=scalar_value, ...) function. In QuantConnect, plotting is accessible via the self.plot("chart name", "series name", scalar_value) method.

    Plotting multiple series in one function call is possible in Quantopian. However, in QuantConnect, a separate call is needed for each series requiring an update. All series with the same chart name will appear on the same window/pane. New charts can be created by calling self.plot() method with a unique chart name.

    An example of plotting in Quantopian vs. QuantConnect is shown below. The QuantConnect code will create two charts, one named "Chart1" with two series of data, and another named "Chart2" with one series of data. Note that you can also use self.plot("series name", value) to place the custom series on the same chart as the equity curve.

    Quantopian

    import numpy as np
    from quantopian.algorithm import record
    
        def initialize(context):
            context.i = 0
    
        def handle_data(context, data):
            context.i += 0.25
    
            record(
                series1=np.sin(context.i),
                Series2=np.cos(context.i),
                Series3=np.tan(context.i)
            )

    QuantConnect

    import numpy as np
            
    class Algorithm(QCAlgorithm):
        def initialize(self) -> None:
            self.i = 0
    
        def on_data(self, slice: Slice) -> None:
            self.i += 0.25
    
            self.plot('Chart1', 'Series1', np.sin(self.i))
            self.plot('Chart1', 'Series2', np.cos(self.i))
            self.plot('Chart2', 'Chart2 Series1', np.tan(self.i))

    For more information on plotting in QuantConnect, visit the Charting documentation page.

     

    Zipline

    Quick Reference

    User-Implemented Functions

    The following table describes functions that are treated specially when defined in the IDE.

    Algorithms are required to implement one method: Initialize(self).

    An optional scheduled event can be defined to behave like before_trading_start(). OnData() is also optional but is treated especially if defined.

    Quantopian QuantConnect
    initialize (context) Initialize (self)
    Required function called once at the start of a backtest.
    before_trading_start (context, data) self.Schedule.On(self.DateRules.EveryDay(), self.TimeRules.AfterMarketOpen(symbol, 10), self.before_trading_start)
    Optional function called prior to market open on every trading day.
    handle_data (context, data) OnData (self, slice)
    Optional function called at the end of each market minute.

    Interface Classes

    The following table describes classes that are passed to initialize() , handle_data() , before_trading_start() and any scheduled with schedule_function() .

    In QuantConnect/Lean, the portfolio state and the positions are class attributes of QCAlgorithm, available via self keyword. The scheduled function is parameterless and can algorithms can self.CurrentSlice.

    Quantopian QuantConnect
    quantopian.algorithm.interface.AlgorithmContext QCAlgorithm
    Shared object for storing custom state.
    quantopian.algorithm.interface.BarData Slice
    Provides methods for accessing minutely and daily price/volume data from Algorithm API functions.
    quantopian.algorithm.interface.Portfolio self.Portfolio
    Object providing read-only access to current portfolio state.
    quantopian.algorithm.interface.Positions self.Transactions
    A dict-like object containing the algorithm's current positions.

    The features from the BarData methods are found in the Slice object (current data), History method (past data) and class attribute Securities.

    Quantopian QuantConnect
    quantopian.algorithm.interface.BarData.current Slice[symbol]
    Returns the "current" value of the given fields for the given assets at the current simulation time.
    quantopian.algorithm.interface.BarData.history self.History(symbols, bar_count)
    Returns a trailing window of length bar_count containing data for the given assets, fields, and frequency.
    quantopian.algorithm.interface.BarData.can_trade self.Securities[symbol].IsTradable
    For the given asset or iterable of assets, returns True if all of the following are true:
    quantopian.algorithm.interface.BarData.is_stale not Slice[symbol].IsFillForward
    For the given asset or iterable of assets, returns True if the asset is alive and there is no trade data for the current simulation time.

    Pipeline

    The following table describes functions used to schedule and retrieve results of Universe selection. For more information on the Universe Selection API, see the Univeres API Reference.

    Quantopian QuantConnect
    quantopian.algorithm.attach_pipeline (...) universe = self.AddUniverse (...)
    name = universe.Configuration.Symbol
    Register a pipeline to be computed at the start of each day.
    quantopian.algorithm.pipeline_output (name) self.UniverseManager [name]
    Get results of the pipeline attached by with name .

    Scheduling Functions

    The following tables describes functions that can be used to schedule functions to run periodically during your algorithm.

    Quantopian QuantConnect
    quantopian.algorithm.schedule_function (func) self.Schedule.On(IDateRule, ITimeRule, func)
    Schedule a function to be called repeatedly in the future.

    Date Rules

    The following table contains functions that can be used with the date_rule parameter of schedule_function() .

    Quantopian QuantConnect
    quantopian.algorithm.date_rules.every_day () self.DateRules.EveryDay(symbol)
    Create a rule that triggers every day.
    quantopian.algorithm.date_rules.month_start ([...]) self.DateRules.MonthStart(symbol, daysOffset)
    Create a rule that triggers a fixed number of trading days after the start of each month.
    quantopian.algorithm.date_rules.month_end ([...]) self.DateRules.MonthEnd(symbol, daysOffset)
    Create a rule that triggers a fixed number of trading days before the end of each month.
    quantopian.algorithm.date_rules.week_start ([...]) self.DateRules.WeekStart(symbol, daysOffset)
    Create a rule that triggers a fixed number of trading days after the start of each week.
    quantopian.algorithm.date_rules.week_end ([...]) self.DateRules.WeekEnd(symbol, daysOffset)
    Create a rule that triggers a fixed number of trading days before the end of each week.

    Time Rules

    The following table contains functions that can be used with the time_rule parameter of schedule_function() .

    Quantopian QuantConnect
    quantopian.algorithm.time_rules.market_open ([...]) self.TimeRules.AfterMarketOpen(symbol, minutes_after_open = 0)
    Create a rule that triggers at a fixed offset from market open.
    quantopian.algorithm.time_rules.market_close ([...]) self.TimeRules.BeforeMarketClose(symbol, minutes_before_close = 0)
    Create a rule that triggers at a fixed offset from market close.

    Ordering

    There are several ways to place orders from an algorithm. For most use-cases, we recommend using SetHoldings method which correctly accounts the porfolio buying power model and fees. At the moment, there is no equivalent for order_optimal_portfolio() . However a similar behavior can be replicated with a Portfolio Construction Model.

    Algorithms that require explicit manual control of their orders can use the lower-level ordering functions.

    Placing Orders

    Quantopian QuantConnect
    quantopian.algorithm.order_optimal_portfolio (...) N/A
    Calculate an optimal portfolio and place orders toward that portfolio.
    quantopian.algorithm.order (asset, amount[, ...]) self.Order(symbol, amount)
    Place an order for a fixed number of shares.
    quantopian.algorithm.order_value (asset, value) N/A
    Place an order for a fixed amount of money.
    quantopian.algorithm.order_percent (asset, ...) self.SetHoldings(symbol, percent)
    Place an order in the specified asset corresponding to the given percent of the current portfolio value.
    quantopian.algorithm.order_target (asset, target) N/A
    Place an order to adjust a position to a target number of shares.
    quantopian.algorithm.order_target_value (...) N/A
    Place an order to adjust a position to a target value.
    quantopian.algorithm.order_target_percent (...) self.SetHoldings(symbol, percent)
    Place an order to adjust a position to a target percent of the current portfolio value.

    Controlling Order Execution

    Quantopian QuantConnect
    zipline.finance.execution.ExecutionStyle FillModel
    Base class for order execution styles.
    zipline.finance.execution.MarketOrder ([exchange]) self.MarketOrder (symbol, quantity)
    Execution style for orders to be filled at current market price.
    zipline.finance.execution.LimitOrder (limit_price) self.LimitOrder (symbol, quantity, limit_price)
    Execution style for orders to be filled at a price equal to or better than a specified limit price.
    zipline.finance.execution.StopOrder (stop_price) self.StopMarketOrder (symbol, quantity, stop_price)
    Execution style representing a market order to be placed if market price reaches a threshold.
    zipline.finance.execution.StopLimitOrder (...) self.StopLimitOrder (symbol, quantity, stop_price, limit_price)
    Execution style representing a limit order to be placed if market price reaches a threshold.

    Managing Existing Orders

    Quantopian QuantConnect
    quantopian.algorithm.get_order (order_id) self.Transactions.GetOrderById (order_id)
    Lookup an order based on the order Id returned from one of the order functions.
    quantopian.algorithm.get_open_orders ([asset]) self.Transactions.GetOpenOrders (symbol)
    Retrieve all of the current open orders.
    quantopian.algorithm.cancel_order (order_param) self.Transactions.CancelOpenOrders (symbol)
    Cancel an open order.

    Customizing the Simulation

    Slippage

    Algorithms can customize the simulation of order fills by calling SetSlippageModel() with a ISlippageModel which is any class that implements GetSlippageApproximation method. Unlike Quantopian, the slippage model is a security attribute, not a global attribute. Different securities can have different slippage models.

    The default slippage model on QuantConnect is a constant slippage model with zero slippage percent (no slippage).

    Quantopian QuantConnect
    quantopian.algorithm.set_slippage ([...]) self.Securities[symbol].SetSlippageModel(ISlippageModel)
    Set the slippage models for the simulation.
    zipline.finance.slippage.SlippageModel () N/A (class must implement GetSlippageApproximation method)
    Abstract base class for slippage models.
    zipline.finance.slippage.FixedBasisPointsSlippage ([...]) ConstantSlippageModel(slippage_percent)
    Model slippage as a fixed percentage difference from historical minutely close price, limiting the size of fills to a fixed percentage of historical minutely volume.
    zipline.finance.slippage.NoSlippage () NullSlippageModel.Instance
    A slippage model where all orders fill immediately and completely at the current close price.
    zipline.finance.slippage.FixedSlippage ([spread]) N/A
    Simple model assuming a fixed-size spread for all assets.
    zipline.finance.slippage.VolumeShareSlippage ([...]) N/A
    Model slippage as a quadratic function of percentage of historical volume.

    Commissions

    Algorithms can customize the simulation of order fees by calling SetFeeModel() with a IFeeModel which is any class that implements GetOrderFee method. Unlike Quantopian, the fee model is a security attribute, not a global attribute. Different securities can have different fee models.

    The default fee model on QuantConnect depends on the security type and the brokerage. For instance, the default fee model for equity is the Interactive Brokers fee model.

    Quantopian QuantConnect
    quantopian.algorithm.set_commission ([...]) self.Securities[symbol].SetFeeModel(IFeeModel)
    Sets the commission models for the simulation.
    zipline.finance.commission.CommissionModel N/A (class must implement GetOrderFee method)
    Abstract base class for commission models.
    zipline.finance.commission.PerShare ([cost, ...]) N/A
    Calculates a commission for a transaction based on a per share cost with an optional minimum cost per trade.
    zipline.finance.commission.PerTrade ([cost]) N/A
    Calculates a commission for a transaction based on a per trade cost.
    zipline.finance.commission.PerDollar ([cost]) N/A
    Model commissions by applying a fixed cost per dollar transacted.
    zipline.finance.commission.NoCommission FeeModel()
    Model commissions as free.

    Benchmark

    The default benchmark is SPY.

    Quantopian QuantConnect
    quantopian.algorithm.set_benchmark (benchmark) self.SetBenchmark (benchmark)
    Set the benchmark asset.